diff --git a/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.0.miz b/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.0.miz index 91f75c5..f4f62fd 100644 Binary files a/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.0.miz and b/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.0.miz differ diff --git a/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.1.miz b/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.1.miz index d33d9f1..2efb1ab 100644 Binary files a/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.1.miz and b/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.1.miz differ diff --git a/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.2.miz b/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.2.miz deleted file mode 100644 index 460d778..0000000 Binary files a/DCS_Afgainistan/Insurgent_Sandstorm/F99th-Insurgent_Sandstorm_2.0.2.miz and /dev/null differ diff --git a/Moose_CTLD_Pure/MEDEVAC_Salvage_System_Guide.html b/Moose_CTLD_Pure/MEDEVAC_Salvage_System_Guide.html deleted file mode 100644 index 4ace6f5..0000000 --- a/Moose_CTLD_Pure/MEDEVAC_Salvage_System_Guide.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - MOOSE CTLD: MEDEVAC & Salvage System Guide - - - -
-

🚁 MOOSE CTLD: COMPLETE MEDEVAC & SALVAGE SYSTEM GUIDE 📦

-

Dynamic Battlefield Economy & Rescue Operations

- -
-

OVERVIEW

-

The CTLD system features a comprehensive salvage economy with TWO distinct methods for earning salvage points: MEDEVAC crew rescue missions and Sling-Load salvage crate recovery. Both systems feed into a shared coalition salvage pool that can be used to build out-of-stock equipment.

-
- -

📋 Complete Menu Structure

- - -

🚑 SALVAGE METHOD #1: MEDEVAC RESCUE CREW RECOVERY

- -

CONCEPT: Rescue stranded vehicle crews and deliver them to MASH zones

- -

How It Works

-
    -
  1. When friendly vehicles are destroyed, there's a % chance the crew survives
    - (Default: 50% survival chance, configurable per coalition)
  2. - -
  3. After a 5-minute delay (battle clearance), surviving crew spawns near the wreck with a MEDEVAC mission announcement
  4. - -
  5. Crew will: -
      -
    • Pop smoke when rescue helicopter approaches (8km detection)
    • -
    • Send colorful radio messages ("Follow the smoke!")
    • -
    • Wait up to 1 hour before being declared KIA
    • -
    • May include MANPADS soldier for self-defense (10% chance)
    • -
    -
  6. - -
  7. Load crew via normal troop pickup (land near crew, auto-loads)
  8. - -
  9. Fly to any MASH (Mobile Army Surgical Hospital) zone
  10. - -
  11. Land in MASH zone and wait 15 seconds for automatic crew offload
  12. - -
  13. Salvage points awarded based on vehicle value!
  14. -
- -

Salvage Value Scale

-

Value is determined by the destroyed vehicle type (from catalog):

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Vehicle TypeSalvage PointsExamples
Light Vehicles1-5 pointsHumvees, trucks, light armor
Medium Vehicles5-15 pointsAPCs, IFVs, light tanks
Heavy Vehicles15-30 pointsMBTs, heavy armor
Special Assets30-50 pointsSAMs, artillery, C2 vehicles
- -
- Example: Rescue a T-90 crew = ~25 salvage points -
- -

MEDEVAC F10 Menu Commands

- - -

📦 SALVAGE METHOD #2: SLING-LOAD RECOVERY EQUIPMENT SALVAGE

- -

CONCEPT: Recover enemy equipment wreckage via DCS sling-load mechanics

- -

How It Works

-
    -
  1. When ENEMY ground units die, there's a 15% chance (configurable) to spawn a physical cargo crate near the wreck for YOUR coalition to collect
  2. - -
  3. Crate naming: -
      -
    • SALVAGE-B-XXXXXX (Blue coalition can collect, spawns from RED deaths)
    • -
    • SALVAGE-R-XXXXXX (Red coalition can collect, spawns from BLUE deaths)
    • -
    -
  4. - -
  5. Orange smoke marks crate location for 2 minutes after spawn
  6. - -
  7. Crate has a random weight class (determines helicopter requirement & reward)
  8. - -
  9. Use standard DCS F6 RADIO MENU sling-load to hook the crate
  10. - -
  11. Fly to a Salvage Collection Zone (create via F10 > Field Tools menu)
  12. - -
  13. Land/drop crate inside the zone boundary
  14. - -
  15. Automatic detection awards salvage points based on weight + condition!
  16. - -
  17. Crate expires after 3 HOURS if not collected (warnings at 30min & 5min)
  18. -
- -
- NOT hover-pickup! This is pure DCS sling-load mechanics using F6 RADIO MENU! -
- -

Weight Classes & Reward Matrix

-

Crate weight determines both helicopter requirements and base reward value:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Weight ClassWeight RangeHelicopterBase RewardSpawn Chance
Light1500-2500 kgUH-1H Huey, UH-602 pts/500kg50%
Medium2501-5000 kgMi-8 Hip, Ka-503 pts/500kg30%
Heavy5001-8000 kgLarge Helos5 pts/500kg15%
Super Heavy8001-12000 kgCH-47 Chinook ONLY8 pts/500kg5%
- -

Reward Calculation Formula

-
- Final Reward = (Weight ÷ 500) × Base Multiplier × Condition Bonus -

- Example Light Crate (2000kg): - -
- -

⚠️ Condition-Based Multipliers - FLY CAREFULLY!

-

Crate health affects your reward! Damage reduces salvage value:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ConditionHealth RangeMultiplierExample (8pt base)
UNDAMAGED ✓≥ 90% health1.5x12 points (+50% BONUS!)
Damaged50-89% health1.0x8 points (normal)
Heavy Damage ⚠< 50% health0.5x4 points (-50% penalty)
DESTROYED ✗0% health0x0 points (crate lost)
- -
- Smooth flying = 50% bonus! Crash landing = 50% penalty! -
- -

Example Salvage Scenarios

- -
-

Scenario A: Light Crate, Perfect Delivery

- -
- -
-

Scenario B: Medium Crate, Rough Landing

- -
- -
-

Scenario C: Super Heavy Crate, Crashed

- -
- -
-

Scenario D: Heavy Crate, Destroyed

- -
- -

Sling-Load Salvage F10 Menu Commands

- - -

Spawn Restrictions

-

Salvage crates will NOT spawn:

- - -

Lifecycle & Warnings

- - -

💰 Using Salvage Points

- -

What Are Salvage Points?

-

Salvage points are a coalition-wide resource pool that allows you to build equipment that is normally out-of-stock at your current location.

- -

When Salvage Is Used

-

Salvage auto-applies when:

-
    -
  1. You request a crate that is OUT OF STOCK at nearest supply zone
  2. -
  3. Coalition has enough salvage points to cover the cost
  4. -
  5. Cost = item's required crate count (e.g., M1 Abrams = 3 crates = 3 salvage)
  6. -
- -

Salvage Balance

-

Check your coalition's salvage point balance:

-

F10 > Operations > MEDEVAC > Coalition Salvage Points

-

Or build/request menu will show salvage balance when out-of-stock

- -

🎯 Strategic Considerations

- -
-
-

MEDEVAC Advantages

-
    -
  • ✓ More consistent rewards (vehicle value-based)
  • -
  • ✓ Easier execution (normal troop pickup + land at MASH)
  • -
  • ✓ Lower skill requirement
  • -
  • ✓ Supports role-play/immersion
  • -
  • ✓ No condition penalties
  • -
-
-
-

Sling-Load Salvage Advantages

-
    -
  • ✓ Higher potential rewards (up to 160pts for perfect Chinook delivery!)
  • -
  • ✓ More frequent opportunities (every enemy kill = 15% chance)
  • -
  • ✓ Skill-based system (rewards good flying)
  • -
  • ✓ Can be done solo or coordinated
  • -
  • ✓ Creates dynamic battlefield scavenging gameplay
  • -
-
-
- -

Combined Strategy

-

Smart coalitions will:

- - -

🚀 Quick Reference

- -
-
-

MEDEVAC Quick Steps

-
    -
  1. Listen for MEDEVAC announcement (friendly vehicle crew spawned)
  2. -
  3. F10 > Ops > MEDEVAC > Vectors to Nearest Crew
  4. -
  5. Fly to location, follow smoke
  6. -
  7. Land near crew (auto-loads like troops)
  8. -
  9. Fly to MASH zone
  10. -
  11. Land and wait 15 seconds
  12. -
  13. Salvage awarded! Vehicle respawns shortly after.
  14. -
-
- -
-

Sling-Load Salvage Quick Steps

-
    -
  1. Listen for salvage spawn announcement (enemy died → crate spawned)
  2. -
  3. F10 > Navigation > Vectors to Nearest Salvage Crate
  4. -
  5. Fly to location (orange smoke = crate)
  6. -
  7. Use DCS F6 RADIO MENU > Sling Load > Hook Cargo
  8. -
  9. Fly carefully to Salvage Collection Zone
  10. -
  11. Land or drop crate inside zone
  12. -
  13. Salvage awarded based on weight + condition!
  14. -
-
-
- -

Key Differences

- - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureMEDEVACSling-Load Salvage
Pickup MethodHover pickup OR land → auto-loads troopsDCS F6 menu sling-load ONLY (not CTLD hover pickup!)
Reward TypeFixed value per vehicle typeVariable value based on weight + flying skill
Time Window1-hour window before crew KIA3-hour window before crate expires
Skill LevelEasy to MediumMedium to Hard (condition bonuses)
- -

🔧 Troubleshooting

- -

"I can't sling-load the salvage crate!"

- - -

"Crate disappeared before I got there!"

- - -

"I didn't get full reward for my delivery!"

- - -

"No MEDEVAC missions spawning!"

- - -

"Where do I create Salvage Collection Zones?"

- - -

⚙️ Configuration Notes

-

Mission makers can adjust:

- -

All settings are per-coalition and fully configurable via the CTLD config table.

- - -
- - \ No newline at end of file diff --git a/Moose_CTLD_Pure/Moose_CTLD.lua b/Moose_CTLD_Pure/Moose_CTLD.lua deleted file mode 100644 index 1d94d2b..0000000 --- a/Moose_CTLD_Pure/Moose_CTLD.lua +++ /dev/null @@ -1,13718 +0,0 @@ --- Pure-MOOSE, template-free CTLD-style logistics & troop transport --- Drop-in script: no MIST, no mission editor templates required --- Dependencies: Moose.lua must be loaded before this script --- Author: Copilot (generated) --- --- LOGGING SYSTEM: --- LogLevel configuration controls verbosity: 0=NONE, 1=ERROR, 2=INFO (default), 3=VERBOSE, 4=DEBUG --- Set LogLevel in config to reduce log spam on production servers. See LOGGING_GUIDE.md for details. - --- Contract --- Inputs: Config table or defaults. No ME templates needed. Zones may be named ME trigger zones or provided via coordinates in config. --- Outputs: F10 menus for helo/transport groups; crate spawning/building; troop load/unload; optional JTAC hookup (via FAC module); --- Error modes: missing Moose -> abort; unknown crate key -> message; spawn blocked in enemy airbase; zone missing -> message. --- --- Orignal Author of CTLD: Ciribob --- Moose adaptation: Lathe, Copilot, F99th-TracerFacer - --- #region Config - -local CTLD = {} -CTLD.Version = '1.0.1' -CTLD.__index = CTLD -CTLD._lastSalvageInterval = CTLD._lastSalvageInterval or 0 -CTLD._playerUnitPrefs = CTLD._playerUnitPrefs or {} - -local _msgGroup, _msgCoalition -local _log, _logError, _logInfo, _logVerbose, _logDebug, _logImmediate - --- General CTLD event messages (non-hover). Tweak freely. -CTLD.Messages = { - -- Crates - crate_spawn_requested = "Request received—spawning {type} crate at {zone}.", - pickup_zone_required = "Move within {zone_dist} {zone_dist_u} of a Supply Zone to request crates. Bearing {zone_brg}° to nearest zone.", - no_pickup_zones = "No Pickup Zones are configured for this coalition. Ask the mission maker to add supply zones or disable the pickup zone requirement.", - crate_re_marked = "Re-marking crate {id} with {mark}.", - crate_expired = "Crate {id} expired and was removed.", - crate_max_capacity = "Max load reached ({total}). Drop or build before picking up more.", - crate_aircraft_capacity = "Aircraft capacity reached ({current}/{max} crates). Your {aircraft} can only carry {max} crates.", - troop_aircraft_capacity = "Aircraft capacity reached. Your {aircraft} can only carry {max} troops (you need {count}).", - crate_spawned = "Crate’s live! {type} [{id}]. Bearing {brg}° range {rng} {rng_u}.\nCall for vectors if you need a hand.\n\nTo load: HOVER within 25m at 5-20m AGL, or LAND within 35m and hold for 25s.", - - -- Drops - drop_initiated = "Dropping {count} crate(s) here…", - dropped_crates = "Dropped {count} crate(s) at your location.", - no_loaded_crates = "No loaded crates to drop.", - - -- Build - build_insufficient_crates = "Insufficient crates to build {build}.", - build_requires_ground = "You have {total} crate(s) onboard—drop them first to build here.", - build_started = "Building {build} at your position…", - build_success = "{build} deployed to the field!", - build_success_coalition = "{player} deployed {build} to the field!", - build_failed = "Build failed: {reason}.", - fob_restricted = "FOB building is restricted to designated FOB zones.", - auto_fob_built = "FOB auto-built at {zone}.", - - -- Troops - troops_loaded = "Loaded {count} troops—ready to deploy.", - troops_unloaded = "Deployed {count} troops.", - troops_unloaded_coalition = "{player} deployed {count} troops.", - troops_fast_roped = "Fast-roped {count} troops into the field!", - troops_fast_roped_coalition = "{player} fast-roped {count} troops from {aircraft}!", - no_troops = "No troops onboard.", - troops_deploy_failed = "Deploy failed: {reason}.", - troop_pickup_zone_required = "Move inside a Supply Zone to load troops. Nearest zone is {zone_dist}, {zone_dist_u} away bearing {zone_brg}°.", - troop_load_must_land = "Must be on the ground to load troops. Land and reduce speed to < {max_speed} {speed_u}.", - troop_load_too_fast = "Ground speed too high for loading. Reduce to < {max_speed} {speed_u} (current: {current_speed} {speed_u}).", - troop_unload_altitude_too_high = "Too high for fast-rope deployment. Maximum: {max_agl} m AGL (current: {current_agl} m). Land or descend.", - troop_unload_altitude_too_low = "Too low for safe fast-rope. Minimum: {min_agl} m AGL (current: {current_agl} m). Climb or land.", - - -- Ground auto-load - ground_load_started = "{ground_line}\nHold position for {seconds}s to load {count} crate(s)...", - ground_load_progress = "{ground_line}\n{remaining}s remaining. Hold position.", - ground_load_complete = "{ground_line}\nLoaded {count} crate(s).", - ground_load_aborted = "Ground load aborted: aircraft moved or lifted off.", - ground_load_no_zone = "Ground auto-load requires being inside a Pickup Zone. Nearest zone: {zone_dist} {zone_dist_u} at {zone_brg}°.", - ground_load_no_crates = "No crates within {radius}m to load.", - - -- Coach & nav - vectors_to_crate = "Nearest crate {id}: bearing {brg}°, range {rng} {rng_u}.", - vectors_to_pickup_zone = "Nearest supply zone {zone}: bearing {brg}°, range {rng} {rng_u}.", - coach_enabled = "Hover Coach enabled.", - coach_disabled = "Hover Coach disabled.", - - -- Hover Coach guidance - coach_arrival = "You’re close—nice and easy. Hover at 5–20 meters.", - coach_close = "Reduce speed below 15 km/h and set 5–20 m AGL.", - coach_hint = "{hints} GS {gs} {gs_u}.", - coach_too_fast = "Too fast for pickup: GS {gs} {gs_u}. Reduce below 8 km/h.", - coach_too_high = "Too high: AGL {agl} {agl_u}. Target 5–20 m.", - coach_too_low = "Too low: AGL {agl} {agl_u}. Maintain at least 5 m.", - coach_drift = "Outside pickup window. Re-center within 25 m.", - coach_hold = "Oooh, right there! HOLD POSITION…", - coach_loaded = "Crate is hooked! Nice flying!", - coach_hover_lost = "Movement detected—recover hover to load.", - coach_abort = "Hover lost. Reacquire within 25 m, GS < 8 km/h, AGL 5–20 m.", - - -- Zone state changes - zone_activated = "{kind} Zone {zone} is now ACTIVE.", - zone_deactivated = "{kind} Zone {zone} is now INACTIVE.", - - -- Attack/Defend announcements - attack_enemy_announce = "{unit_name} deployed by {player} has spotted an enemy {enemy_type} at {brg}°, {rng} {rng_u}. Moving to engage!", - attack_base_announce = "{unit_name} deployed by {player} is moving to capture {base_name} at {brg}°, {rng} {rng_u}.", - attack_no_targets = "{unit_name} deployed by {player} found no targets within {rng} {rng_u}. Holding position.", - - jtac_onstation = "JTAC {jtac} on station. CODE {code}.", - jtac_new_target = "JTAC {jtac} lasing {target}. CODE {code}. POS {grid}.", - jtac_target_lost = "JTAC {jtac} lost target. Reacquiring.", - jtac_target_destroyed = "JTAC {jtac} reports target destroyed.", - jtac_idle = "JTAC {jtac} scanning for targets.", - - -- Zone restrictions - drop_forbidden_in_pickup = "Cannot drop crates inside a Supply Zone. Move outside the zone boundary.", - troop_deploy_forbidden_in_pickup = "Cannot deploy troops inside a Supply Zone. Move outside the zone boundary.", - drop_zone_too_close_to_pickup = "Drop Zone creation blocked: too close to Supply Zone {zone} (need at least {need} {need_u}; current {dist} {dist_u}). Fly further away and try again.", - - -- MEDEVAC messages - medevac_crew_spawned = "MEDEVAC REQUEST: {vehicle} crew at {grid}. {crew_size} personnel awaiting rescue. Salvage value: {salvage}.", - medevac_crew_loaded = "Rescued {vehicle} crew ({crew_size} personnel). {vehicle} will respawn shortly.", - medevac_vehicle_respawned = "{vehicle} repaired and returned to the field at original location!", - medevac_crew_delivered_mash = "{player} delivered {vehicle} crew to MASH. Earned {salvage} salvage points! Coalition total: {total}.", - medevac_crew_timeout = "MEDEVAC FAILED: {vehicle} crew at {grid} KIA - no rescue attempted. Vehicle lost.", - medevac_crew_killed = "MEDEVAC FAILED: {vehicle} crew killed in action. Vehicle lost.", - medevac_no_requests = "No active MEDEVAC requests.", - medevac_vectors = "MEDEVAC: {vehicle} crew bearing {brg}°, range {rng} {rng_u}. Time remaining: {time_remain} mins.", - medevac_salvage_status = "Coalition Salvage Points: {points}. Use salvage to build out-of-stock items.", - medevac_salvage_used = "Built {item} using {salvage} salvage points. Remaining: {remaining}.", - medevac_salvage_insufficient = "Out of stock. Requires {need} salvage points (need {deficit} more). Earn salvage by delivering MEDEVAC crews to MASH or sling-loading enemy wreckage.", - medevac_crew_warn_15min = "WARNING: {vehicle} crew at {grid} - rescue window expires in 15 minutes!", - medevac_crew_warn_5min = "URGENT: {vehicle} crew at {grid} - rescue window expires in 5 minutes!", - medevac_unload_hold = "MEDEVAC: Stay grounded in the MASH zone for {seconds} seconds to offload casualties.", - - -- Sling-Load Salvage messages - slingload_salvage_spawned = "SALVAGE OPPORTUNITY: Enemy wreckage at {grid}. Weight: {weight}kg, Est. Value: {reward}pts. {time_remain} remaining to collect!", - slingload_salvage_delivered = "{player} delivered {weight}kg salvage for {reward} points ({condition})! Coalition total: {total}", - slingload_salvage_expired = "SALVAGE LOST: Crate {id} at {grid} deteriorated.", - slingload_salvage_damaged = "CAUTION: Salvage crate damaged in transit. Value reduced to {reward}pts.", - slingload_salvage_vectors = "Nearest salvage crate {id}: bearing {brg}°, range {rng} {rng_u}. Weight: {weight}kg, Value: {reward}pts.", - slingload_salvage_no_crates = "No active salvage crates available.", - slingload_salvage_zone_created = "Salvage Collection Zone '{zone}' created at your position (radius: {radius}m).", - slingload_salvage_zone_activated = "Salvage Collection Zone '{zone}' is now ACTIVE.", - slingload_salvage_zone_deactivated = "Salvage Collection Zone '{zone}' is now INACTIVE.", - slingload_salvage_warn_30min = "SALVAGE REMINDER: Crate {id} at {grid} expires in 30 minutes. Weight: {weight}kg.", - slingload_salvage_warn_5min = "SALVAGE URGENT: Crate {id} at {grid} expires in 5 minutes!", - slingload_salvage_hooked_in_zone = "Salvage crate {id} is inside {zone}. Release the sling to complete delivery.", - slingload_salvage_wrong_zone = "Salvage crate {id} is sitting in {zone_type} zone {zone}. Take it to an active Salvage zone for credit.", - slingload_salvage_received_quips = { - "{player}: Leroy just whispered that's the smoothest receiving job he's seen since Jenkins tried the backwards hover.", - "Jenkins radios {player}, 'Keep receiving cargo like that and Mo might finally stop polishing his hook.'", - "Mo mutters, 'I thought we were receiving ammo, not a love letter, {player}.'", - "Leroy is yelling 'RECEIVE IT' like we're back at basic—nice work, {player}.", - "Jenkins keeps a scoreboard titled 'Most dramatic receiving'. Congrats, {player}, you're on top.", - "Mo claims he can hear the crate blush when {player} talks about receiving it.", - "Leroy swears the secret to receiving cargo is wink twice and yell 'Jenkins!'—apparently {player} nailed it.", - "Jenkins asked if {player} offers receiving lessons; I told him to practice on Mo's toolbox first.", - "Mo's diary entry tonight: '{player} received cargo and my rotor wash feelings.'", - "Leroy just gave {player} a 'World's Best Receiver' sticker; don't ask where he kept it.", - "Jenkins would like to know how {player} made receiving cargo look like interpretive dance.", - "Mo says the crate purred when {player} set it down. I blame Leroy's commentary.", - "Leroy keeps chanting 'receiver of the year' while pointing at {player}. Jenkins is jealous.", - "Jenkins tried to high five {player} mid-receive; Mo tackled him for safety reasons (probably).", - "Mo claims {player}'s receiving form violates at least three flirtation regulations.", - "Leroy just filed paperwork changing {player}'s callsign to 'Receiver Prime'.", - "Jenkins bet Mo twenty bucks {player} would blush while receiving. Pay up, Mo.", - "Mo suggests engraving {player}'s name on the salvage zone after that receive.", - "Leroy is teaching a receiving clinic now, curriculum: 'Be {player}'.", - "Jenkins whispered, 'Was it good for you, cargo?' right after {player} touched down.", - "Mo's clipboard has doodles of {player} receiving crates with heroic sparkles.", - "Leroy just threw fake rose petals over the zone as {player} finished receiving.", - "Jenkins swears he heard a saxophone during that receive. You owe the band, {player}.", - "Mo radioed, 'Easy on the receiving, {player}. Jenkins can't handle that much elegance.'", - "Leroy said {player}'s receiving style is 'spicy yet responsible'. I'm both impressed and confused.", - "Jenkins taped a 'Certified Receiver' badge on {player}'s dash. It's glittery. You're stuck with it.", - "Mo reckons {player} could receive a crate blindfolded; Leroy begged to test that theory.", - "Leroy keeps shouting 'stick the landing' but {player} already did—twice.", - "Jenkins requested that {player} narrate the next receiving so he can take notes.", - "Mo says if {player} receives one more crate like that, he'll start writing poetry.", - "Leroy just named this salvage drop 'Operation Receive and Believe' in {player}'s honor.", - "Jenkins said '{player} receives cargo like it's a surprise party and everyone's invited.'", - "Mo's new checklist: 1) Fuel 2) Ammo 3) Compliment {player}'s receiving technique.", - "Leroy tried to slow clap mid-receive; Jenkins confiscated his gloves.", - "Jenkins asked if {player} rehearsed that receive with mirrors. Mo said 'jealous much?'.", - "Mo beams, 'If receiving had judges, {player} just earned a 10 from Leroy and a dramatic sigh from Jenkins.'", - "Leroy told {player} to teach Jenkins how to receive without dropping his dignity.", - "Jenkins insists {player}'s receiving aura smells like jet fuel and confidence.", - "Mo logged today's weather as 'partly cloudy with a 100% chance of {player} receiving nicely.'", - "Leroy carved '{player} receives like a legend' into the ready room table. Again.", - "Jenkins wrote a haiku about that receiving: 'Crate softly descends / {player} grins / Mo steals the pen.'", - "Mo radioed 'next crate volunteers to be received by {player} only'. That's a policy now.", - "Leroy just asked supply for a 'Receiver of Renown' patch for {player}.", - "Jenkins claims he can feel the cargo sigh happily whenever {player} receives it.", - "Mo's schedule: 0900 watch {player} receive cargo, 0915 tease Jenkins about it.", - "Leroy calls {player}'s receiving style 'buttery smooth'. Jenkins now refuses to eat butter.", - "Jenkins left a sticky note on the crate: 'Thanks for receiving me gently, {player}.'", - "Mo wants to rename the salvage zone 'The {player} Receiving Lounge'.", - "Leroy drew hearts on the map where {player} usually receives cargo. Tactical? Maybe.", - "Jenkins petitioned command to play theme music every time {player} receives.", - "Mo refuses to stop chuckling about the way {player} said 'receiving' over comms.", - "Leroy says {player}'s receiving vibe is 'half heroics, half mischief'. Jenkins says 'all jealous'.", - "Jenkins asked if {player} could autograph the crate before sending it to depots.", - "Mo declared 'receiving is believing' after watching {player} today.", - "Leroy reenacting {player}'s receiving on the ramp is the finest comedy we've had all week.", - "Jenkins keeps practicing saying 'receiving' with the same swagger {player} has.", - "Mo whispers, 'Every time {player} receives cargo, a wrench somewhere falls in love.'", - "Leroy filed a noise complaint: 'Jenkins screaming while {player} receives is distracting.'", - "Jenkins now greets crates with 'prepare to be received by {player}—lucky you.'", - "Mo replaced the zone sign with 'Please announce yourself before {player} receives you.'", - "Leroy says the salvage crate winked at {player}. Jenkins is skeptical but also jealous.", - "Jenkins claims {player}'s receiving technique could calm a startled MANPAD crew.", - "Mo has a coffee mug that reads 'I watched {player} receive cargo and all I got was this latte.'", - "Leroy tried to choreograph a receiving dance for {player}; Jenkins tripped at step two.", - "Jenkins keeps bragging he called dibs on being {player}'s receiving hype man.", - "Mo scribbled 'receiving champion' under {player}'s name on the roster.", - "Leroy says {player}'s receiving voice has more bass than the AWACS channel.", - "Jenkins asked supply for velvet ropes to keep crowds away while {player} receives.", - "Mo's new ringtone is {player} saying 'receiving'. Leroy set it as his alarm too.", - "Leroy's advice to rookies: 'Just copy whatever {player} does when receiving.'", - "Jenkins says he needs sunglasses to watch {player} receive because it's that dazzling.", - "Mo keeps muttering 'receiving goals' every time {player} touches down in the zone.", - "Leroy left chalk arrows around the FARP labeled 'This way to watch {player} receive.'", - "Jenkins insists the crate asked for {player}'s comm frequency after that receive.", - "Mo bet the maintenance crew that {player} could receive cargo upside down. Please don't try it.", - "Leroy's latest call sign suggestion for {player}: 'Receiver Supreme'.", - "Jenkins laminated a card that says 'Ask me about {player}'s receiving technique.'", - "Mo says the wind socks lean toward {player} out of respect whenever receiving begins.", - "Leroy drew a cartoon of {player} receiving cargo while Jenkins fans them with a checklist.", - "Jenkins keeps replaying the cockpit tape of {player} saying 'receiving' on loop.", - "Mo told supply to send extra polish for the pad because {player} only receives on shiny decks.", - "Leroy swears he heard the crate whisper 'thanks, {player}' as it touched down.", - "Jenkins offers motivational speeches to crates before {player} arrives, just to set the mood.", - "Mo added 'compliment {player}'s receiving tone' to the preflight checklist.", - "Leroy refuses to call it unloading anymore; it's 'the {player} receiving ritual'.", - "Jenkins keeps practicing finger guns for when {player} calls 'receiving'.", - "Mo doodled {player} surfing on a crate labeled 'Receiving Champion'.", - "Leroy renamed the F10 menu option to 'Let {player} receive it'. QA is furious.", - "Jenkins says whenever {player} receives cargo, somewhere a sim pilot sheds a proud tear.", - "Mo now greets every crate with 'Ready to be received {player}-style?'.", - "Leroy told the intel guys to log {player}'s receiving pattern as a morale asset.", - "Jenkins claims {player}'s receiving aura smells like hydraulic fluid and heroics.", - "Mo keeps a chalkboard tally titled '{player}'s Receives vs Jenkins' Complaints'. Receives win.", - "Leroy is convinced {player}'s receiving callouts add five knots to every rotorcraft nearby.", - "Jenkins practices saying 'nice receiving' in the mirror so he doesn't squeak on comms.", - "Mo decorated the salvage zone with disco lights for the next time {player} receives.", - "Leroy asked PAO for a documentary called 'Receiving with {player}'.", - "Jenkins swears {player}'s receiving cadence syncs perfectly with the base siren. Spooky.", - "Mo now ends every debrief with 'and that's how {player} receives cargo, folks.'", - "Leroy wrote a limerick about {player} receiving; Jenkins begged him not to recite it.", - "Jenkins told the new guy 'if {player} says receiving, salute the crate.'", - "Mo keeps drawing diagrams titled 'Ideal Receiving Cones' with {player} stick figures.", - "Leroy asked meteorology for a forecast of '{player} receiving with 100% sass'.", - "Jenkins says hearing {player} say 'receiving' cured his fear of autorotations.", - "Mo replaced the salvage beacon tone with {player} humming the receiving tune.", - "Leroy told Jenkins, 'If you can't receive like {player}, at least clap rhythmically.'", - "Jenkins is workshopping a catchphrase: '{player} receives, Mo believes, Leroy deceives.'", - "Mo says the only thing smoother than {player}'s receiving is Leroy's questionable pickup lines.", - "Leroy wants to build a statue of {player} holding a crate; Jenkins suggested maybe start with a sticker.", - "Jenkins insists {player}'s receiving voice lowers enemy morale by 10%. Science-ish.", - "Mo has a bingo card of {player}'s receiving compliments; he's already got blackout.", - "Leroy now ends every briefing with 'remember, let {player} receive first'.", - "Jenkins swears his headset auto-tunes whenever {player} says 'receiving'.", - "Mo just said, 'If receiving had medals, {player} would need a bigger flight suit.'", - "Leroy warns crates, 'If {player} receives you, expect fireworks and Jenkins squealing.'", - "Jenkins' new mantra: 'Breathe in rotor wash, breathe out {player}'s receiving tips.'", - "Mo says {player}'s receiving swagger should be issued with the flight manual.", - "Leroy doodled {player} riding a crate labeled 'Receiving Express'—Mo framed it.", - "Jenkins told logistics, 'Mark that crate FRAGILE, {player} receives with feelings.'", - "Mo now pronounces 'receiving' with extra syllables whenever {player} is on station.", - "Leroy thinks {player}'s receiving just added three morale points to the whole AO.", - "Jenkins said he'd write a sonnet about {player}'s receiving if he knew what a sonnet was.", - "Mo just asked if we could get {player} to receive the mail too, because wow.", - "Leroy polished the landing zone so {player}'s next receiving feels fancy.", - "Jenkins is holding up scorecards every time {player} says 'receiving'. The numbers keep climbing.", - "Mo claims {player}'s receiving is now a controlled substance in three states.", - "Leroy told everyone to clear the pad—'{player} needs room to receive with flair!'.", - "Jenkins thinks {player}'s receiving tone should replace the standard 'cargo secure' call.", - "Mo concluded today's briefing with 'Step 1: Let {player} receive. Step 2: Profit.'", - "Leroy keeps whispering 'look how {player} receives' like it's a wildlife documentary.", - "Jenkins renamed his playlist 'Songs to Receive Cargo Like {player}'.", - "Mo's checklist scribble says 'Remember to compliment {player} after receiving'.", - "Leroy just added 'receiving swagger' to the SOP because of {player}.", - "Jenkins insists {player}'s receiving posture cured his back pain. Untested claim.", - "Mo now uses '{player}-level receiving' as a unit of measurement for excellence.", - "Leroy stuck a note on the crate: 'You were received by {player}. You're welcome.'", - "Jenkins laughed so hard at {player}'s receiving banter that he nearly dropped his clipboard.", - "Mo just declared {player} the patron saint of receiving, halo made of tie-down straps.", - "Leroy vows to shout 'RECEIVE IT' every time {player} descends, purely for morale.", - "Jenkins says {player}'s receiving swagger should be bottled and issued to recruits.", - }, - medevac_unload_aborted = "MEDEVAC: Unload aborted - {reason}. Land and hold for {seconds} seconds.", - - -- Mobile MASH messages - medevac_mash_deployed = "Mobile MASH {mash_id} deployed at {grid}. Beacon: {freq}. Delivering MEDEVAC crews here earns salvage points.", - medevac_mash_announcement = "Mobile MASH {mash_id} available at {grid}. Beacon: {freq}.", - medevac_mash_destroyed = "Mobile MASH {mash_id} destroyed! No longer accepting deliveries.", - mash_announcement = "MASH {name} operational at {grid}. Accepting MEDEVAC deliveries for salvage credit. Monitoring {freq} AM.", - mash_vectors = "Nearest MASH: {name} at bearing {brg}°, range {rng} {rng_u}.", - mash_no_zones = "No MASH zones available.", -} - --- #endregion Messaging - -CTLD.Config = { - -- === Instance & Access === - CoalitionSide = coalition.side.BLUE, -- default coalition this instance serves (menus created for this side) - CountryId = nil, -- optional explicit country id for spawned groups; falls back per coalition - AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB) - 'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','Ka-50','Ka-50_3','AH-64D_BLK_II','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI' - }, - -- === Runtime & Messaging === - -- Logging control: set the desired level of detail for env.info logging to DCS.log - -- 0 = NONE - No logging at all (production servers) - -- 1 = ERROR - Only critical errors and warnings - -- 2 = INFO - Important state changes, initialization, cleanup (default for production) - -- 3 = VERBOSE - Detailed operational info (zone validation, menus, builds, MEDEVAC events) - -- 4 = DEBUG - Everything including hover checks, crate pickups, detailed troop spawns - LogLevel = 1, -- lowered from DEBUG (4) to INFO (2) for production performance - MessageDuration = 15, -- seconds for on-screen messages - - -- Debug toggles for detailed crate proximity logging (useful when tuning hover coach / ground autoload) - DebugHoverCrates = false, - DebugHoverCratesInterval = 1.0, -- seconds between hover debug log bursts (per aircraft) - DebugHoverCratesStep = 25, -- log again when nearest crate distance changes by this many meters - DebugGroundCrates = false, - DebugGroundCratesInterval = 2.0, -- seconds between ground debug log bursts (per aircraft) - DebugGroundCratesStep = 10, -- log again when nearest crate distance changes by this many meters - - -- === Menu & Catalog === - UseGroupMenus = true, -- if true, F10 menus per player group; otherwise coalition-wide (leave this alone) - CreateMenuAtMissionStart = false, -- creates empty root menu at mission start to reserve F10 position (populated on player spawn) - RootMenuName = 'CTLD', -- name for the root F10 menu; menu ordering depends on script load order in mission editor - UseCategorySubmenus = true, -- if true, organize crate requests by category submenu (menuCategory) - UseBuiltinCatalog = false, -- start with the shipped catalog (true) or expect mission to load its own (false) - - -- === Transport Capacity === - -- Default capacities for aircraft not listed in AircraftCapacities table - -- Used as fallback for any transport aircraft without specific limits defined - DefaultCapacity = { - maxCrates = 4, -- reasonable middle ground - maxTroops = 12, -- moderate squad size - maxWeightKg = 2000, -- default weight capacity in kg (omit to disable weight modeling) - }, - - -- Per-aircraft capacity limits (realistic cargo/troop capacities) - -- Set maxCrates = 0 and maxTroops = 0 for attack helicopters with no cargo capability - -- If an aircraft type is not listed here, it will use DefaultCapacity values - -- maxWeightKg: optional weight capacity in kilograms (if omitted, only count limits apply) - -- requireGround: optional override for ground requirement (true = must land, false = can load in hover/flight) - -- maxGroundSpeed: optional override for max ground speed during loading (m/s) - AircraftCapacities = { - -- Small/Light Helicopters (very limited capacity) - ['SA342M'] = { maxCrates = 1, maxTroops = 3, maxWeightKg = 400 }, -- Gazelle - tiny observation/scout helo - ['SA342L'] = { maxCrates = 1, maxTroops = 3, maxWeightKg = 400 }, - ['SA342Minigun'] = { maxCrates = 1, maxTroops = 3, maxWeightKg = 400 }, - ['GazelleAI'] = { maxCrates = 1, maxTroops = 3, maxWeightKg = 400 }, - - -- Attack Helicopters (no cargo capacity - combat only) - ['Ka-50'] = { maxCrates = 0, maxTroops = 0, maxWeightKg = 0 }, -- Black Shark - single seat attack - ['Ka-50_3'] = { maxCrates = 0, maxTroops = 0, maxWeightKg = 0 }, -- Black Shark 3 - ['AH-64D_BLK_II'] = { maxCrates = 0, maxTroops = 0, maxWeightKg = 0 }, -- Apache - attack/recon only - ['Mi-24P'] = { maxCrates = 2, maxTroops = 8, maxWeightKg = 1000 }, -- Hind - attack helo but has small troop bay - - -- Light Utility Helicopters (moderate capacity) - ['UH-1H'] = { maxCrates = 3, maxTroops = 11, maxWeightKg = 1800 }, -- Huey - classic light transport - - -- Medium Transport Helicopters (good capacity) - ['Mi-8MTV2'] = { maxCrates = 5, maxTroops = 24, maxWeightKg = 4000 }, -- Hip - Russian medium transport - ['Mi-17'] = { maxCrates = 5, maxTroops = 24, maxWeightKg = 4000 }, -- Hip variant - ['UH-60L'] = { maxCrates = 4, maxTroops = 11, maxWeightKg = 4000 }, -- Black Hawk - medium utility - - -- Heavy Lift Helicopters (maximum capacity) - ['CH-47Fbl1'] = { maxCrates = 10, maxTroops = 33, maxWeightKg = 12000 }, -- Chinook - heavy lift beast - ['CH-47F'] = { maxCrates = 10, maxTroops = 33, maxWeightKg = 12000 }, -- Chinook variant - - -- Fixed Wing Transport (limited capacity) - -- NOTE: C-130 has requireGround configurable - set to false if you want to allow in-flight loading (unrealistic but flexible) - ['C-130'] = { maxCrates = 20, maxTroops = 92, maxWeightKg = 20000, requireGround = true, maxGroundSpeed = 1.0 }, -- C-130 Hercules - tactical airlifter (must be fully stopped) - ['C-17A'] = { maxCrates = 30, maxTroops = 150, maxWeightKg = 77500, requireGround = true, maxGroundSpeed = 1.0 }, -- C-17 Globemaster III - strategic airlifter - }, - - -- === Loading & Deployment Rules === - RequireGroundForTroopLoad = true, -- must be landed to load troops (prevents loading while hovering) - RequireGroundForVehicleLoad = true, -- must be landed to load vehicles (C-130/large transports) - MaxGroundSpeedForLoading = 2.0, -- meters/second limit while loading (roughly 4 knots) - - -- Fast-rope deployment (allows troop unload while hovering at safe altitude) - EnableFastRope = true, -- if true, troops can fast-rope from hovering helicopters - FastRopeMaxHeight = 20, -- meters AGL: maximum altitude for fast-rope deployment - FastRopeMinHeight = 5, -- meters AGL: minimum altitude for fast-rope deployment (too low = collision risk) - - -- Safety offsets to avoid spawning units too close to player aircraft - BuildSpawnOffset = 40, -- meters: shift build point forward from the aircraft (0 = spawn centered on aircraft) - TroopSpawnOffset = 25, -- meters: shift troop unload point forward from the aircraft - DropCrateForwardOffset = 35, -- meters: drop loaded crates this far in front of the aircraft - - -- === Build & Crate Handling === - BuildRequiresGroundCrates = true, -- required crates must be on the ground (not still carried) - BuildRadius = 60, -- meters around build point to collect crates - RestrictFOBToZones = false, -- only allow FOB recipes inside configured FOBZones - AutoBuildFOBInZones = false, -- auto-build FOB recipes when required crates are inside a FOB zone - CrateLifetime = 3600, -- seconds before crates auto-clean up; 0 = disable - - -- Build safety - BuildConfirmEnabled = false, -- require a second confirmation within a short window before building - BuildConfirmWindowSeconds = 30, -- seconds allowed between first and second "Build Here" press - BuildCooldownEnabled = true, -- impose a cooldown before allowing another build by the same group - BuildCooldownSeconds = 60, -- seconds of cooldown after a successful build per group - - -- === Pickup & Drop Zone Rules === - RequirePickupZoneForCrateRequest = true, -- enforce that crate requests must be near a Supply (Pickup) Zone - RequirePickupZoneForTroopLoad = true, -- troops can only be loaded while inside a Supply (Pickup) Zone - PickupZoneMaxDistance = 10000, -- meters; nearest pickup zone must be within this distance to allow a request - ForbidDropsInsidePickupZones = true, -- block crate drops while inside a Pickup Zone - ForbidTroopDeployInsidePickupZones = true, -- block troop deploy while inside a Pickup Zone - ForbidChecksActivePickupOnly = true, -- when true, restriction applies only to ACTIVE pickup zones; false blocks all configured pickup zones - - -- Dynamic Drop Zone settings - DropZoneRadius = 500, -- meters: radius used when creating a Drop Zone via the admin menu at player position - MinDropZoneDistanceFromPickup = 2000, -- meters: minimum distance from nearest Pickup Zone required to create a dynamic Drop Zone (0 to disable) - MinDropDistanceActivePickupOnly = true, -- when true, only ACTIVE pickup zones are considered for the minimum distance check - - -- === Pickup Zone Spawn Placement === - PickupZoneSpawnRandomize = true, -- spawn crates at a random point within the pickup zone (avoids stacking) - PickupZoneSpawnEdgeBuffer = 20, -- meters: keep spawns at least this far inside the zone edge - PickupZoneSpawnMinOffset = 75, -- meters: keep spawns at least this far from the exact center - CrateSpawnMinSeparation = 7, -- meters: try not to place a new crate closer than this to an existing one - CrateSpawnSeparationTries = 6, -- attempts to find a non-overlapping position before accepting best effort - CrateClusterSpacing = 8, -- meters: spacing used when clustering crates within a bundle - PickupZoneSmokeColor = trigger.smokeColor.Green, -- default smoke color when spawning crates at pickup zones - - -- Crate Smoke Settings - -- NOTE: Individual smoke effects last ~5 minutes (DCS hardcoded, cannot be changed) - -- These settings control whether/how often NEW smoke is spawned, not how long each smoke lasts - CrateSmoke = { - Enabled = true, -- spawn smoke when crates are created; if false, no smoke at all - AutoRefresh = false, -- automatically spawn new smoke every RefreshInterval seconds - RefreshInterval = 240, -- seconds: how often to spawn new smoke (only used if AutoRefresh = true) - MaxRefreshDuration = 600, -- seconds: stop auto-refresh after this long (safety limit) - OffsetMeters = 0, -- meters: horizontal offset from crate so helicopters don't hover in smoke - OffsetRandom = true, -- if true, randomize horizontal offset direction; if false, always offset north - OffsetVertical = 20, -- meters: vertical offset above ground level (helps smoke be more visible) - }, - - -- === Autonomous Assets === - -- Air-spawn settings for CTLD-built drones (AIRPLANE catalog entries like MQ-9 / WingLoong) - DroneAirSpawn = { - Enabled = true, -- when true, AIRPLANE catalog items that opt-in can spawn in the air at a set altitude - AltitudeMeters = 5000, -- default spawn altitude ASL (meters) - SpeedMps = 120 -- default initial speed in m/s - }, - - JTAC = { - Enabled = true, - Verbose = false, -- when true, emit detailed JTAC registration & target scan logs - AutoLase = { - Enabled = true, - SearchRadius = 8000, -- meters to scan for enemy targets - RefreshSeconds = 15, -- seconds between active target updates - IdleRescanSeconds = 30, -- seconds between scans when no target locked - LostRetrySeconds = 10, -- wait before trying to reacquire after transport/line-of-sight loss - TransportHoldSeconds = 10, -- defer lase loop while JTAC is in transport (group empty) - }, - Smoke = { - Enabled = true, - ColorBlue = trigger.smokeColor.Orange, - ColorRed = trigger.smokeColor.Green, - RefreshSeconds = 300, -- seconds between smoke refreshes on active targets - OffsetMeters = 5, -- random offset radius for smoke placement - }, - LaserCodes = { '1688','1677','1666','1113','1115','1111' }, - LockType = 'all', -- 'all' | 'vehicle' | 'troop' - Announcements = { - Enabled = true, - Duration = 15, - }, - - }, - - -- === Combat Automation === - AttackAI = { - Enabled = true, -- master switch for attack behavior - TroopSearchRadius = 6000, -- meters: when deploying troops with Attack, search radius for targets/bases - VehicleSearchRadius = 12000, -- meters: when building vehicles with Attack, search radius - PrioritizeEnemyBases = true, -- if true, prefer enemy-held bases over ground units when both are in range - TroopAdvanceSpeedKmh = 20, -- movement speed for troops when ordered to attack - VehicleAdvanceSpeedKmh = 35, -- movement speed for vehicles when ordered to attack - }, - - -- === Visual Aids === - -- Optional: draw zones on the F10 map using trigger.action.* markup (ME Draw-like) - MapDraw = { - Enabled = true, -- master switch for any map drawings created by this script - DrawPickupZones = true, -- draw Pickup/Supply zones as shaded circles with labels - DrawDropZones = true, -- optionally draw Drop zones - DrawFOBZones = true, -- optionally draw FOB zones - DrawMASHZones = true, -- optionally draw MASH (medical) zones - DrawSalvageZones = true, -- optionally draw Salvage Collection zones - FontSize = 18, -- label text size - ReadOnly = true, -- prevent clients from removing the shapes - ForAll = false, -- if true, draw shapes to all (-1) instead of coalition only (useful for testing/briefing) - OutlineColor = {1, 1, 0, 0.85}, -- RGBA 0..1 for outlines (bright yellow) - -- Optional per-kind fill overrides - FillColors = { - Pickup = {0, 1, 0, 0.15}, -- light green fill for Pickup zones - Drop = {0, 0, 0, 0.25}, -- black fill for Drop zones - FOB = {1, 1, 0, 0.15}, -- yellow fill for FOB zones - MASH = {1, 0.75, 0.8, 0.25}, -- pink fill for MASH zones - SalvageDrop = {1, 0, 1, 0.15}, -- magenta fill for Salvage zones - }, - LineType = 1, -- default line type if per-kind is not set (0 None, 1 Solid, 2 Dashed, 3 Dotted, 4 DotDash, 5 LongDash, 6 TwoDash) - LineTypes = { -- override border style per zone kind - Pickup = 3, -- dotted - Drop = 2, -- dashed - FOB = 4, -- dot-dash - MASH = 1, -- solid - SalvageDrop = 2, -- dashed - }, - -- Label placement tuning (simple): - -- Effective extra offset from the circle edge = r * LabelOffsetRatio + LabelOffsetFromEdge - LabelOffsetFromEdge = -50, -- meters beyond the zone radius to place the label (12 o'clock) - LabelOffsetRatio = 0.5, -- fraction of the radius to add to the offset (e.g., 0.1 => +10% of r) - LabelOffsetX = 200, -- meters: horizontal nudge; adjust if text appears left-anchored in your DCS build - -- Per-kind label prefixes - LabelPrefixes = { - Pickup = 'Supply', - Drop = 'Drop', - FOB = 'FOB', - MASH = 'MASH', - SalvageDrop = 'Salvage', - } - }, - - -- === Inventory & Troops === - -- Inventory system (per pickup zone and FOBs) - Inventory = { - Enabled = true, -- master switch for per-location stock control - FOBStockFactor = 0.50, -- starting stock at newly built FOBs relative to pickup-zone initialStock - ShowStockInMenu = true, -- append simple stock hints to menu labels (per current nearest zone) - HideZeroStockMenu = false, -- removed: previously created an "In Stock Here" submenu; now disabled by default - }, - - -- Troop type presets (menu-driven loadable teams) - Troops = { - DefaultType = 'AS', -- default troop type to use when no specific type is chosen - -- Team definitions: loaded from catalog via _CTLD_TROOP_TYPES global - -- If no catalog is loaded, empty table is used (and fallback logic applies) - TroopTypes = {}, - }, - - -- === Zone Tables === - -- Mission makers should populate these arrays with zone definitions - -- Each zone entry can be: { name = 'ZoneName' } or { name = 'ZoneName', flag = 9001, activeWhen = 0, smoke = color, radius = meters } - Zones = { - PickupZones = {}, -- Supply zones where crates/troops can be requested - DropZones = {}, -- Optional Drop/AO zones - FOBZones = {}, -- FOB zones (restrict FOB building to these if RestrictFOBToZones = true) - MASHZones = {}, -- Medical zones for MEDEVAC crew delivery (MASH = Mobile Army Surgical Hospital) - SalvageDropZones = {}, -- Salvage collection zones for sling-load salvage delivery - }, - - -- === Sling-Load Salvage System === - -- Spawn salvageable crates when enemy units are destroyed; deliver to collection zones for rewards - SlingLoadSalvage = { - Enabled = true, - - -- Spawn probability when enemy ground units die - SpawnChance = { - [coalition.side.BLUE] = 0.20, -- 20% chance when BLUE unit dies (RED can collect the salvage) - [coalition.side.RED] = 0.20, -- 20% chance when RED unit dies (BLUE can collect the salvage) - }, - - -- Weight classes with spawn probabilities and reward rates - WeightClasses = { - { name = 'Light', min = 500, max = 1000, probability = 0.50, rewardPer500kg = 2 }, -- Huey-capable - { name = 'Medium', min = 2501, max = 5000, probability = 0.30, rewardPer500kg = 3 }, -- Hip/Mi-8 - { name = 'Heavy', min = 5001, max = 8000, probability = 0.15, rewardPer500kg = 5 }, -- Large helos - { name = 'SuperHeavy', min = 8001, max = 12000, probability = 0.05, rewardPer500kg = 8 }, -- Chinook only - }, - - -- Condition-based reward multipliers (based on crate health when delivered) - ConditionMultipliers = { - Undamaged = 1.5, -- >= 90% health - Damaged = 1.0, -- 50-89% health - HeavyDamage = 0.5, -- < 50% health - }, - - CrateLifetime = 3600, -- 1 hour (seconds) - WarningTimes = { 1800, 300 }, -- Warn at 30min and 5min remaining - - -- Visual indicators - SpawnSmoke = false, - SmokeDuration = 120, -- 2 minutes - SmokeColor = trigger.smokeColor.Orange, - MaxActiveCrates = 40, -- hard cap on simultaneously spawned salvage crates per coalition - AdaptiveIntervals = { idle = 10, low = 20, medium = 25, high = 30 }, - - -- Spawn restrictions - MinSpawnDistance = 25, -- meters from death location - MaxSpawnDistance = 45, -- meters from death location - NoSpawnNearPickupZones = true, - NoSpawnNearPickupZoneDistance = 1000, -- meters - NoSpawnNearAirbasesKm = 1, - - DetectionInterval = 5, -- seconds between salvage zone checks - - -- Cargo static types (DCS sling-loadable cargo) - CargoTypes = { - 'container_cargo', - 'ammo_cargo', - 'fueltank_cargo', - 'barrels_cargo', - }, - - -- Salvage Collection Zone defaults - DefaultZoneRadius = 300, - DynamicZoneLifetime = 5400, -- seconds a player-created zone stays active (0 disables auto-expiry) - MaxDynamicZones = 6, -- cap player-created zones per coalition instance (oldest retire first) - ZoneColors = { - border = {1, 0.5, 0, 0.85}, -- orange border - fill = {1, 0.5, 0, 0.15}, -- light orange fill - }, - }, -} - -- #endregion Config - --- Immersive Hover Coach configuration (messages, thresholds, throttling) --- All user-facing text lives here; logic only fills placeholders. -CTLD.HoverCoachConfig = { - enabled = true, -- master switch for hover coaching feature - coachOnByDefault = true, -- per-player default; players can toggle via F10 > Navigation > Hover Coach - - -- Pickup parameters - maxCratesPerLoad = 6, -- maximum crates the aircraft can carry simultaneously - autoPickupDistance = 25, -- meters max search distance for candidate crates - - thresholds = { - arrivalDist = 1000, -- m: start guidance "You're close…" - closeDist = 100, -- m: reduce speed / set AGL guidance - precisionDist = 8, -- m: start precision hints - captureHoriz = 10, -- m: horizontal sweet spot radius - captureVert = 10, -- m: vertical sweet spot tolerance around AGL window - aglMin = 5, -- m: hover window min AGL - aglMax = 20, -- m: hover window max AGL - maxGS = 8/3.6, -- m/s: 8 km/h for precision, used for errors - captureGS = 4/3.6, -- m/s: 4 km/h capture requirement - maxVS = 2.0, -- m/s: absolute vertical speed during capture - driftResetDist = 13, -- m: if beyond, reset precision phase - stabilityHold = 2.0 -- s: hold steady before loading - }, - - throttle = { - coachUpdate = 3.0, -- s between hint updates in precision - generic = 3.0, -- s between non-coach messages - repeatSame = 6.0 -- s before repeating same message key - }, -} - --- ========================= --- Ground Auto-Load Configuration --- ========================= --- Automatic crate loading while landed (for pilots who prefer not to hover) -CTLD.GroundAutoLoadConfig = { - Enabled = true, -- master switch for ground auto-load feature - LoadDelay = 25, -- seconds to hold position on ground before auto-loading - GroundContactAGL = 3.5, -- meters AGL considered "on the ground" (matches MEDEVAC) - MaxGroundSpeed = 2.0, -- m/s maximum ground speed during loading (~4 knots) - SearchRadius = 35, -- meters to search for nearby crates - AbortGrace = 2, -- seconds of movement/liftoff tolerated before aborting - RequirePickupZone = true, -- MUST be inside a pickup zone to auto-load (prevents drop/re-pickup loops) - AllowInFOBZones = true, -- also allow auto-load in FOB zones (once built) -} - -CTLD.GroundLoadComms = { - ProgressInterval = 5, - Start = { - "Loadmaster: Copy {count} crate(s). Give us {seconds}s to round up the rollers.", - "Ramp boss says {seconds}s and L. Jenkins will have those {count} crate(s) chained down.", - "Crew chief: {count} crate(s) inbound—stay planted for {seconds}s.", - "Forklift mafia deputized Leroy to kidnap {count} crate(s) in {seconds}s.", - "Ground crew brewing a plan: {count} crate(s) in {seconds}s.", - "Cargo gnomes awake—{seconds}s to wrangle {count} crate(s).", - "Engineers counting {count} crate(s); set a timer for {seconds}s.", - "Deck boss: {seconds}s of zen before {count} crate(s) clack aboard.", - "Log cell crunches numbers: {count} crate(s) move in {seconds}s.", - "Supply sergeant wants {seconds}s to line up {count} crate(s).", - "Palettes staged—{count} crate(s) climbing aboard after {seconds}s.", - "Ramp trolls wave: {seconds}s pause, {count} crate(s) prize.", - "Hook teams prepping—{count} crate(s) latched in {seconds}s.", - "Handler: keep rotors calm for {seconds}s; {count} crate(s) en route.", - "Deck boss hums while Jenkins L salts {count} crate(s) in {seconds}s.", - "Logistics whisperer: {seconds}s to sweet-talk {count} crate(s).", - "Crate wrangler: {count} boxen saddled after {seconds}s.", - "Crew phones mom: {count} crate(s) adopt you in {seconds}s.", - "Load team stretching—{seconds}s till {count} crate(s) leap aboard.", - "Forklift rave: {count} crate(s) crowd-surfing in {seconds}s.", - "Ammo guys promise {seconds}s to leash {count} crate(s).", - "Supply goblins: {count} crate(s) conjured after {seconds}s.", - "Winch crew rolling cables—{seconds}s countdown for {count} crate(s).", - "Deck judge bangs gavel: {count} crate(s) filed in {seconds}s.", - "Ramp DJ cues track—{seconds}s jam for {count} crate(s).", - "Hangar rats: {count} crate(s) tango aboard in {seconds}s.", - "Pit crew swapped tires; {seconds}s to fuel {count} crate(s).", - "Clipboard ninja checking boxes—{count} crate(s) ready in {seconds}s.", - "Dock boss sharpening pencils: {count} crate(s) manifest in {seconds}s.", - "Groundlings choreograph {count} crate(s) ballet—{seconds}s rehearsal.", - "Supply monks meditate {seconds}s to summon {count} crate(s).", - "Winch whisperer: {count} crate(s) ascend in {seconds}s.", - "Ramp champion bets {seconds}s for {count} crate(s).", - "Crew lounge evacuated; {count} crate(s) arriving in {seconds}s.", - "Load shack scoreboard: {seconds}s to snag {count} crate(s).", - "Logi wizard scribbles runes—{count} crate(s) appear after {seconds}s.", - "Deck sergeant orders {seconds}s freeze; {count} crate(s) inbound.", - "Cargo penguins waddling—{seconds}s to herd {count} crate(s).", - "Hangar bard plays; {count} crate(s) drop beat in {seconds}s.", - "Ramp dragon yawns: {seconds}s before {count} crate(s) charred.", - "Supply pirates shout—{count} crate(s) plundered in {seconds}s.", - "Ground crew printing receipts—{seconds}s to notarize {count} crate(s).", - "Forklift derby lights up; {count} crate(s) cross line in {seconds}s.", - "Load ninja breathes—{seconds}s later {count} crate(s) vanish aboard.", - "Deck boss bribes gravity; {count} crate(s) float up in {seconds}s.", - "Ammo elves: {seconds}s swirl to gift-wrap {count} crate(s).", - "Ramp philosopher ponders {count} crate(s) for {seconds}s.", - "Crew chef prepping snacks; {count} crate(s) served in {seconds}s.", - "Crate wrangler ties boots—{seconds}s to rope {count} crate(s).", - "Paladin of pallets: {count} crate(s) blessed in {seconds}s.", - "Load doc scribbles—{seconds}s to sign {count} crate(s).", - "Ground squirrels stash {count} crate(s) after {seconds}s.", - "Deck poet recites; {count} crate(s) respond in {seconds}s.", - "Winch gremlin oils gears—{seconds}s for {count} crate(s).", - "Ramp hype crew chants {seconds}s mantra for {count} crate(s).", - "Supply DJ scratching—{count} crate(s) drop bass in {seconds}s.", - "Cargo therapist assures {count} crate(s) in {seconds}s.", - "Crew zookeeper wrangles {count} crate(s) herd—{seconds}s.", - "Deck botanist grows {count} crate(s) vines in {seconds}s.", - "Load astronomer charts {count} crate(s) orbit—{seconds}s.", - "Ramp comedian promises laughs for {seconds}s then {count} crate(s).", - "Hangar historian says {count} crate(s) arrive in {seconds}s per tradition.", - "Supply drummer counts in {seconds}s for {count} crate(s).", - "Deck meteorologist predicts {count} crate(s) storm in {seconds}s.", - "Cargo architect sketches {count} crate(s) stacking plan—{seconds}s.", - "Ramp coder debugs manifest; {count} crate(s) compile in {seconds}s.", - "Load barista pulls espresso—{count} crate(s) perk up in {seconds}s.", - "Ground bard writes sea shanty; {count} crate(s) join in {seconds}s.", - "Supply prankster hides {count} crate(s); reveal in {seconds}s.", - "Ramp alchemist mixes fuel—{count} crate(s) transmute after {seconds}s.", - "Crate whisperer says hold {seconds}s for {count} crate(s).", - "Deck detective tracks {count} crate(s) trail—{seconds}s ETA.", - "Load beekeeper herds {count} crate(s) swarm—{seconds}s.", - "Ground tailor stitches nets; {count} crate(s) fitted in {seconds}s.", - "Supply DJ rewinds—{seconds}s then {count} crate(s) drop.", - "Ramp cloud-gazer sees {count} crate(s) in {seconds}s forecast.", - "Load punster drafts {count} crate(s) jokes—{seconds}s needed.", - "Deck volcanologist warns {count} crate(s) eruption in {seconds}s.", - "Cargo puppeteer choreographs {count} crate(s); show in {seconds}s.", - "Ground cartographer maps {count} crate(s) journey—{seconds}s.", - "Ramp mathematician solves {count} crate(s) problem—{seconds}s.", - "Load meteor chaser counts {seconds}s till {count} crate(s) strike.", - "Supply astronomer spots {count} crate(s) constellation—{seconds}s.", - "Deck lifeguard whistles; {count} crate(s) swim aboard in {seconds}s.", - "Cargo sommelier decants {count} crate(s)—need {seconds}s to breathe.", - "Ramp locksmith picks {count} crate(s) locks—{seconds}s.", - "Load carpenter measures twice; {count} crate(s) cut loose in {seconds}s.", - "Ground geologist drills plan—{count} crate(s) surface in {seconds}s.", - "Supply fireman slides pole; {count} crate(s) rescued in {seconds}s.", - "Ramp hacker breaches {count} crate(s) firewall—{seconds}s.", - "Load illusionist shuffles {count} crate(s)—{seconds}s reveal.", - "Deck astronomer winks: {count} crate(s) align in {seconds}s.", - "Cargo mixologist shakes {count} crate(s); {seconds}s pour time.", - "Ramp weatherman says {count} crate(s) drizzle in {seconds}s.", - "Load surveyor levels deck—{count} crate(s) land in {seconds}s.", - "Ground sculptor chisels path; {count} crate(s) glide in {seconds}s.", - "Supply DJ double-drops; {count} crate(s) drop after {seconds}s.", - "Deck clockmaker rewinds {seconds}s, {count} crate(s) tick in.", - "Cargo cart racer drifts up with {count} crate(s) in {seconds}s.", - "Ramp ringmaster cues circus; {count} crate(s) center ring in {seconds}s.", - }, - Progress = { - "Crew chief: {remaining}s on the clock—don't wiggle.", - "Ramp boss tapping boot while Jenkins L calls {remaining}s remaining.", - "Leroy J. humming; {remaining}s until hooks click.", - "Forklift tires chirp—{remaining}s before stack settles.", - "Cargo chains rattling, {remaining}s left.", - "Handler flashes thumbs-up once Leroy yells go in {remaining}s.", - "Deck boss juggling paperwork—{remaining}s.", - "Ground crew sipping caf, {remaining}s reminder.", - "Winch motors whining: {remaining}s.", - "Clipboard ninja says {remaining}s until signatures.", - "Ramp trolls mid chant—{remaining}s.", - "Load doc verifying straps—{remaining}s.", - "Forklift derby lap {remaining}s.", - "Ammo goblins grumble {remaining}s.", - "Supply bard hits chorus in {remaining}s.", - "Deck meteorologist reads {remaining}s forecast.", - "Cargo AI recalculating—{remaining}s.", - "Ground gremlin twisting wrenches for {remaining}s.", - "Ramp conductor waves baton—{remaining}s of tempo.", - "Load punster drafting joke; {remaining}s left.", - "Deck alchemist stirring {remaining}s.", - "Crate wrangler double-knots—{remaining}s.", - "Forklift jazz solo ends in {remaining}s.", - "Supply DJ building drop—{remaining}s.", - "Ramp philosopher meditates {remaining}s.", - "Load botanist waters nets—{remaining}s.", - "Deck coder compiling manifest—{remaining}s.", - "Ground astronomer counts {remaining}s shooting stars.", - "Cargo weathervane spins {remaining}s.", - "Loader handshake pending {remaining}s.", - "Ramp poet editing stanza—{remaining}s.", - "Load bartender shakes drink—{remaining}s of chill.", - "Deck zookeeper calms crates—{remaining}s.", - "Ground sculptor chisels wedge—{remaining}s.", - "Supply tailor hemming slings—{remaining}s.", - "Ramp locksmith turning tumblers—{remaining}s.", - "Load whisperer soothing pallets for {remaining}s.", - "Deck drummer counting down {remaining}s.", - "Cargo painter adds racing stripes—{remaining}s.", - "Ground beekeeper herding boxes—{remaining}s.", - "Ramp ninja mid flip—{remaining}s.", - "Load DJ scratching vinyl for {remaining}s.", - "Deck geologist sampling dust—{remaining}s.", - "Cargo puppeteer angles strings—{remaining}s.", - "Ground interpreter translating crate beeps—{remaining}s.", - "Ramp comedian holding punchline {remaining}s.", - "Load surfer riding forklift forks—{remaining}s.", - "Deck data nerd buffering {remaining}s.", - "Cargo snowplow clearing pebbles—{remaining}s.", - "Ground pyrotechnician keeps sparks at bay {remaining}s.", - "Ramp snorkeler holding breath {remaining}s.", - "Load astronomer calibrates scope—{remaining}s.", - "Deck spelunker exploring skid row—{remaining}s.", - "Cargo beekeeper suits up—{remaining}s.", - "Ground carpenter setting chalk lines—{remaining}s.", - "Ramp wizard muttering {remaining}s spell.", - "Load falconer whistles—{remaining}s before talons release.", - "Deck tuba blares sustain for {remaining}s.", - "Cargo juggler keeps crates aloft {remaining}s.", - "Ground chemist titrates patience—{remaining}s.", - "Ramp puppeteer cues strings—{remaining}s.", - "Load archaeologist brushes dust—{remaining}s.", - "Deck racer redlines stopwatch {remaining}s.", - "Cargo coder spams F5 for {remaining}s.", - "Ground gardener trims net corners—{remaining}s.", - "Ramp DJ layering loops—{remaining}s.", - "Load glaciologist monitors ice melt—{remaining}s.", - "Deck prankster hides cones for {remaining}s.", - "Cargo scribe inks manifest—{remaining}s.", - "Ground wanderer paces {remaining}s.", - "Ramp baker timing souffle—{remaining}s.", - "Load therapist tells crates to breathe {remaining}s.", - "Deck hype squad chanting {remaining}s.", - "Cargo spelunker checks tie-down caverns—{remaining}s.", - "Ground sherpa hauls straps—{remaining}s.", - "Ramp rebel flicks toothpick {remaining}s.", - "Load fortune teller sees {remaining}s in cards.", - "Deck quatermaster double-counts {remaining}s.", - "Cargo dinosaur roaring softly {remaining}s.", - "Ground mech tunes hydraulics—{remaining}s.", - "Ramp botanist sniffs fuel—{remaining}s.", - "Load journalist scribbles {remaining}s update.", - "Deck gamer farming XP for {remaining}s.", - "Cargo archivist files forms—{remaining}s.", - "Ground referee watches chalk line—{remaining}s.", - "Ramp kite flyer reels string—{remaining}s.", - "Load detective dusts prints—{remaining}s.", - "Deck prank caller rings tower for {remaining}s.", - "Cargo shoemaker taps soles—{remaining}s.", - "Ground chandler pours wax—{remaining}s.", - "Ramp falcon loops {remaining}s.", - "Load diver equalizes ears {remaining}s.", - "Deck astronomer rechecks alignment—{remaining}s.", - "Cargo DJ rewinds sample {remaining}s.", - "Ground quartermaster ties ledger—{remaining}s.", - "Ramp magpie collecting shiny bolts—{remaining}s.", - "Load muralist adds stencil—{remaining}s.", - "Deck tech updates firmware—{remaining}s.", - "Cargo babysitter hushes pallets {remaining}s.", - "Ground marshal gives steady-hand signal for {remaining}s.", - "Hey! Watch what you're doing with those crates! {remaining}s left.", - "Hey! You can't put that there! Over there instead! {remaining}s left.", - "Hey! Is your name Leroy! Because you better be getting those crates loaded! {remaining}s left.", - "Jenkins!!! Get those crates loaded! {remaining}s left.", - "Leroy!!! Stop daydreaming and get those crates loaded! {remaining}s left.", - "Come on Leroy, those crates won't load themselves! {remaining}s left.", - "Hurry up Jenkins, we got a bird waiting! {remaining}s left.", - "Get a move on Leroy, those crates ain't gonna load themselves! {remaining}s left.", - "You call that loading Jenkins? {remaining}s left.", - "Pick up the pace Leroy! {remaining}s left.", - "Faster Jenkins! {remaining}s left.", - "Let's hustle Leroy! {remaining}s left.", - "Time's a-tickin' Jenkins! {remaining}s left.", - "Chop-chop Leroy! {remaining}s left.", - "Jenkins! Stop playing with the cargo! Those dildo's belong to Mo! {remaining}s left.", - "Leroy here sir! We got that cargo right where you wanted it! {remaining}s left.", - "Jenkins! Get back to work! Mo's complaining! {remaining}s left.", - }, - Complete = { - "Crew chief: {count} crate(s) strapped and smiling—clear to lift.", - "Ramp boss reports {count} crate(s) locked tight by Jenkins L.", - "Loadmaster: {count} crate(s) tucked in like kittens.", - "Forklift mafia salutes—{count} crate(s) delivered.", - "Deck boss stamped {count} crate(s) good to go.", - "Cargo goblins vanished—Leroy swears he secured {count} crate(s).", - "Winch team claims victory—{count} crate(s) aboard.", - "Clipboard ninja checked {count} boxes.", - "Ramp trolls cheer: {count} crate(s) riding shotgun.", - "Handler: {count} crate(s) bolted; throttle up.", - "Deck poet pens ode to {count} crate(s) now yours.", - "Supply gnomes wave bye to {count} crate(s).", - "Ground crew says {count} crate(s) ready for adventure.", - "Ramp DJ drops beat—{count} crate(s) locked in rhythm.", - "Load doc signs release: {count} crate(s).", - "Deck alchemist transmuted paperwork—{count} crate(s).", - "Cargo therapist declares {count} crate(s) emotionally stable.", - "Forklift derby trophy goes to {count} crate(s) now aboard.", - "Ramp philosopher satisfied—{count} crate(s) exist on deck.", - "Load botanist pruned nets—{count} crate(s) bloom there.", - "Deck coder returned true: {count} crate(s).", - "Ground bard ends tune with {count} crate(s) crescendo.", - "Ramp prankster can't hide {count} crate(s)—they're on board.", - "Cargo beekeeper counts {count} crate(s) in hive.", - "Deck meteorologist confirms {count} crate(s) high pressure.", - "Load painter signs mural of {count} crate(s) strapped.", - "Ground tailor hemmed slings—{count} crate(s) fitted.", - "Ramp locksmith snapped padlocks on {count} crate(s).", - "Cargo DJ fades track—{count} crate(s) secure.", - "Deck archaeologist labels {count} crate(s) artifact.", - "Load comedian retires bit; {count} crate(s) landing.", - "Ground sculptor polishes {count} crate(s) corners.", - "Ramp astronomer charts {count} crate(s) orbit now stable.", - "Cargo puppeteer bows—{count} crate(s) performance done.", - "Deck detective solved case of {count} crate(s).", - "Load shark fins down: {count} crate(s) fed to cargo bay.", - "Ground sherpa drops pack—{count} crate(s) summit achieved.", - "Ramp hacker logs off—{count} crate(s) uploaded.", - "Cargo barista served {count} crate(s) double-shot of tie downs.", - "Deck referee whistles end—{count} crate(s) win.", - "Load fencer sheathes sword—{count} crate(s) defended.", - "Ground medic clears {count} crate(s) to travel.", - "Ramp monk bows: {count} crate(s) enlightened.", - "Cargo kite now tethered—{count} crate(s).", - "Deck astronomer applauds {count} crate(s) alignment.", - "Load geologist marks {count} crate(s) strata complete.", - "Ground gardener plants {count} crate(s) firmly.", - "Ramp puppet master cuts strings—{count} crate(s) stay.", - "Cargo DJ signs off—{count} crate(s) final mix.", - "Deck beekeeper seals hive with {count} crate(s).", - "Load mathematician tallies {count} crate(s) exact.", - "Ground fireworks canceled—{count} crate(s) safe.", - "Ramp storm chaser says {count} crate(s) in the eye.", - "Cargo sculptor chisels notch—{count} crate(s) nested.", - "Deck tailor stitches last knot on {count} crate(s).", - "Load wizard snaps fingers—{count} crate(s) appear strapped.", - "Ground referee raises flag: {count} crate(s) legal.", - "Ramp brewer clinks mugs—{count} crate(s) on tap.", - "Cargo philosopher logs {count} crate(s) as truth.", - "Deck DJ loops outro—{count} crate(s) seated.", - "Load detective closes file—{count} crate(s) accounted.", - "Ground lifeguard thumbs up—{count} crate(s) afloat.", - "Ramp spelunker resurfaces with {count} crate(s).", - "Cargo dancer nails finale—{count} crate(s).", - "Deck poet rhymes {count} crate(s) with fate.", - "Load dragon goes back to sleep—{count} crate(s) fed.", - "Ground chemist labels vials—{count} crate(s) stable.", - "Ramp tailor satisfied stitchwork on {count} crate(s).", - "Cargo quarterback yells touchdown—{count} crate(s).", - "Deck glaciologist notes {count} crate(s) frozen in place.", - "Load eagle roosts—{count} crate(s) in nest.", - "Ground DJ cues victory sting—{count} crate(s) done.", - "Ramp botanist logs {count} crate(s) in flora guide.", - "Cargo surfer throws shaka—{count} crate(s) ride smooth.", - "Deck juggler bows—{count} crate(s) landed.", - "Load translator confirms {count} crate(s) say thanks.", - "Ground weatherman clears skies—{count} crate(s) shining.", - "Ramp trickster hides clipboard: {count} crate(s) can't hide.", - "Cargo archivist files {count} crate(s) under awesome.", - "Deck beekeeper high-fives {count} crate(s) bees.", - "Load marathoner crosses finish with {count} crate(s).", - "Ground astronomer stamps {count} crate(s) star chart.", - "Ramp baker presents {count} crate(s) pie fresh.", - "Cargo diver surfaces cheering {count} crate(s).", - "Deck data nerd graphs {count} crate(s) success.", - "Load hypnotist snaps fingers—{count} crate(s) obey.", - "Ground marshal rolls wand—{count} crate(s) staged.", - "Ramp timekeeper stops watch at {count} crate(s).", - "Cargo composer final chord—{count} crate(s).", - "Deck quartermaster locks ledger: {count} crate(s).", - "Load astronaut gives thumbs up from cargo bay—{count} crate(s).", - "Ground ninja vanishes leaving {count} crate(s).", - "Ramp botanist labels {count} crate(s) species secure.", - "Cargo conductor yells all aboard—{count} crate(s).", - "Deck muralist signs name under {count} crate(s).", - "Load shepherd counts {count} crate(s) asleep.", - "Ground pirate buries hatchet—{count} crate(s) share plunder.", - "Ramp gamer hits save—{count} crate(s) progress locked.", - "Cargo weaver ties final knot on {count} crate(s).", - "Deck captain stamps log—{count} crate(s) embarked.", - } -} - --- ========================= --- MEDEVAC Configuration --- ========================= --- #region MEDEVAC Config -CTLD.MEDEVAC = { - Enabled = true, - - -- Crew spawning - -- Per-coalition spawn probabilities for asymmetric scenarios - CrewSurvivalChance = { - [coalition.side.BLUE] = .30, -- probability (0.0-1.0) that BLUE crew survives to spawn MEDEVAC request. 1.0 = 100% (testing), 0.02 = 2% (production) - [coalition.side.RED] = .30, -- probability (0.0-1.0) that RED crew survives to spawn MEDEVAC request - }, - ManPadSpawnChance = { - [coalition.side.BLUE] = 0.1, -- probability (0.0-1.0) that BLUE crew spawns with a MANPADS soldier. 1.0 = 100% (testing), 0.1 = 10% (production) - [coalition.side.RED] = 0.1, -- probability (0.0-1.0) that RED crew spawns with a MANPADS soldier - }, - CrewSpawnDelay = 300, -- seconds after death before crew spawns (gives battle time to clear). 300 = 5 minutes - CrewAnnouncementDelay = 60, -- seconds after spawn before announcing mission to players (verify crew survival). 60 = 1 minute - CrewTimeout = 3600, -- 1 hour max wait before crew is KIA (after spawning) - CrewSpawnOffset = 25, -- meters from death location (toward nearest enemy) - CrewDefaultSize = 2, -- default crew size if not specified in catalog - CrewDefendSelf = true, -- crews will return fire if engaged - - -- Crew protection during announcement delay - CrewImmortalDuringDelay = true, -- make crew immortal (invulnerable) during announcement delay to prevent early death - CrewInvisibleDuringDelay = true, -- make crew invisible to AI during announcement delay (won't be targeted by enemy) - CrewImmortalAfterAnnounce = false, -- if true, crew stays immortal even after announcing mission (easier gameplay) - - -- Smoke signals - PopSmokeOnSpawn = true, -- crew pops smoke when they first spawn - PopSmokeOnApproach = true, -- crew pops smoke when rescue helo approaches - PopSmokeOnApproachDistance = 8000, -- meters - distance at which crew detects approaching helo - SmokeCooldown = 900, -- seconds between smoke pops (default 900 = 15 minutes) - prevents spam when helo circles - SmokeColor = { -- smoke colors per coalition - [coalition.side.BLUE] = trigger.smokeColor.Blue, - [coalition.side.RED] = trigger.smokeColor.Red, - }, - SmokeOffsetMeters = 0, -- horizontal offset from crew position (meters) so helicopters don't hover in smoke - SmokeOffsetRandom = true, -- randomize horizontal offset direction (true) or always offset north (false) - SmokeOffsetVertical = 20, -- vertical offset above ground level (meters) for better visibility - - -- Greeting messages when crew detects rescue helo - GreetingMessages = { - "Stranded Crew: We see you, boy that thing is loud! Follow the smoke!", - "Stranded Crew: We hear you coming.. yep, we see you.. bring it on down to the smoke!", - "Stranded Crew: Whew! We sure are glad you're here! Over here by the smoke!", - "Stranded Crew: About damn time! We're over here at the smoke!", - "Stranded Crew: Thank God! We thought you forgot about us! Follow the smoke!", - "Stranded Crew: Hey! We're the good looking ones by the smoke!", - "Stranded Crew: Copy that, we have visual! Popping smoke now!", - "Stranded Crew: Roger, we hear your rotors! Follow the smoke and come get us!", - "Stranded Crew: Finally! My feet are killing me out here! We're at the smoke!", - "Stranded Crew: That's the prettiest sound we've heard all day! Head for the smoke!", - "Stranded Crew: Is that you or are the enemy reinforcements? Just kidding, get down here at the smoke!", - "Stranded Crew: We've been working on our tans, come check it out! Smoke's popped!", - "Stranded Crew: Hope you brought snacks, we're starving! Follow the smoke in!", - "Stranded Crew: Your Uber has arrived? No, YOU'RE our Uber! We're at the smoke!", - "Stranded Crew: Could you be any louder? The whole country knows we're here now! At least follow the smoke!", - "Stranded Crew: Next time, could you not take so long? My coffee got cold! Smoke's up!", - "Stranded Crew: We see you! Don't worry, we only look this bad! Head for the smoke!", - "Stranded Crew: Inbound helo spotted! Someone owes me 20 bucks! Smoke is marking our position!", - "Stranded Crew: Hey taxi! We're at the corner of Blown Up Avenue and Oh Crap Street! Follow the smoke!", - "Stranded Crew: You're a sight for sore eyes! Literally, there's so much dust out here! Smoke's popped!", - "Stranded Crew: Visual contact confirmed! Get your ass down here to the smoke!", - "Stranded Crew: Oh thank hell, a bird! We're ready to get the fuck outta here! Smoke's marking us!", - "Stranded Crew: We hear you! Follow the smoke and the smell of desperation!", - "Stranded Crew: Rotors confirmed! Popping smoke now! Don't leave us hanging!", - "Stranded Crew: That you up there? About time! We've been freezing out here! Look for the smoke!", - "Stranded Crew: Helo inbound! We've got the salvage and the trauma, come get both! Smoke's up!", - "Stranded Crew: Eyes on rescue bird! Someone tell me this isn't a mirage! Follow the smoke!", - "Stranded Crew: We hear those beautiful rotors! Land this thing before we cry! Smoke marks the spot!", - "Stranded Crew: Confirmed visual! If you leave without us, we're keeping the salvage! Smoke's popped!", - "Stranded Crew: Choppers overhead! Finally! We were about to start walking! Head for the smoke!", - "Stranded Crew: That's our ride! Everyone look alive and try not to smell too bad! We're at the smoke!", - "Stranded Crew: Helo spotted! Quick, somebody look professional! Smoke's marking our position!", - "Stranded Crew: You're here! We'd hug you but we're covered in dirt and shame! Follow the smoke!", - "Stranded Crew: Bird inbound! Popping smoke! Someone owes us overtime for this shit!", - "Stranded Crew: Visual on rescue! Get down here before the enemy spots you too! Smoke's up!", - "Stranded Crew: We see you! Follow the smoke and broken dreams!", - "Stranded Crew: Incoming helo! Thank fuck! We're ready to leave this lovely hellscape! Smoke marks us!", - "Stranded Crew: Eyes on bird! We've got salvage, stories, and a desperate need for AC! Look for the smoke!", - "Stranded Crew: That you? Get down here! We've been standing here like idiots for hours! Smoke's popped!", - "Stranded Crew: Helo visual! Popping smoke! Anyone got room for some very tired, very angry crew?", - "Stranded Crew: We see you up there! Don't you dare fly past us! Follow the smoke!", - "Stranded Crew: Rescue inbound! Finally! We were starting to plan a walk home! Smoke's marking us!", - "Stranded Crew: Contact! We have eyes on you! Come get us before we change our minds about this whole military thing! Smoke's up!", - "Stranded Crew: Helo confirmed! Smoke's up! Let's get this reunion started!", - "Stranded Crew: You beautiful bastard! We see you! Get down here to the smoke!", - "Stranded Crew: Visual on rescue! We're ready! Let's get out before our luck runs out! Follow the smoke!", - "Stranded Crew: Bird spotted! Smoke deployed! Hurry before we attract more attention!", - "Stranded Crew: There you are! What took so long? Never mind, just land at the smoke!", - "Stranded Crew: We see you! Follow the smoke and the sound of relieved cursing!", - "Stranded Crew: Helo inbound! Everyone grab your shit! We're leaving this place! Smoke marks the LZ!", - "Stranded Crew: Is that our ride or just someone sightseeing? Either way, smoke's up!", - "Stranded Crew: We've got eyes on you! Come to the smoke before we lose our minds!", - "Stranded Crew: Tally ho! That's military speak for 'follow the damn smoke'!", - "Stranded Crew: You're late! But we'll forgive you if you land at the smoke!", - "Stranded Crew: Helo overhead! Popping smoke! This better not be a drill!", - "Stranded Crew: Contact confirmed! Smoke's marking us! Don't make us wait!", - "Stranded Crew: We hear rotors! Please be friendly! Smoke's up either way!", - "Stranded Crew: Bird inbound! Smoke deployed! Let's make this quick!", - "Stranded Crew: Visual on helo! Follow the smoke to the worst day of our lives!", - "Stranded Crew: You found us! Smoke's marking the spot! Gold star for you!", - "Stranded Crew: Rescue bird spotted! Smoke's up! We're the desperate ones!", - "Stranded Crew: We see you! Land at the smoke before we start charging rent!", - "Stranded Crew: Helo visual! Smoke deployed! This isn't a vacation spot!", - "Stranded Crew: That's you! Finally! Follow the smoke to glory!", - "Stranded Crew: Eyes on rescue! Smoke marks our misery! Come fix it!", - "Stranded Crew: We hear you! Smoke's popped! Let's end this nightmare!", - "Stranded Crew: Contact! Visual! Smoke! All the good stuff! Get down here!", - "Stranded Crew: Rescue inbound! Smoke's up! We've rehearsed this moment!", - "Stranded Crew: You're here! Smoke's marking us! Don't screw this up!", - "Stranded Crew: Helo confirmed! Follow the smoke to the saddest party ever!", - "Stranded Crew: We see you! Smoke's deployed! Land before we cry!", - "Stranded Crew: Bird spotted! Smoke marks us! We're the ones waving frantically!", - "Stranded Crew: Visual contact! Smoke's up! This is not a joke!", - "Stranded Crew: You made it! Follow the smoke! We've got beer money! (Lies, but follow the smoke anyway!)", - "Stranded Crew: Helo inbound! Smoke deployed! Pick us up before our wives find out!", - "Stranded Crew: We hear you! Smoke's marking our stupidity! Come save us from ourselves!", - "Stranded Crew: Contact! Smoke's up! We promise we're worth the fuel!", - "Stranded Crew: Rescue bird! Smoke marks the spot! This is awkward for everyone!", - "Stranded Crew: You're here! Smoke deployed! We'll explain everything later!", - "Stranded Crew: Visual on helo! Follow the smoke to disappointment and gratitude!", - "Stranded Crew: We see you! Smoke's up! Let's never speak of this again!", - "Stranded Crew: Helo spotted! Smoke marks us! We're the embarrassed ones!", - "Stranded Crew: Contact confirmed! Smoke deployed! This wasn't in the manual!", - "Stranded Crew: You found us! Smoke's up! Someone's getting a promotion!", - "Stranded Crew: Bird inbound! Follow the smoke to heroes and idiots!", - "Stranded Crew: We hear you! Smoke's marking us! Please don't tell command!", - "Stranded Crew: Visual! Smoke deployed! We'll buy you drinks forever!", - "Stranded Crew: Helo confirmed! Smoke's up! Best day of our lives right here!", - "Stranded Crew: You're here! Follow the smoke! We're never leaving base again!", - "Stranded Crew: Contact! Smoke marks us! This is our rock bottom!", - "Stranded Crew: Rescue inbound! Smoke deployed! We're upgrading your Yelp review!", - "Stranded Crew: We see you! Smoke's up! Land before the enemy does!", - "Stranded Crew: Bird spotted! Follow the smoke! We've learned our lesson!", - "Stranded Crew: Visual on helo! Smoke's marking us! This is so embarrassing!", - "Stranded Crew: You made it! Smoke deployed! We owe you everything!", - "Stranded Crew: Helo inbound! Smoke marks the spot! Let's go home!", - "Stranded Crew: We hear you! Follow the smoke! We're the lucky ones!", - "Stranded Crew: Contact confirmed! Smoke's up! Thank you, thank you, thank you!", - "Stranded Crew: Rescue bird! Smoke deployed! You're our favorite person ever!", - }, - - -- Request airlift messages (initial mission announcement) - RequestAirLiftMessages = { - "Stranded Crew: This is {vehicle} crew at {grid}. Need pickup ASAP! We have {salvage} salvage to collect.", - "Stranded Crew: Yo, this is {vehicle} survivors at {grid}. Come get us before the bad guys do! {salvage} salvage available.", - "Stranded Crew: {vehicle} crew reporting from {grid}. We're alive but our ride isn't. {salvage} salvage ready for extraction.", - "Stranded Crew: Mayday! {vehicle} crew at {grid}. Send taxi, will pay in salvage! ({salvage} units available)", - "Stranded Crew: This is what's left of {vehicle} crew at {grid}. Pick us up and grab the {salvage} salvage while you're at it!", - "Stranded Crew: {vehicle} survivors here at {grid}. We've got {salvage} salvage and a bad attitude. Come get us!", - "Stranded Crew: Former {vehicle} operators at {grid}. Vehicle's toast but we salvaged {salvage} units. Need immediate evac!", - "Stranded Crew: {vehicle} crew broadcasting from {grid}. Situation: homeless. Salvage: {salvage} units. Mood: not great.", - "Stranded Crew: This is {vehicle} at {grid}. Well, WAS {vehicle}. Now it's scrap. Got {salvage} salvage though!", - "Stranded Crew: Hey! {vehicle} crew at {grid}! Our insurance definitely doesn't cover this. {salvage} salvage available.", - "Stranded Crew: {vehicle} survivors reporting. Grid {grid}. Status: walking. Salvage: {salvage}. Pride: wounded.", - "Stranded Crew: To whom it may concern: {vehicle} crew at {grid} requests immediate pickup. {salvage} salvage awaiting recovery.", - "Stranded Crew: {vehicle} down at {grid}. Crew status: annoyed but alive. Salvage count: {salvage}. Hurry up!", - "Stranded Crew: This is a priority call from {vehicle} crew at {grid}. We got {salvage} salvage and zero patience left!", - "Stranded Crew: {vehicle} operators at {grid}. The vehicle gave up, we didn't. {salvage} salvage ready to go!", - "Stranded Crew: Urgent! {vehicle} crew stranded at {grid}. Got {salvage} salvage and a serious need for extraction!", - "Stranded Crew: {vehicle} here, well, parts of it anyway. Crew at {grid}. Salvage: {salvage}. Morale: questionable.", - "Stranded Crew: {vehicle} down at {grid}. We're fine, vehicle's dead. {salvage} salvage secured. Come get us before we walk home!", - "Stranded Crew: Calling all angels! {vehicle} crew at {grid} needs a lift. Bringing {salvage} salvage as payment!", - "Stranded Crew: {vehicle} crew broadcasting from scenic {grid}. Collected {salvage} salvage. Would not recommend this location!", - "Stranded Crew: This is {vehicle} at {grid}. Vehicle status: spectacular fireball (was). Crew status: could use a ride. Salvage: {salvage}.", - "Stranded Crew: {vehicle} survivors at {grid}. We've got {salvage} salvage and stories you won't believe. Extract us!", - "Stranded Crew: Former {vehicle} crew at {grid}. Current occupants of a smoking crater. {salvage} salvage available!", - "Stranded Crew: {vehicle} operators requesting immediate evac from {grid}. Salvage secured: {salvage} units. Bring beer.", - "Stranded Crew: This is {vehicle} crew. Location: {grid}. Situation: not ideal. Salvage: {salvage}. Need: helicopter. NOW.", - "Stranded Crew: {grid}, party of {crew_size} from {vehicle}. Got {salvage} salvage and nowhere to go. Send help!", - "Stranded Crew: {vehicle} down at {grid}. Crew bailed, grabbed {salvage} salvage, now standing here like idiots. Pick us up!", - "Stranded Crew: Emergency broadcast from {vehicle} crew at {grid}. {salvage} salvage ready. Our ride? Not so much.", - "Stranded Crew: {vehicle} at {grid}. Status report: vehicle's a loss, crew's intact, {salvage} salvage secured. Send taxi!", - "Stranded Crew: Hey command! {vehicle} crew at {grid}. We saved {salvage} salvage but couldn't save the vehicle. Priorities!", - "Stranded Crew: This is {vehicle} broadcasting from {grid}. Crew's good, vehicle's bad, {salvage} salvage available. Get us outta here!", - "Stranded Crew: {vehicle} survivors at {grid} with {salvage} salvage. We're sunburned, pissed off, and ready for extraction!", - "Stranded Crew: Attention: {vehicle} crew at {grid} requires pickup. {salvage} salvage recovered. Hurry before we become salvage too!", - "Stranded Crew: {vehicle} here at {grid}. The good news: {salvage} salvage. The bad news: everything else. Send help!", - "Stranded Crew: From the smoking remains of {vehicle} at {grid}, we bring you {salvage} salvage and a request for immediate evac!", - "Stranded Crew: {vehicle} crew calling from {grid}. Vehicle's done, crew's done waiting. {salvage} salvage ready. Move it!", - "Stranded Crew: This is {vehicle} at {grid}. Collected {salvage} salvage while our ride went up in flames. Worth it?", - "Stranded Crew: {vehicle} operators at {grid}. Got {salvage} salvage and a newfound appreciation for walking. Please send helo!", - "Stranded Crew: {grid} here. {vehicle} crew reporting. Salvage count: {salvage}. Ride count: zero. Help count: needed!", - "Stranded Crew: {vehicle} down at {grid}! Crew up and ready with {salvage} salvage! Someone come get us already!", - "Stranded Crew: This is {vehicle} broadcasting on guard. Position {grid}. {salvage} salvage secured. Crew status: tired of your shit, send pickup!", - "Stranded Crew: {vehicle} crew at {grid} here. We've got {salvage} salvage, bad sunburns, and a dying radio battery. Hurry!", - "Stranded Crew: Emergency call from {grid}! {vehicle} crew alive with {salvage} salvage. Vehicle? Not so lucky. Extract ASAP!", - "Stranded Crew: {vehicle} at {grid}. Mission status: FUBAR. Crew status: alive. Salvage status: {salvage} units ready. Send bird!", - "Stranded Crew: This is {vehicle} crew. We're at {grid} with {salvage} salvage and zero transportation. Someone fix that!", - "Stranded Crew: {vehicle} survivors broadcasting from {grid}. Got the salvage ({salvage} units), lost the vehicle. Fair trade?", - "Stranded Crew: Urgent from {grid}! {vehicle} crew here with {salvage} salvage and rapidly depleting patience. Pick us up!", - "Stranded Crew: {vehicle} down at {grid}. Crew condition: grumpy but mobile. Salvage available: {salvage}. Ride home: none.", - "Stranded Crew: This is {vehicle} calling from {grid}. We're standing in the middle of nowhere with {salvage} salvage. Sound fun?", - "Stranded Crew: {vehicle} crew at {grid}. Salvage recovered: {salvage}. Pride recovered: maybe later. Need pickup now!", - "Stranded Crew: SOS from {grid}! {vehicle} crew requesting airlift! {salvage} salvage secured! This is not a drill!", - "Stranded Crew: {vehicle} survivors at {grid}. Vehicle kaput. Crew intact. {salvage} salvage ready. Send chopper!", - "Stranded Crew: This is {vehicle} crew at {grid}. We walked away from the wreck with {salvage} salvage. Now what?", - "Stranded Crew: Priority message! {vehicle} down at {grid}! Crew needs evac! {salvage} salvage available!", - "Stranded Crew: {vehicle} at {grid}. The vehicle didn't make it but we did. {salvage} salvage waiting. Send help!", - "Stranded Crew: Distress call from {grid}! {vehicle} crew needs immediate pickup! {salvage} salvage on site!", - "Stranded Crew: {vehicle} operators broadcasting from {grid}. Status: stranded. Payload: {salvage} salvage. Request: extraction!", - "Stranded Crew: This is {vehicle} crew. Grid: {grid}. Vehicle: destroyed. Salvage: {salvage}. Spirit: broken. Send pickup!", - "Stranded Crew: {vehicle} down at {grid}. We've got {salvage} salvage and a story that'll make you cringe. Extract us!", - "Stranded Crew: Emergency! {vehicle} crew at {grid}! Vehicle lost! {salvage} salvage recovered! Need airlift stat!", - "Stranded Crew: {vehicle} survivors reporting from {grid}. {salvage} salvage secured. Vehicle unsalvageable. We're not!", - "Stranded Crew: This is {vehicle} at {grid}. Crew escaped with {salvage} salvage. Need immediate extraction before enemy finds us!", - "Stranded Crew: {vehicle} crew broadcasting from {grid}. Got {salvage} salvage. Lost everything else. Please respond!", - "Stranded Crew: Mayday from {grid}! {vehicle} crew needs rescue! {salvage} salvage available! Don't leave us here!", - "Stranded Crew: {vehicle} operators at {grid}. Salvage count: {salvage}. Morale count: negative. Pickup count: zero so far!", - "Stranded Crew: This is {vehicle} crew at {grid}. We managed to save {salvage} salvage. Can you save us?", - "Stranded Crew: {vehicle} down at {grid}! Crew on foot with {salvage} salvage! Send taxi before we start hitchhiking!", - "Stranded Crew: Emergency call! {vehicle} crew at {grid}! {salvage} salvage ready! Vehicle not! We need help!", - "Stranded Crew: {vehicle} survivors broadcasting from {grid}. We're alive, vehicle's not, {salvage} salvage secured. What now?", - "Stranded Crew: This is {vehicle} at {grid}. Crew status: homeless. Salvage status: {salvage} units. Transportation status: needed!", - "Stranded Crew: {vehicle} crew calling from {grid}. We've got {salvage} salvage and no way home. Fix that!", - "Stranded Crew: Priority rescue needed! {vehicle} at {grid}! {salvage} salvage secured! Crew waiting!", - "Stranded Crew: {vehicle} operators from {grid}. Vehicle destroyed. Salvage recovered: {salvage}. Us recovered: not yet!", - "Stranded Crew: This is {vehicle} crew. Location: {grid}. Salvage: {salvage}. Transportation: missing. Patience: running out!", - "Stranded Crew: {vehicle} down at {grid}! We escaped with {salvage} salvage! Send extraction before our luck runs out!", - "Stranded Crew: Emergency broadcast from {grid}! {vehicle} crew needs airlift! {salvage} salvage ready for recovery!", - "Stranded Crew: {vehicle} survivors at {grid}. Got {salvage} salvage. Need helicopter. Preferably soon. Please?", - "Stranded Crew: This is {vehicle} at {grid}. Vehicle: totaled. Crew: intact. Salvage: {salvage}. Ride: requested!", - "Stranded Crew: {vehicle} crew broadcasting from {grid}. We saved {salvage} salvage from the wreck. Now save us!", - "Stranded Crew: Urgent! {vehicle} at {grid}! Crew needs extraction! {salvage} salvage available! Respond ASAP!", - "Stranded Crew: {vehicle} operators from {grid}. Salvage secured: {salvage}. Everything else: lost. Help requested!", - "Stranded Crew: This is {vehicle} crew at {grid}. {salvage} salvage recovered. Now we need to be recovered!", - "Stranded Crew: {vehicle} down at {grid}! Crew survived with {salvage} salvage! Vehicle didn't! Send pickup!", - "Stranded Crew: Emergency call from {grid}! {vehicle} crew requesting immediate evac! {salvage} salvage on hand!", - "Stranded Crew: {vehicle} survivors broadcasting from {grid}. Status: stranded. Cargo: {salvage} salvage. Mood: desperate!", - "Stranded Crew: This is {vehicle} at {grid}. We walked away from disaster with {salvage} salvage. Don't make us walk home!", - "Stranded Crew: {vehicle} crew calling from {grid}. Vehicle: gone. Salvage: {salvage}. Hope: fading. Send help!", - "Stranded Crew: Priority message! {vehicle} at {grid}! Crew needs pickup! {salvage} salvage ready! Time is critical!", - "Stranded Crew: {vehicle} operators from {grid}. We've got {salvage} salvage and no vehicle. Math doesn't work. Send helo!", - "Stranded Crew: This is {vehicle} crew at {grid}. Salvage recovered: {salvage}. Pride recovered: TBD. Pickup needed: definitely!", - "Stranded Crew: {vehicle} down at {grid}! Crew intact with {salvage} salvage! Vehicle scattered across 50 meters! Extract us!", - "Stranded Crew: Emergency from {grid}! {vehicle} crew needs airlift! {salvage} salvage secured! Don't forget about us!", - "Stranded Crew: {vehicle} survivors at {grid}. We managed to grab {salvage} salvage. Can you manage to grab us?", - "Stranded Crew: This is {vehicle} broadcasting from {grid}. Crew safe. Vehicle unsafe. {salvage} salvage ready. Pickup overdue!", - "Stranded Crew: {vehicle} crew at {grid}. We've got {salvage} salvage and regrets. Send extraction before we have more regrets!", - "Stranded Crew: Urgent call from {grid}! {vehicle} crew stranded! {salvage} salvage on site! Need immediate pickup!", - "Stranded Crew: {vehicle} operators from {grid}. Salvage count: {salvage}. Vehicle count: zero. Help count: requested!", - }, - - -- Load messages (shown when crew boards helicopter - initial contact) - LoadMessages = { - "Crew: Alright, we're in! Get us the hell out of here!", - "Crew: Loaded up! Thank God you showed up!", - "Crew: We're aboard! Let's not hang around!", - "Crew: All accounted for! Move it, move it!", - "Crew: Everyone's in! Punch it!", - "Crew: Secure! Get airborne before they spot us!", - "Crew: We're good! Nice flying, now let's go!", - "Crew: Loaded! You're our hero, let's bounce!", - "Crew: In the bird! Hit the gas!", - "Crew: Everyone's aboard! Go go go!", - "Crew: Mounted up! Don't wait for an invitation!", - "Crew: We're in! Holy shit, that was close!", - "Crew: All souls aboard! Time to leave!", - "Crew: Secure! Best thing I've seen all day!", - "Crew: Loaded! You magnificent bastard!", - "Crew: We're good to go! Pedal to the metal!", - "Crew: All in! Get us home, please!", - "Crew: Aboard! This is not a drill, GO!", - "Crew: Everyone's in! You're a lifesaver!", - "Crew: Locked and loaded! Wait, wrong phrase... just go!", - "Crew: All personnel aboard! Outstanding work!", - "Crew: We're in! Never been happier to see a helicopter!", - "Crew: Boarding complete! Let's get the fuck out of here!", - "Crew: Secure! You deserve a medal for this!", - "Crew: Everyone's aboard! Enemy's probably watching!", - "Crew: All in! Don't let us keep you!", - "Crew: Mounted! Nice flying, seriously!", - "Crew: Loaded up! First round's on us!", - "Crew: We're in! Best Uber rating ever!", - "Crew: All aboard! You're a goddamn angel!", - "Crew: Secure! Nicest thing anyone's done for us!", - "Crew: Everyone's in! Time's wasting!", - "Crew: Boarding complete! You rock!", - "Crew: All souls accounted for! Let's roll!", - "Crew: We're good! Get altitude, fast!", - "Crew: Loaded! I could kiss you!", - "Crew: Everyone's aboard! Don't wait around!", - "Crew: All in! Unbelievable timing!", - "Crew: Secure! You're the best!", - "Crew: Mounted up! We owe you big time!", - "Crew: All aboard! Rotors up, let's go!", - "Crew: We're in! Perfect execution!", - "Crew: Loaded! Smoothest pickup ever!", - "Crew: Everyone's good! Haul ass!", - "Crew: All accounted for! Spectacular flying!", - "Crew: Secure! Get us out of this hellhole!", - "Crew: We're aboard! Don't stick around!", - "Crew: All in! You're incredible!", - "Crew: Loaded up! Time to jet!", - "Crew: Everyone's secure! Outstanding!", - "Crew: All aboard! Best day ever!", - "Crew: We're good! Thank fucking God!", - "Crew: Loaded! You beautiful human being!", - "Crew: All personnel in! Fly fly fly!", - "Crew: Secure! Can't thank you enough!", - "Crew: Everyone's aboard! Green light!", - "Crew: All in! You're a legend!", - "Crew: Loaded! Sweet baby Jesus, let's go!", - "Crew: We're aboard! Best rescue ever!", - "Crew: All accounted for! Move out!", - "Crew: Secure! You saved our asses!", - "Crew: Everyone's in! Don't wait!", - "Crew: All aboard! Brilliant work!", - "Crew: Loaded up! We're getting married!", - "Crew: We're good! Absolutely perfect!", - "Crew: All in! Hit the throttle!", - "Crew: Secure! You're amazing!", - "Crew: Everyone's aboard! Let's leave!", - "Crew: All accounted for! Superb!", - "Crew: Loaded! Get us home safe!", - "Crew: We're in! Textbook pickup!", - "Crew: All aboard! Go go go!", - "Crew: Secure! We love you!", - "Crew: Everyone's good! Don't linger!", - "Crew: All in! Professional as hell!", - "Crew: Loaded up! Time to skedaddle!", - "Crew: We're aboard! You're the GOAT!", - "Crew: All souls in! Get moving!", - "Crew: Secure! We're naming our kids after you!", - "Crew: Everyone's aboard! Clear to leave!", - "Crew: All in! Never doubt yourself!", - "Crew: Loaded! You're a fucking hero!", - "Crew: We're good! Exceptional timing!", - "Crew: All accounted for! Hats off!", - "Crew: Secure! Best pilot ever!", - "Crew: Everyone's in! Throttle up!", - "Crew: All aboard! You're the man!", - "Crew: Loaded up! Pure excellence!", - "Crew: We're aboard! Flawless!", - "Crew: All in! Get us airborne!", - "Crew: Secure! Impressive stuff!", - "Crew: Everyone's good! Don't delay!", - "Crew: All accounted for! Top notch!", - "Crew: Loaded! Words can't express our thanks!", - "Crew: We're in! You're certified awesome!", - "Crew: All aboard! Time to split!", - "Crew: Secure! We're forever grateful!", - "Crew: Everyone's aboard! Wheels up!", - "Crew: All in! Couldn't be better!", - "Crew: Loaded up! You're the best pilot we know!", - "Crew: We're good! Clear skies ahead!", - "Crew: All souls aboard! Let's book it!", - "Crew: Secure! You're our guardian angel!", - }, - - -- Loading messages (shown periodically during boarding process) - LoadingMessages = { - "Crew: Hold still, we're getting in...", - "Crew: Watch your head! Coming through!", - "Crew: Almost there, keep it steady...", - "Crew: Just a sec, getting situated...", - "Crew: Loading up, hang tight...", - "Crew: Careful with Jenkins, he's bleeding pretty bad...", - "Crew: Someone grab the salvage!", - "Crew: Easy does it, wounded coming aboard...", - "Crew: Keep it level, we're climbing in...", - "Crew: Steady now, injured personnel...", - "Crew: Oh God, there's so much blood...", - "Crew: Medic! Where's the first aid kit?", - "Crew: Hold position, almost loaded...", - "Crew: Watch the rotor wash!", - "Crew: Someone's unconscious, careful!", - "Crew: Getting the wounded in first...", - "Crew: Steady as she goes...", - "Crew: Holy hell, Mike's leg is fucked up...", - "Crew: Hurry, he's losing blood fast!", - "Crew: Nice and easy, don't rush...", - "Crew: Everyone watch your step...", - "Crew: Loading wounded, give us a second...", - "Crew: Jesus, that's a lot of shrapnel...", - "Crew: Keep those rotors spinning!", - "Crew: Almost done, standby...", - "Crew: Careful, compound fracture here!", - "Crew: Someone's in shock, move it!", - "Crew: Loading gear, then we're good...", - "Crew: Stay put, we're working...", - "Crew: Damn, this guy's a mess...", - "Crew: Getting everyone situated...", - "Crew: Nice flying, keep it steady...", - "Crew: Hold still while we board...", - "Crew: Watch that head wound!", - "Crew: Everyone stay calm...", - "Crew: Getting the critical cases first...", - "Crew: Standby, loading continues...", - "Crew: Someone's got a sucking chest wound!", - "Crew: Keep that bird steady, sir!", - "Crew: Almost there, patience...", - "Crew: Wounded first, then equipment...", - "Crew: Oh fuck, internal bleeding...", - "Crew: Stay with us, buddy!", - "Crew: Loading process underway...", - "Crew: Keep those engines running!", - "Crew: Careful with his arm, it's shattered!", - "Crew: Getting everyone secured...", - "Crew: Hold your position, pilot!", - "Crew: Someone's not breathing right...", - "Crew: Almost done loading...", - "Crew: Watch your footing!", - "Crew: Traumatic amputation, careful!", - "Crew: Everyone grab something!", - "Crew: Standby, still boarding...", - "Crew: Nice hover, keep it up...", - "Crew: Getting the gear stowed...", - "Crew: Oh man, burns everywhere...", - "Crew: Stay conscious, stay with me!", - "Crew: Loading in progress...", - "Crew: Excellent flying, seriously...", - "Crew: Watch out for that wound!", - "Crew: Everyone move carefully...", - "Crew: He's going into shock!", - "Crew: Almost finished boarding...", - "Crew: Keep it stable, we're working...", - "Crew: Jesus, look at his face...", - "Crew: Getting everyone in...", - "Crew: Hold that position!", - "Crew: Someone's barely conscious...", - "Crew: Loading continues, standby...", - "Crew: Perfect hover, captain!", - "Crew: Careful, severe trauma here...", - "Crew: Everyone's moving slow...", - "Crew: Hold on, still loading...", - "Crew: Damn good flying, pilot!", - "Crew: Watch the blood slick!", - "Crew: Getting situated here...", - "Crew: He needs a hospital NOW...", - "Crew: Almost done, keep steady...", - "Crew: Loading wounded personnel...", - "Crew: Stay with us, soldier!", - "Crew: Keep those rotors turning...", - "Crew: Careful, major injuries...", - "Crew: Everyone board carefully...", - "Crew: Hold position, nearly done...", - "Crew: Oh God, the smell...", - "Crew: Loading critical cases...", - "Crew: Steady now, pilot...", - "Crew: Someone's in bad shape...", - "Crew: Almost loaded up...", - "Crew: Nice hover, excellent control...", - "Crew: Watch the shrapnel wounds!", - "Crew: Everyone move slowly...", - "Crew: He's bleeding out!", - "Crew: Getting everyone aboard...", - "Crew: Hold that hover!", - "Crew: Severe burns, careful!", - "Crew: Loading in progress, standby...", - "Crew: Perfect positioning, sir...", - "Crew: Watch those injuries!", - "Crew: Everyone take it easy...", - "Crew: Almost finished here...", - }, - - -- Unloading messages (shown when delivering crew to MASH) - UnloadingMessages = { - "Crew: Hold steady, do not lift - stretchers are rolling out!", - "Crew: Stay put, we're getting the wounded offloaded!", - "Crew: Keep us grounded, medics are still working inside!", - "Crew: We're at MASH! Thank you so much!", - "Crew: Finally! Get these guys to the docs!", - "Crew: Medical team, we need help here!", - "Crew: We made it! Get the wounded inside!", - "Crew: MASH arrival! These guys need immediate attention!", - "Crew: Unloading! Someone call the surgeons!", - "Crew: We're here! Priority casualties!", - "Crew: Made it alive! You're incredible!", - "Crew: MASH delivery! Critical patients!", - "Crew: Get the medics! We got wounded!", - "Crew: Arrived! These guys are in bad shape!", - "Crew: We're down! Medical emergency!", - "Crew: At MASH! Someone help these men!", - "Crew: Delivered! Thank God for you!", - "Crew: We made it! Get stretchers!", - "Crew: Arrival confirmed! Wounded aboard!", - "Crew: Finally here! Need doctors NOW!", - "Crew: MASH drop-off! Several critical!", - "Crew: We're safe! Get the medical team!", - "Crew: Landed! These boys need surgery!", - "Crew: Delivery complete! You saved lives today!", - "Crew: At medical! Urgent care needed!", - "Crew: We're here! Someone's coding!", - "Crew: MASH arrival! Serious trauma cases!", - "Crew: Made it! Outstanding flying!", - "Crew: Delivered safely! Medical assist required!", - "Crew: We're down! Get the surgical team!", - "Crew: At MASH! Multiple wounded!", - "Crew: Arrived! These guys won't last long!", - "Crew: Delivery! We owe you everything!", - "Crew: MASH landing! Emergency cases!", - "Crew: We made it! Immediate medical attention!", - "Crew: Here safe! Call the surgeons!", - "Crew: Delivered! Some really bad injuries!", - "Crew: At medical! They need help fast!", - "Crew: We're here! You're a hero!", - "Crew: MASH drop! Priority patients!", - "Crew: Arrived alive! Medical emergency!", - "Crew: Delivery complete! Get them inside!", - "Crew: We made it! Someone's critical!", - "Crew: At MASH! Severe casualties!", - "Crew: Landed safely! Thank you!", - "Crew: Delivered! Medical team needed!", - "Crew: We're here! These guys are fucked up!", - "Crew: MASH arrival! Get the doctors!", - "Crew: Made it! They're losing blood!", - "Crew: Arrived! Urgent surgical cases!", - "Crew: We're down! Multiple trauma!", - "Crew: At medical! You saved our asses!", - "Crew: Delivery! Several critical injuries!", - "Crew: MASH landing! They need OR stat!", - "Crew: We made it! Heavy casualties!", - "Crew: Here safely! Medical response!", - "Crew: Delivered! Some won't make it without surgery!", - "Crew: At MASH! Emergency personnel needed!", - "Crew: Arrived! These boys need immediate care!", - "Crew: We're here! Call triage!", - "Crew: MASH drop-off! Serious wounds!", - "Crew: Made it alive! Outstanding work!", - "Crew: Delivered safely! Get the medics!", - "Crew: We're down! They're in rough shape!", - "Crew: At medical! Priority one casualties!", - "Crew: Arrived! You're a lifesaver!", - "Crew: Delivery complete! Medical emergency!", - "Crew: MASH landing! Critical patients!", - "Crew: We made it! Someone's not breathing well!", - "Crew: Here! Get them to surgery!", - "Crew: Delivered! Severe trauma aboard!", - "Crew: At MASH! They need doctors now!", - "Crew: Arrived safely! You're amazing!", - "Crew: We're here! Multiple serious injuries!", - "Crew: MASH drop! Get the surgical team!", - "Crew: Made it! Thank fucking God!", - "Crew: Delivered! Several need immediate surgery!", - "Crew: We're down! Medical assist!", - "Crew: At medical! These guys are critical!", - "Crew: Arrived! You deserve a medal!", - "Crew: Delivery! Heavy casualties!", - "Crew: MASH landing! Emergency patients!", - "Crew: We made it! Get help quick!", - "Crew: Here safely! Brilliant flying!", - "Crew: Delivered! Someone's in bad shape!", - "Crew: At MASH! Urgent care!", - "Crew: Arrived alive! Medical emergency!", - "Crew: We're here! They need triage!", - "Crew: MASH drop-off! You saved lives!", - "Crew: Made it! These boys need help!", - "Crew: Delivered safely! Call the doctors!", - "Crew: We're down! Priority casualties!", - "Crew: At medical! You're our hero!", - "Crew: Arrived! Severe wounds here!", - "Crew: Delivery complete! Get medical personnel!", - "Crew: MASH landing! Critical condition!", - "Crew: We made it! They're barely hanging on!", - "Crew: Here! Immediate medical attention!", - "Crew: Delivered! Someone's dying!", - "Crew: At MASH! Get the OR ready!", - "Crew: Arrived safely! We can't thank you enough!", - "Crew: We're here! Emergency surgery needed!", - "Crew: MASH drop! Multiple trauma!", - "Crew: Made it alive! Exceptional flying!", - "Crew: Delivered! They need help now!", - "Crew: We're down! Medical response required!", - }, - - -- Unload completion messages (shown when offload finishes) - UnloadCompleteMessages = { - "MASH: Offload complete! Medical teams have the wounded!", - "MASH: Patients transferred! You're cleared to lift!", - "MASH: All casualties delivered! Incredible flying!", - "MASH: They're inside! Mission accomplished!", - "MASH: Every patient is in triage! Thank you!", - "MASH: Transfer complete! Head back when ready!", - "MASH: Doctors have them! Outstanding job!", - "MASH: Wounded are inside! You saved them!", - "MASH: Hand-off confirmed! You're good to go!", - "MASH: Casualties secure! Medical team standing by!", - "MASH: Delivery confirmed! Take a breather, pilot!", - "MASH: All stretchers filled! We are done here!", - "MASH: Hospital staff has the patients! Great work!", - "MASH: Unload complete! You nailed that landing!", - "MASH: MASH has control! You're clear, thank you!", - "MASH: Every survivor is inside! Hell yes!", - "MASH: Docs have them! Back to the fight when ready!", - "MASH: Handoff complete! You earned the praise!", - "MASH: Medical team secured the wounded! Legend!", - "MASH: Transfer complete! Outstanding steady hover!", - "MASH: They're in the OR! You rock, pilot!", - "MASH: Casualties delivered! Spin it back up when ready!", - "MASH: MASH confirms receipt! You're a lifesaver!", - "MASH: Every patient is safe! Mission complete!", - }, - - -- Enroute messages (periodic chatter with bearing/distance to MASH) - EnrouteToMashMessages = { - "Crew: Steady hands—{mash} sits at bearing {brg}°, {rng} {rng_u} ahead; patients are trying to nap.", - "Crew: Nav board says {mash} is {brg}° for {rng} {rng_u}; keep it gentle so the IVs stay put.", - "Crew: If you hold {brg}° for {rng} {rng_u}, {mash} will have hot coffee waiting—no promises on taste.", - "Crew: Confirmed, {mash} straight off the nose at {brg}°, {rng} {rng_u}; wounded are counting on you.", - "Crew: Stay on {brg}° for {rng} {rng_u} and we’ll roll into {mash} like heroes instead of hooligans.", - "Crew: Tilt a hair left—{mash} lies {brg}° at {rng} {rng_u}; let’s not overshoot the hospital.", - "Crew: Keep the climb smooth; {mash} is {brg}° at {rng} {rng_u} and the patients already look green.", - "Crew: Plot shows {mash} bearing {brg}°, range {rng} {rng_u}; mother hen wants her chicks delivered.", - "Crew: Hold that heading {brg}° and we’ll be on final to {mash} in {rng} {rng_u}; medics are on standby.", - "Crew: Reminder—{mash} is {brg}° at {rng} {rng_u}; try not to buzz the command tent this run.", - "Crew: Flight doc says keep turbulence down; {mash} sits {brg}° out at {rng} {rng_u}.", - "Crew: Stay focused—{mash} ahead {brg}°, {rng} {rng_u}; every bump costs us more paperwork.", - "Crew: We owe those medics a beer; {mash} is {brg}° for {rng} {rng_u}, so let’s get there in one piece.", - "Crew: Update from ops: {mash} remains {brg}° at {rng} {rng_u}; throttle down before the pad sneaks up.", - "Crew: Patients are asking if this thing comes with a smoother ride—{mash} {brg}°, {rng} {rng_u} to go.", - "Crew: Keep your cool—{mash} is {brg}° at {rng} {rng_u}; med bay is laying out stretchers now.", - "Crew: Good news, {mash} has fresh morphine; bad news, it’s {brg}° and {rng} {rng_u} away—step on it.", - "Crew: Command wants ETA—tell them {mash} is {brg}° for {rng} {rng_u} and we’re hauling wounded and sass.", - "Crew: That squeak you hear is the stretcher—stay on {brg}° for {rng} {rng_u} to {mash}.", - "Crew: Don’t mind the swearing; we’re {rng} {rng_u} from {mash} on bearing {brg}° and the pain meds wore off.", - "Crew: Eyes outside—{mash} sits {brg}° at {rng} {rng_u}; flak gunners better keep their heads down.", - "Crew: Weather’s clear—{mash} is {brg}° out {rng} {rng_u}; let’s not invent new IFR procedures.", - "Crew: Remember your autorotation drills? Neither do we. Fly {brg}° for {rng} {rng_u} to {mash} and keep her humming.", - "Crew: The guy on stretcher two wants to know if {mash} is really {brg}° at {rng} {rng_u}; I told him yes, please prove me right.", - "Crew: Rotor check good; {mash} bearing {brg}°, distance {rng} {rng_u}. Try to act like professionals.", - "Crew: Stay low and fast—{mash} {brg}° {rng} {rng_u}; enemy radios are whining already.", - "Crew: You’re doing great—just keep {brg}° for {rng} {rng_u} and {mash} will take the baton.", - "Crew: Map scribble says {mash} is {brg}° and {rng} {rng_u}; let’s prove cartography still works.", - "Crew: Pilot, the patients voted: less banking, more {mash}. Bearing {brg}°, {rng} {rng_u}.", - "Crew: We cross the line into {mash} territory in {rng} {rng_u} at {brg}°; keep the blades happy.", - "Crew: Hot tip—{mash} chefs saved us soup if we make {brg}° in {rng} {rng_u}; pretty sure it’s edible.", - "Crew: Another bump like that and I’m filing a complaint; {mash} is {brg}° at {rng} {rng_u}, so aim true.", - "Crew: The wounded in back just made side bets on landing—bearing {brg}°, range {rng} {rng_u} to {mash}.", - "Crew: Stay on that compass—{mash} sits {brg}° at {rng} {rng_u}; medics already prepped the triage tent.", - "Crew: Copy tower—{mash} runway metaphorically lies {brg}° and {rng} {rng_u} ahead; no victory rolls.", - "Crew: Someone alert the chaplain—we’re {rng} {rng_u} out from {mash} on {brg}° and our patients could use jokes.", - "Crew: Keep chatter clear—{mash} is {brg}° away at {rng} {rng_u}; let’s land before the morphine fades.", - "Crew: They promised me coffee at {mash} if we stick {brg}° for {rng} {rng_u}; don’t ruin this.", - "Crew: Plotting intercept—{mash} coordinates show {brg}°/{rng} {rng_u}; maintain this track.", - "Crew: I know the gauges say fine but the guys in back disagree; {mash} {brg}°, {rng} {rng_u}.", - "Crew: Remember, no barrel rolls; {mash} lies {brg}° at {rng} {rng_u}, and the surgeon will kill us if we’re late.", - "Crew: Keep the skids level; {mash} is {brg}° and {rng} {rng_u} away begging for customers.", - "Crew: We’re on schedule—{mash} sits {brg}° at {rng} {rng_u}; try not to invent new delays.", - "Crew: Latest wind check says {mash} {brg}°, {rng} {rng_u}; adjust trim before the patients revolt.", - "Crew: The medic in back just promised cookies if we hit {brg}° for {rng} {rng_u} to {mash}.", - "Crew: Hold blades steady—{mash} is {brg}° at {rng} {rng_u}; stretcher straps can only do so much.", - "Crew: Copy you’re bored, but {mash} is {brg}° for {rng} {rng_u}; no scenic detours today.", - "Crew: If you overshoot {mash} by {rng} {rng_u} I’m telling command it was deliberate; target bearing {brg}°.", - "Crew: Serious faces—we’re {rng} {rng_u} out from {mash} on {brg}° and these folks hurt like hell.", - "Crew: Hey pilot, the guy with the busted leg says thanks—just keep {brg}° for {rng} {rng_u} to {mash}.", - "Crew: That was a nice thermal—maybe avoid the next one; {mash} sits {brg}° at {rng} {rng_u}.", - "Crew: Keep those eyes up; {mash} is {brg}° away {rng} {rng_u}; CAS flights are buzzing around.", - "Crew: Reminder: {mash} won’t accept deliveries dumped on the lawn; {brg}° and {rng} {rng_u} to touchdown.", - "Crew: Ops pinged again; told them we’re {rng} {rng_u} from {mash} on heading {brg}° and flying like pros.", - "Crew: We promised the patients a soft landing; {mash} bearing {brg}°, distance {rng} {rng_u}.", - "Crew: Keep the profile low—{mash} is {brg}° at {rng} {rng_u}; AAA spots are grumpy today.", - "Crew: Message from tower: {mash} pad is clear; track {brg}° for {rng} {rng_u} and watch the dust.", - "Crew: Someone in back just yanked an IV—slow the hell down; {mash} {brg}°, {rng} {rng_u}.", - "Crew: We’re so close I can smell antiseptic—{mash} is {brg}° and {rng} {rng_u} from here.", - "Crew: If we shave more time the medics might actually smile; {mash} lies {brg}° at {rng} {rng_u}.", - "Crew: Friendly reminder—{mash} is {brg}° at {rng} {rng_u}; try not to park on their tent again.", - "Crew: The patients voted you best pilot if we hit {mash} at {brg}° in {rng} {rng_u}; don’t blow the election.", - "Crew: I’ve got morphine bets riding on you; {mash} sits {brg}° for {rng} {rng_u}.", - "Crew: Keep your head in the game—{mash} {brg}°, {rng} {rng_u}; enemy gunners love tall rotor masts.", - "Crew: That rattle is the litter, not the engine; {mash} is {brg}° and {rng} {rng_u} out.", - "Crew: Flight lead wants a status—reported {mash} bearing {brg}°, {rng} {rng_u}; keep us honest.", - "Crew: Patient three says thanks for not crashing—yet; {mash} {brg}°, {rng} {rng_u}.", - "Crew: If you see the chaplain waving, you missed—{mash} sits {brg}° at {rng} {rng_u}.", - "Crew: Med bay just radioed; they’re warming blankets. That’s {mash} {brg}° at {rng} {rng_u}.", - "Crew: Stay locked on {brg}° for {rng} {rng_u}; {mash} already cleared a pad.", - "Crew: Little turbulence ahead; {mash} bearing {brg}°, {rng} {rng_u}; grip it and grin.", - "Crew: The guy on the stretcher wants to know if we’re lost—tell him {mash} {brg}°, {rng} {rng_u}.", - "Crew: Hold altitude; {mash} is {brg}° away {rng} {rng_u} and the medics hate surprise autorotations.", - "Crew: Confirming nav—{mash} at {brg}°, {rng} {rng_u}; you keep flying, we’ll keep them calm.", - "Crew: If anyone asks, yes we’re inbound; {mash} sits {brg}° {rng} {rng_u} out.", - "Crew: Think happy thoughts—{mash} is {brg}° at {rng} {rng_u}; patients can smell fear.", - "Crew: Quit sightseeing—{mash} lies {brg}° and {rng} {rng_u}; let’s deliver the meat wagon.", - "Crew: Keep that nose pointed {brg}°; {mash} is only {rng} {rng_u} away and my nerves are shot.", - "Crew: We promised a fast ride; {mash} sits {brg}° at {rng} {rng_u}. No pressure.", - "Crew: You’re lined up perfect—{mash} {brg}°, {rng} {rng_u}; now just keep it that way.", - "Crew: The surgeon texted—he wants his patients now. {mash} bearing {brg}°, {rng} {rng_u}.", - "Crew: The wounded are timing us; {mash} is {brg}° at {rng} {rng_u} so don’t dilly-dally.", - "Crew: Another five minutes and {mash} will start nagging—hold {brg}° for {rng} {rng_u}.", - "Crew: Keep the blade slap mellow; {mash} sits {brg}° at {rng} {rng_u}.", - "Crew: Airspeed’s good; {mash} is {brg}° for {rng} {rng_u}; cue inspirational soundtrack.", - "Crew: Patient four says if we keep {brg}° for {rng} {rng_u}, drinks are on him at {mash}.", - "Crew: Don’t ask why the stretcher smells like smoke; just fly {brg}° {rng} {rng_u} to {mash}.", - "Crew: Tower says we’re clear direct {mash}; bearing {brg}°, {rng} {rng_u}.", - "Crew: If the engine coughs again we’re walking—{mash} sits {brg}° at {rng} {rng_u}; keep the RPM up.", - "Crew: Calm voices only—{mash} sits {brg}° {rng} {rng_u}; the patients listen to tone more than words.", - "Crew: Promise the guys in back we’ll hit {brg}° for {rng} {rng_u} and land like silk at {mash}.", - "Crew: There’s a small bet you’ll flare too high; prove them wrong—{mash} {brg}°, {rng} {rng_u}.", - "Crew: The medic wants you to skip the cowboy routine; {mash} lies {brg}° at {rng} {rng_u}.", - "Crew: That vibration is fine; what’s not fine is missing {mash} at {brg}° in {rng} {rng_u}.", - "Crew: Keep the collective steady—{mash} {brg}°, {rng} {rng_u}; we’re hauling precious cargo.", - "Crew: Someone promised me a hot meal at {mash}; stay on {brg}° for {rng} {rng_u} and make it happen.", - "Crew: The patients say if you wobble again they’re walking; {mash} {brg}°, {rng} {rng_u}.", - "Crew: Hold that horizon—{mash} is {brg}° for {rng} {rng_u}; the doc already scrubbed in.", - "Crew: Eyes on the prize—{mash} {brg}°, {rng} {rng_u}; don’t let the wind push us off.", - "Crew: Finish strong; {mash} sits {brg}° {rng} {rng_u}. Wheels down and we’re heroes again.", - }, - - -- Crew unit types per coalition (fallback if not specified in catalog) - CrewUnitTypes = { - [coalition.side.BLUE] = 'Soldier M4', - [coalition.side.RED] = 'Paratrooper RPG-16', -- Try Russian paratrooper instead - }, - - -- MANPADS unit types per coalition (one random crew member gets this weapon) - ManPadUnitTypes = { - [coalition.side.BLUE] = 'Soldier stinger', - [coalition.side.RED] = 'SA-18 Igla manpad', - }, - - -- Respawn settings - RespawnOnPickup = true, -- if true, vehicle respawns when crew loaded into helo - RespawnOffset = 15, -- meters from original death position - RespawnSameHeading = true, -- preserve original heading - - -- Automatic pickup/unload settings - AutoPickup = { - Enabled = true, -- if true, crews will be picked up automatically when helicopter lands nearby - MaxDistance = 30, -- meters - max distance for automatic crew pickup - CheckInterval = 3, -- seconds between checks for landed helicopters - RequireGroundContact = true, -- when true, helicopter must be firmly on the ground before crews move - GroundContactAGL = 4, -- meters AGL threshold treated as “landed” for ground contact purposes - MaxLandingSpeed = 2, -- m/s ground speed limit while parked; prevents chasing sliding helicopters - LoadDelay = 15, -- seconds crews need to board after reaching helicopter (must stay landed) - SettledAGL = 6.0, -- maximum AGL considered safely settled during boarding hold - AirAbortGrace = 2, -- seconds of hover tolerated during boarding before aborting - }, - - AutoUnload = { - Enabled = true, -- if true, crews automatically unload when landed in MASH zone - UnloadDelay = 15, -- seconds after landing before auto-unload triggers - GroundContactAGL = 3.5, -- meters AGL treated as “on the ground” for auto-unload (taller skids/mod helos) - SettledAGL = 6.0, -- maximum AGL considered safely settled for the unload hold to run (relative to terrain) - MaxLandingSpeed = 2.0, -- m/s ground speed limit while holding to unload - AirAbortGrace = 2, -- seconds of hover wiggle tolerated before aborting the unload hold - }, - - EnrouteMessages = { - Enabled = true, - Interval = 123, -- seconds between in-flight status quips while MEDEVAC patients onboard - }, - - -- Salvage system - Salvage = { - Enabled = true, - PoolType = 'global', -- 'global' = coalition-wide pool - DefaultValue = 1, -- default salvageValue if not in catalog - ShowInStatus = true, -- show salvage points in F10 status menu - AutoApply = true, -- auto-use salvage when out of stock (no manual confirmation) - AllowAnyItem = true, -- can build items that never had inventory using salvage - }, - - -- Map markers for downed crews - MapMarkers = { - Enabled = true, - IconText = '🔴 MEDEVAC', -- prefix for marker text - ShowGrid = true, -- include grid coordinates in marker - ShowTimeRemaining = true, -- show expiration time in marker - ShowSalvageValue = true, -- show salvage value in marker - }, - - -- Warning messages before crew timeout - Warnings = { - { time = 900, message = 'MEDEVAC: {crew} at {grid} has 15 minutes remaining!' }, - { time = 300, message = 'URGENT MEDEVAC: {crew} at {grid} will be KIA in 5 minutes!' }, - }, - - MASHZoneRadius = 500, -- default radius for MASH zones - MASHZoneColors = { - border = {1, 1, 0, 0.85}, -- yellow border - fill = {1, 0.75, 0.8, 0.25}, -- pink fill - }, - - -- Mobile MASH (player-deployable via crates) - MobileMASH = { - Enabled = true, - ZoneRadius = 500, -- radius of Mobile MASH zone in meters - CrateRecipeKey = 'MOBILE_MASH', -- catalog key for building mobile MASH - AnnouncementInterval = 1800, -- 30 mins between announcements - BeaconFrequency = '30.0 FM', -- radio frequency for announcements - Destructible = true, - VehicleTypes = { - [coalition.side.BLUE] = 'M-113', -- Medical variant for BLUE - [coalition.side.RED] = 'BTR_D', -- Medical/transport variant for RED - }, - AutoIncrementName = true, -- "Mobile MASH 1", "Mobile MASH 2"... - }, - - -- Statistics tracking - Statistics = { - Enabled = true, - TrackByPlayer = false, -- if true, track per-player stats (not yet implemented) - }, -} - --- ========================= --- Sling-Load Salvage Configuration (MOVED) --- ========================= --- #region SlingLoadSalvage Config --- NOTE: SlingLoadSalvage configuration has been MOVED into CTLD.Config.SlingLoadSalvage --- so that it properly gets copied to each CTLD instance via DeepCopy/DeepMerge. --- The old CTLD.SlingLoadSalvage global definition here is removed to avoid confusion. --- See CTLD.Config.SlingLoadSalvage above for the actual configuration. --- #endregion SlingLoadSalvage Config ---=================================================================================================================================================== --- #endregion MEDEVAC Config - - -- #region State - -- Internal state tables -CTLD._instances = CTLD._instances or {} -CTLD._crates = {} -- [crateName] = { key, zone, side, spawnTime, point } -CTLD._troopsLoaded = {} -- [groupName] = { count, typeKey, weightKg } -CTLD._loadedCrates = {} -- [groupName] = { total=n, totalWeightKg=w, byKey = { key -> count } } -CTLD._loadedTroopTypes = {} -- [groupName] = { total=n, byType = { typeKey -> count }, labels = { typeKey -> label } } -CTLD._deployedTroops = {} -- [groupName] = { typeKey, count, side, spawnTime, point, weightKg } -CTLD._hoverState = {} -- [unitName] = { targetCrate=name, startTime=t } -CTLD._unitLast = {} -- [unitName] = { x, z, t } -CTLD._coachState = {} -- [unitName] = { lastKeyTimes = {key->time}, lastHint = "", phase = "", lastPhaseMsg = 0, target = crateName, holdStart = nil } -CTLD._msgState = { } -- messaging throttle state: [scopeKey] = { lastKeyTimes = { key -> time } } -CTLD._buildConfirm = {} -- [groupName] = time of first build request (awaiting confirmation) -CTLD._buildCooldown = {} -- [groupName] = time of last successful build -CTLD._NextMarkupId = 10000 -- global-ish id generator shared by instances for map drawings --- Spatial indexing for hover pickup performance -CTLD._spatialGrid = CTLD._spatialGrid or {} -- [gridKey] = { crates = {name->meta}, troops = {name->meta} } -CTLD._spatialGridSize = 500 -- meters per grid cell (tunable based on hover pickup distance) --- Inventory state -CTLD._stockByZone = CTLD._stockByZone or {} -- [zoneName] = { [crateKey] = count } -CTLD._inStockMenus = CTLD._inStockMenus or {} -- per-group filtered menu handles -CTLD._jtacReservedCodes = CTLD._jtacReservedCodes or { - [coalition.side.BLUE] = {}, - [coalition.side.RED] = {}, - [coalition.side.NEUTRAL] = {}, -} --- MEDEVAC state -CTLD._medevacCrews = CTLD._medevacCrews or {} -- [crewGroupName] = { vehicleType, side, spawnTime, position, salvageValue, markerID, originalHeading, requestTime, warningsSent } -CTLD._salvagePoints = CTLD._salvagePoints or {} -- [coalition.side] = points (global pool) -CTLD._mashZones = CTLD._mashZones or {} -- [zoneName] = { zone, side, isMobile, unitName (if mobile) } -CTLD._mobileMASHCounter = CTLD._mobileMASHCounter or { [coalition.side.BLUE] = 0, [coalition.side.RED] = 0 } -CTLD._medevacStats = CTLD._medevacStats or { -- [coalition.side] = { spawned, rescued, delivered, timedOut, killed, salvageEarned, vehiclesRespawned } - [coalition.side.BLUE] = { spawned = 0, rescued = 0, delivered = 0, timedOut = 0, killed = 0, salvageEarned = 0, vehiclesRespawned = 0, salvageUsed = 0 }, - [coalition.side.RED] = { spawned = 0, rescued = 0, delivered = 0, timedOut = 0, killed = 0, salvageEarned = 0, vehiclesRespawned = 0, salvageUsed = 0 }, -} -CTLD._medevacUnloadStates = CTLD._medevacUnloadStates or {} -- [groupName] = { startTime, delay, holdAnnounced, nextReminder } -CTLD._medevacLoadStates = CTLD._medevacLoadStates or {} -- [groupName] = { startTime, delay, crewGroupName, crewData, holdAnnounced, nextReminder } -CTLD._medevacEnrouteStates = CTLD._medevacEnrouteStates or {} -- [groupName] = { nextSend, lastIndex } - --- Sling-Load Salvage state -CTLD._salvageCrates = CTLD._salvageCrates or {} -- [crateName] = { side, weight, spawnTime, position, initialHealth, rewardValue, warningsSent, staticObject, crateClass } -CTLD._salvageDropZones = CTLD._salvageDropZones or {} -- [zoneName] = { zone, side, active } -CTLD._salvageStats = CTLD._salvageStats or { -- [coalition.side] = { spawned, delivered, expired, totalWeight, totalReward } - [coalition.side.BLUE] = { spawned = 0, delivered = 0, expired = 0, totalWeight = 0, totalReward = 0 }, - [coalition.side.RED] = { spawned = 0, delivered = 0, expired = 0, totalWeight = 0, totalReward = 0 }, -} --- One-shot timer tracking for cleanup -CTLD._pendingTimers = CTLD._pendingTimers or {} -- [timerId] = true - -local function _distanceXZ(a, b) - if not a or not b then return math.huge end - local dx = (a.x or 0) - (b.x or 0) - local dz = (a.z or 0) - (b.z or 0) - return math.sqrt(dx * dx + dz * dz) -end - -local function _buildSphereVolume(point, radius) - local px = (point and point.x) or 0 - local pz = (point and point.z) or 0 - local py = (point and (point.y or point.alt)) - if py == nil and land and land.getHeight then - local ok, h = pcall(land.getHeight, { x = px, y = pz }) - if ok and type(h) == 'number' then py = h end - end - py = py or 0 - local volId = (world and world.VolumeType and world.VolumeType.SPHERE) or 0 - return { - id = volId, - params = { - point = { x = px, y = py, z = pz }, - radius = radius or 0, - } - } -end - --- Check if a crate is being sling-loaded by scanning for nearby helicopters --- Static objects don't have inAir() method, so we check if any unit is carrying it -local function _isCrateHooked(crateObj) - if not crateObj then return false end - - -- For dynamic objects (vehicles), inAir() works - if crateObj.inAir then - local ok, result = pcall(function() return crateObj:inAir() end) - if ok and result then return true end - end - - -- For static objects: check if the crate itself is elevated above ground - -- This indicates it's actually being carried, not just near a helicopter - local cratePos = crateObj:getPoint() - if not cratePos then return false end - - -- Get ground height at crate position - local landHeight = land.getHeight({x = cratePos.x, y = cratePos.z}) - if not landHeight then landHeight = 0 end - - -- If crate is more than 2 meters above ground, it's being carried - -- (accounts for terrain variations and crate size) - local heightAboveGround = cratePos.y - landHeight - if heightAboveGround > 2 then - return true - end - - return false -end - -local function _fmtTemplate(tpl, data) - if not tpl or tpl == '' then return '' end - -- Support placeholder keys with underscores (e.g., {zone_dist_u}) - return (tpl:gsub('{([%w_]+)}', function(k) - local v = data and data[k] - -- If value is missing, leave placeholder intact to aid debugging - if v == nil then return '{'..k..'}' end - return tostring(v) - end)) -end - -function CTLD:_FindNearestFriendlyTransport(position, side, radius) - if not position or not side then return nil end - radius = radius or 600 - local bestGroupName - local bestDist = math.huge - local sphere = _buildSphereVolume(position, radius) - world.searchObjects(Object.Category.UNIT, sphere, function(obj) - if not obj or (not obj.isExist or not obj:isExist()) then return true end - if not obj.getCoalition or obj:getCoalition() ~= side then return true end - local grp = obj.getGroup and obj:getGroup() - if not grp then return true end - local grpName = grp.getName and grp:getName() - if not grpName then return true end - local objPos = obj.getPoint and obj:getPoint() - local dist = _distanceXZ(position, objPos) - if dist < bestDist then - bestDist = dist - bestGroupName = grpName - end - return true - end) - if not bestGroupName then return nil end - local mooseGrp = GROUP:FindByName(bestGroupName) - return mooseGrp -end - -function CTLD:_SendSalvageHint(meta, messageKey, data, position, cooldown) - if not meta or not messageKey then return end - cooldown = cooldown or 10 - meta.hintCooldowns = meta.hintCooldowns or {} - local hintKey = messageKey - if data and data.zone then hintKey = hintKey .. ':' .. data.zone end - local now = timer.getTime() - local last = meta.hintCooldowns[hintKey] or 0 - if (now - last) < cooldown then return end - meta.hintCooldowns[hintKey] = now - - local template = self.Messages and self.Messages[messageKey] - if not template then return end - local text = _fmtTemplate(template, data or {}) - if not text or text == '' then return end - - local recipient = self:_FindNearestFriendlyTransport(position, meta.side, 700) - local recipientLabel - if recipient then - _msgGroup(recipient, text) - recipientLabel = recipient.GetName and recipient:GetName() or 'nearest transport' - else - _msgCoalition(meta.side, text) - recipientLabel = string.format('coalition-%s', meta.side == coalition.side.BLUE and 'BLUE' or 'RED') - end - - local zoneLabel = (data and data.zone) and (' zone '..tostring(data.zone)) or '' - _logInfo(string.format('[SlingLoadSalvage] Hint %s -> %s for crate %s%s', - messageKey, - recipientLabel or 'unknown recipient', - data and data.id or 'unknown', - zoneLabel)) -end - -function CTLD:_CheckCrateZoneHints(crateName, meta, cratePos) - if not meta or not cratePos then return end - local zoneSets = { - { list = self.PickupZones, active = self._ZoneActive and self._ZoneActive.Pickup, label = 'Pickup' }, - { list = self.FOBZones, active = self._ZoneActive and self._ZoneActive.FOB, label = 'FOB' }, - { list = self.DropZones, active = self._ZoneActive and self._ZoneActive.Drop, label = 'Drop' }, - } - - for _, entry in ipairs(zoneSets) do - local zones = entry.list or {} - if #zones > 0 then - for _, zone in ipairs(zones) do - local zoneName = zone:GetName() - local isActive = true - if entry.active and zoneName then - isActive = (entry.active[zoneName] ~= false) - end - if isActive and zone:IsVec3InZone(cratePos) then - self:_SendSalvageHint(meta, 'slingload_salvage_wrong_zone', { - id = crateName, - zone = zoneName, - zone_type = entry.label, - }, cratePos, 15) - return - end - end - end - end -end - - -- #endregion State - --- ========================= --- Utilities --- ========================= - -- #region Utilities - --- Select a random crate spawn point inside the zone while respecting separation rules. -function CTLD:_computeCrateSpawnPoint(zone, opts) - opts = opts or {} - if not zone or not zone.GetPointVec3 then return nil end - - local centerVec = zone:GetPointVec3() - if not centerVec then return nil end - local center = { x = centerVec.x, z = centerVec.z } - local rZone = self:_getZoneRadius(zone) - - local edgeBuf = math.max(0, opts.edgeBuffer or self.Config.PickupZoneSpawnEdgeBuffer or 10) - local minOff = math.max(0, opts.minOffset or self.Config.PickupZoneSpawnMinOffset or 5) - local extraPad = math.max(0, opts.additionalEdgeBuffer or 0) - local rMax = math.max(0, (rZone or 150) - edgeBuf - extraPad) - if rMax < 0 then rMax = 0 end - - local tries = math.max(1, opts.tries or self.Config.CrateSpawnSeparationTries or 6) - local minSep = opts.minSeparation - if minSep == nil then - minSep = math.max(0, self.Config.CrateSpawnMinSeparation or 7) - end - - local skipSeparation = opts.skipSeparationCheck == true - local ignoreCrates = {} - if opts.ignoreCrates then - for name,_ in pairs(opts.ignoreCrates) do - ignoreCrates[name] = true - end - end - - local preferred = opts.preferredPoint - local usePreferred = (preferred ~= nil) - - local function candidate() - if usePreferred then - usePreferred = false - return { x = preferred.x, z = preferred.z } - end - if (self.Config.PickupZoneSpawnRandomize == false) or rMax <= 0 then - return { x = center.x, z = center.z } - end - local rr - if rMax > minOff then - rr = minOff + math.sqrt(math.random()) * (rMax - minOff) - else - rr = rMax - end - local th = math.random() * 2 * math.pi - return { x = center.x + rr * math.cos(th), z = center.z + rr * math.sin(th) } - end - - local function isClear(pt) - if skipSeparation or minSep <= 0 then return true end - for name, meta in pairs(CTLD._crates) do - if not ignoreCrates[name] and meta and meta.side == self.Side and meta.point then - local dx = (meta.point.x - pt.x) - local dz = (meta.point.z - pt.z) - if (dx*dx + dz*dz) < (minSep*minSep) then - return false - end - end - end - return true - end - - local chosen = candidate() - if not chosen then return nil end - if not isClear(chosen) then - for _ = 1, tries - 1 do - local c = candidate() - if c and isClear(c) then - chosen = c - break - end - end - end - return chosen -end - --- Build a centered grid of offsets for cluster placement, keeping index 1 at the origin. -function CTLD:_buildClusterOffsets(count, spacing) - local offsets = {} - if count <= 0 then return offsets, 0, 0 end - - offsets[1] = { x = 0, z = 0 } - if count == 1 then return offsets, 1, 1 end - - local perRow = math.ceil(math.sqrt(count)) - local rows = math.ceil(count / perRow) - local positions = {} - - for r = 1, rows do - for c = 1, perRow do - local ox = (c - ((perRow + 1) / 2)) * spacing - local oz = (r - ((rows + 1) / 2)) * spacing - if math.abs(ox) > 0.01 or math.abs(oz) > 0.01 then - positions[#positions + 1] = { x = ox, z = oz } - end - end - end - - table.sort(positions, function(a, b) - local da = a.x * a.x + a.z * a.z - local db = b.x * b.x + b.z * b.z - if da == db then - if a.x == b.x then return a.z < b.z end - return a.x < b.x - end - return da < db - end) - - local idx = 2 - for _,pos in ipairs(positions) do - if idx > count then break end - offsets[idx] = pos - idx = idx + 1 - end - - return offsets, perRow, rows -end - --- Safe deep copy: prefer MOOSE UTILS.DeepCopy when available; fallback to Lua implementation -local function _deepcopy_fallback(obj, seen) - if type(obj) ~= 'table' then return obj end - seen = seen or {} - if seen[obj] then return seen[obj] end - local res = {} - seen[obj] = res - for k, v in pairs(obj) do - res[_deepcopy_fallback(k, seen)] = _deepcopy_fallback(v, seen) - end - local mt = getmetatable(obj) - if mt then setmetatable(res, mt) end - return res -end - -local function DeepCopy(obj) - if _G.UTILS and type(UTILS.DeepCopy) == 'function' then - return UTILS.DeepCopy(obj) - end - return _deepcopy_fallback(obj) -end - --- Deep-merge src into dst (recursively). Arrays/lists in src replace dst. -local function DeepMerge(dst, src) - if type(dst) ~= 'table' or type(src) ~= 'table' then return src end - for k, v in pairs(src) do - if type(v) == 'table' then - local isArray = (rawget(v, 1) ~= nil) - if isArray then - dst[k] = DeepCopy(v) - else - dst[k] = DeepMerge(dst[k] or {}, v) - end - else - dst[k] = v - end - end - return dst -end - -local function _trim(value) - if type(value) ~= 'string' then return nil end - return value:match('^%s*(.-)%s*$') -end - -local function _addUniqueString(out, seen, value) - local v = _trim(value) - if not v or v == '' then return end - if not seen[v] then - seen[v] = true - out[#out + 1] = v - end -end - -local function _collectTypesFromBuilder(builder) - local out = {} - if type(builder) ~= 'function' then return out end - local ok, template = pcall(builder, { x = 0, y = 0, z = 0 }, 0) - if not ok or type(template) ~= 'table' then return out end - local units = template.units - if type(units) ~= 'table' then return out end - local seen = {} - for _,unit in pairs(units) do - if type(unit) == 'table' then - _addUniqueString(out, seen, unit.type) - end - end - return out -end - -local _unitTypeCache = {} - -local function _tableHasEntries(tbl) - if type(tbl) ~= 'table' then return false end - for _,_ in pairs(tbl) do return true end - return false -end - -local function _tableSize(tbl) - if type(tbl) ~= 'table' then return 0 end - local count = 0 - for _,_ in pairs(tbl) do count = count + 1 end - return count -end - -local function _isUnitDatabaseReady() - local dbRoot = rawget(_G, 'db') - if type(dbRoot) ~= 'table' then return false, 'missing' end - local unitByType = dbRoot.unit_by_type - if type(unitByType) ~= 'table' then return false, 'no_unit_by_type' end - if _tableHasEntries(unitByType) then return true, 'ok' end - if _tableHasEntries(dbRoot.units) or _tableHasEntries(dbRoot.Units) then - -- Older builds expose data under units/Units before unit_by_type is populated - return true, 'ok' - end - return false, 'empty' -end - -local function _unitTypeExists(typeName) - local key = _trim(typeName) - if not key or key == '' then return false end - if _unitTypeCache[key] ~= nil then return _unitTypeCache[key] end - - local exists = false - local visited = {} - - local dbRoot = rawget(_G, 'db') - - -- Fast-path: common lookup table exposed by DCS - if type(dbRoot) == 'table' and type(dbRoot.unit_by_type) == 'table' then - if dbRoot.unit_by_type[key] ~= nil then - _unitTypeCache[key] = true - return true - end - end - - local function walk(tbl) - if exists or type(tbl) ~= 'table' or visited[tbl] then return end - visited[tbl] = true - - if tbl.type == key or tbl.Type == key or tbl.unitType == key or tbl.typeName == key or tbl.Name == key then - exists = true - return - end - - for k,v in pairs(tbl) do - if type(k) == 'string' and k == key then - exists = true - return - end - if type(v) == 'string' then - if (k == 'type' or k == 'Type' or k == 'unitType' or k == 'typeName' or k == 'Name') and v == key then - exists = true - return - end - elseif type(v) == 'table' then - walk(v) - if exists then return end - end - end - end - - if type(dbRoot) == 'table' then - if dbRoot.units then walk(dbRoot.units) end - if not exists and dbRoot.Units then walk(dbRoot.Units) end - if not exists and dbRoot.unit_by_type then walk(dbRoot.unit_by_type) end - end - - _unitTypeCache[key] = exists - return exists -end - --- Spatial indexing helpers for performance optimization -local function _getSpatialGridKey(x, z) - local gridSize = CTLD._spatialGridSize or 500 - local gx = math.floor(x / gridSize) - local gz = math.floor(z / gridSize) - return string.format("%d_%d", gx, gz) -end - -local function _addToSpatialGrid(name, meta, itemType) - if not meta or not meta.point then return end - local key = _getSpatialGridKey(meta.point.x, meta.point.z) - CTLD._spatialGrid[key] = CTLD._spatialGrid[key] or { crates = {}, troops = {} } - if itemType == 'crate' then - CTLD._spatialGrid[key].crates[name] = meta - elseif itemType == 'troops' then - CTLD._spatialGrid[key].troops[name] = meta - end -end - -local function _removeFromSpatialGrid(name, point, itemType) - if not point then return end - local key = _getSpatialGridKey(point.x, point.z) - local cell = CTLD._spatialGrid[key] - if cell then - if itemType == 'crate' then - cell.crates[name] = nil - elseif itemType == 'troops' then - cell.troops[name] = nil - end - -- Clean up empty cells - if not next(cell.crates) and not next(cell.troops) then - CTLD._spatialGrid[key] = nil - end - end -end - -local function _getNearbyFromSpatialGrid(x, z, maxDistance) - local gridSize = CTLD._spatialGridSize or 500 - local cellRadius = math.ceil(maxDistance / gridSize) + 1 - local centerGX = math.floor(x / gridSize) - local centerGZ = math.floor(z / gridSize) - - local nearby = { crates = {}, troops = {} } - for dx = -cellRadius, cellRadius do - for dz = -cellRadius, cellRadius do - local key = string.format("%d_%d", centerGX + dx, centerGZ + dz) - local cell = CTLD._spatialGrid[key] - if cell then - for name, meta in pairs(cell.crates) do - nearby.crates[name] = meta - end - for name, meta in pairs(cell.troops) do - nearby.troops[name] = meta - end - end - end - end - return nearby -end - -local function _isIn(list, value) - for _,v in ipairs(list or {}) do if v == value then return true end end - return false -end - -local function _vec3(x, y, z) - return { x = x, y = y, z = z } -end - -local function _distance3d(a, b) - if not a or not b then return math.huge end - local dx = (a.x or 0) - (b.x or 0) - local dy = (a.y or 0) - (b.y or 0) - local dz = (a.z or 0) - (b.z or 0) - return math.sqrt(dx * dx + dy * dy + dz * dz) -end - -local function _unitHasAttribute(unit, attr) - if not unit or not attr then return false end - local ok, res = pcall(function() return unit:hasAttribute(attr) end) - return ok and res == true -end - -local function _isDcsInfantry(unit) - if not unit then return false end - local tn = string.lower(unit:getTypeName() or '') - if tn:find('infantry') or tn:find('soldier') or tn:find('paratrooper') or tn:find('manpad') then - return true - end - return _unitHasAttribute(unit, 'Infantry') -end - -local function _hasLineOfSight(fromPos, toPos) - if not (fromPos and toPos) then return false end - local p1 = _vec3(fromPos.x, (fromPos.y or 0) + 2.0, fromPos.z) - local p2 = _vec3(toPos.x, (toPos.y or 0) + 2.0, toPos.z) - local ok, visible = pcall(function() return land.isVisible(p1, p2) end) - return ok and visible == true -end - -local function _jtacTargetScore(unit) - if not unit then return -1 end - if _unitHasAttribute(unit, 'SAM SR') or _unitHasAttribute(unit, 'SAM TR') or _unitHasAttribute(unit, 'SAM CC') or _unitHasAttribute(unit, 'SAM LN') then - return 120 - end - if _unitHasAttribute(unit, 'Air Defence') or _unitHasAttribute(unit, 'AAA') then - return 100 - end - if _unitHasAttribute(unit, 'IR Guided SAM') or _unitHasAttribute(unit, 'SAM') then - return 95 - end - if _unitHasAttribute(unit, 'Artillery') or _unitHasAttribute(unit, 'MLRS') then - return 80 - end - if _unitHasAttribute(unit, 'Armor') or _unitHasAttribute(unit, 'Tanks') then - return 70 - end - if _unitHasAttribute(unit, 'APC') or _unitHasAttribute(unit, 'IFV') then - return 60 - end - if _isDcsInfantry(unit) then - return 20 - end - return 40 -end - -local function _jtacTargetScoreProfiled(unit, profile) - -- Base score first - local base = _jtacTargetScore(unit) - local mult = 1.0 - local attribs = { - sam = _unitHasAttribute(unit, 'SAM') or _unitHasAttribute(unit, 'SAM SR') or _unitHasAttribute(unit, 'SAM TR') or _unitHasAttribute(unit, 'SAM LN') or _unitHasAttribute(unit, 'IR Guided SAM'), - aaa = _unitHasAttribute(unit, 'Air Defence') or _unitHasAttribute(unit, 'AAA'), - armor = _unitHasAttribute(unit, 'Armor') or _unitHasAttribute(unit, 'Tanks'), - ifv = _unitHasAttribute(unit, 'APC') or _unitHasAttribute(unit, 'Infantry Fighting Vehicle'), - arty = _unitHasAttribute(unit, 'Artillery') or _unitHasAttribute(unit, 'MLRS'), - inf = _isDcsInfantry(unit) - } - if profile == 'threat' then - if attribs.sam then mult = 1.6 elseif attribs.aaa then mult = 1.4 elseif attribs.armor then mult = 1.25 elseif attribs.ifv then mult = 1.15 elseif attribs.arty then mult = 1.1 elseif attribs.inf then mult = 0.8 end - elseif profile == 'armor' then - if attribs.armor then mult = 1.5 elseif attribs.ifv then mult = 1.3 elseif attribs.sam then mult = 1.25 elseif attribs.aaa then mult = 1.2 elseif attribs.arty then mult = 1.1 elseif attribs.inf then mult = 0.85 end - elseif profile == 'soft' then - if attribs.aaa then mult = 1.5 elseif attribs.arty then mult = 1.4 elseif attribs.inf then mult = 1.2 elseif attribs.ifv then mult = 1.1 elseif attribs.armor then mult = 1.0 elseif attribs.sam then mult = 0.9 end - elseif profile == 'inf_last' then - if attribs.inf then mult = 0.6 end - else - -- balanced; slight bump to SAM/AAA - if attribs.sam then mult = 1.3 elseif attribs.aaa then mult = 1.2 end - end - return math.floor(base * mult + 0.5) -end - -_msgGroup = function(group, text, t) - if not group then return end - MESSAGE:New(text, t or CTLD.Config.MessageDuration):ToGroup(group) -end - -_msgCoalition = function(side, text, t) - MESSAGE:New(text, t or CTLD.Config.MessageDuration):ToCoalition(side) -end - --- ========================= --- Logging Helpers --- ========================= --- Log levels: 0=NONE, 1=ERROR, 2=INFO, 3=VERBOSE, 4=DEBUG -local LOG_NONE = 0 -local LOG_ERROR = 1 -local LOG_INFO = 2 -local LOG_VERBOSE = 3 -local LOG_DEBUG = 4 - -local _logLevelLabels = { - [LOG_ERROR] = 'ERROR', - [LOG_INFO] = 'INFO', - [LOG_VERBOSE] = 'VERBOSE', - [LOG_DEBUG] = 'DEBUG', -} - -_log = function(level, msg) - local logLevel = CTLD.Config and CTLD.Config.LogLevel or LOG_INFO - if level > logLevel or level == LOG_NONE then return end - local label = _logLevelLabels[level] or tostring(level) - local text = string.format('[Moose_CTLD][%s] %s', label, tostring(msg)) - if env and env.info then - env.info(text) - else - print(text) - end -end - -_logError = function(msg) _log(LOG_ERROR, msg) end -_logInfo = function(msg) _log(LOG_INFO, msg) end --- Treat VERBOSE as DEBUG-only to reduce noise unless LogLevel is 4 -_logVerbose = function(msg) _log(LOG_DEBUG, msg) end -_logDebug = function(msg) _log(LOG_DEBUG, msg) end - --- Emits tagged messages regardless of configured LogLevel (used by explicit debug toggles) -_logImmediate = function(tag, msg) - local text = string.format('[Moose_CTLD][%s] %s', tag or 'DEBUG', tostring(msg)) - if env and env.info then - env.info(text) - else - print(text) - end -end - -local function _debugCrateSight(kind, params) - if not params or not params.unit then return end - CTLD._debugSightState = CTLD._debugSightState or {} - local key = string.format('%s:%s', kind, params.unit) - local state = CTLD._debugSightState[key] or {} - local now = params.now or timer.getTime() - local interval = params.interval or 1.0 - local step = params.step or 10.0 - local name = params.name or 'none' - local distance = params.distance or math.huge - local crateCount = params.count or 0 - local troopCount = params.troops or 0 - local shouldLog = false - - if not state.lastTime or interval <= 0 or (now - state.lastTime) >= interval then - shouldLog = true - end - if state.lastName ~= name then - shouldLog = true - end - if state.lastCount ~= crateCount or state.lastTroops ~= troopCount then - shouldLog = true - end - if distance ~= math.huge then - if not state.lastDist or math.abs(distance - state.lastDist) >= step then - shouldLog = true - end - elseif state.lastDist ~= math.huge then - shouldLog = true - end - - if not shouldLog then return end - - local distText = (distance ~= math.huge) and string.format('d=%.1f', distance) or 'd=n/a' - local summaryParts = { string.format('%d crate(s)', crateCount) } - if troopCount and troopCount > 0 then - table.insert(summaryParts, string.format('%d troop group(s)', troopCount)) - end - local summary = table.concat(summaryParts, ', ') - local noteParts = {} - if params.radius then table.insert(noteParts, string.format('radius=%dm', math.floor(params.radius))) end - if params.note then table.insert(noteParts, params.note) end - local noteText = (#noteParts > 0) and (' [' .. table.concat(noteParts, ' ') .. ']') or '' - local targetLabel = params.targetLabel or 'nearest' - local typeHint = params.typeHint and (' type=' .. params.typeHint) or '' - _logImmediate(kind, string.format('Unit %s tracking %s; %s=%s %s%s%s', - params.unit, summary, targetLabel, name, distText, typeHint, noteText)) - - state.lastTime = now - state.lastName = name - state.lastDist = distance - state.lastCount = crateCount - state.lastTroops = troopCount - CTLD._debugSightState[key] = state -end - -function CTLD:_collectEntryUnitTypes(entry) - local collected = {} - local seen = {} - if type(entry) ~= 'table' then return collected end - _addUniqueString(collected, seen, entry.unitType) - if type(entry.unitTypes) == 'table' then - for _,v in ipairs(entry.unitTypes) do - _addUniqueString(collected, seen, v) - end - end - if entry.build then - local fromBuilder = _collectTypesFromBuilder(entry.build) - for _,v in ipairs(fromBuilder) do - _addUniqueString(collected, seen, v) - end - end - return collected -end - -function CTLD:_validateCatalogUnitTypes() - if self._catalogValidated then return end - if self.Config and self.Config.SkipCatalogValidation then return end - - local dbReady, dbReason = _isUnitDatabaseReady() - if not dbReady then - if not self._catalogValidationDebugLogged then - self._catalogValidationDebugLogged = true - local dbRoot = rawget(_G, 'db') - local unitByTypeType = dbRoot and type(dbRoot.unit_by_type) or 'nil' - local unitsType = dbRoot and type(dbRoot.units) or 'nil' - local unitsAltType = dbRoot and type(dbRoot.Units) or 'nil' - local sampleKey = 'Soldier M4' - local sampleValue = (dbRoot and type(dbRoot.unit_by_type) == 'table') and dbRoot.unit_by_type[sampleKey] or nil - _logDebug(string.format('Catalog validation DB probe: reason=%s db=%s unit_by_type=%s units=%s Units=%s sample[%s]=%s', - tostring(dbReason), type(dbRoot), unitByTypeType, unitsType, unitsAltType, sampleKey, tostring(sampleValue))) - end - if dbReason == 'missing' or dbReason == 'no_unit_by_type' then - _logInfo('Catalog validation skipped: DCS mission scripting environment does not expose the global unit database (db/unit_by_type)') - self._catalogValidated = true - return - end - - self._catalogValidationRetries = (self._catalogValidationRetries or 0) + 1 - local retry = self._catalogValidationRetries - local retryLimit = 60 - if retry > retryLimit then - _logError('Catalog validation skipped: DCS unit database not available after repeated attempts') - self._catalogValidated = true - self._catalogValidationScheduled = nil - return - end - if timer and timer.scheduleFunction and timer.getTime then - if not self._catalogValidationScheduled then - self._catalogValidationScheduled = true - local delay = math.min(10, 1 + retry) - local instance = self - timer.scheduleFunction(function() - instance._catalogValidationScheduled = nil - instance._catalogValidated = nil - instance:_validateCatalogUnitTypes() - return nil - end, {}, timer.getTime() + delay) - end - if retry == 1 or (retry % 5 == 0) then - _logInfo(string.format('Catalog validation deferred: DCS unit database not ready yet (retry %d/%d)', retry, retryLimit)) - end - else - if retry == 1 then - _logInfo('Catalog validation deferred: DCS unit database not ready and timer API unavailable') - end - if retry >= 3 then - _logError('Catalog validation skipped: cannot access DCS unit database or schedule retries') - self._catalogValidated = true - end - end - return - end - - if self._catalogValidationRetries and self._catalogValidationRetries > 0 then - _unitTypeCache = {} - end - self._catalogValidationRetries = 0 - - local missing = {} - - local function markMissing(typeName, source) - local key = _trim(typeName) - if not key or key == '' then return end - local list = missing[key] - if not list then - list = {} - missing[key] = list - end - for _,ref in ipairs(list) do - if ref == source then return end - end - list[#list + 1] = source - end - - for key,entry in pairs(self.Config.CrateCatalog or {}) do - local types = self:_collectEntryUnitTypes(entry) - for _,unitType in ipairs(types) do - if not _unitTypeExists(unitType) then - markMissing(unitType, 'crate:'..tostring(key)) - end - end - end - - local troopDefs = (self.Config.Troops and self.Config.Troops.TroopTypes) or {} - for label,def in pairs(troopDefs) do - local function check(list, suffix) - for _,unitType in ipairs(list or {}) do - if not _unitTypeExists(unitType) then - markMissing(unitType, string.format('troop:%s:%s', tostring(label), suffix)) - end - end - end - check(def.unitsBlue, 'blue') - check(def.unitsRed, 'red') - check(def.units, 'fallback') - end - - if next(missing) then - for typeName, sources in pairs(missing) do - _logError(string.format('Catalog validation: unknown unit type "%s" referenced by %s', typeName, table.concat(sources, ', '))) - end - else - _logInfo('Catalog validation: all referenced unit types resolved in DCS database') - end - - self._catalogValidated = true -end - --- ========================= --- Zone and Unit Utilities --- ========================= - -local function _findZone(z) - if z.name then - local mz = ZONE:FindByName(z.name) - if mz then return mz end - end - if z.coord then - local r = z.radius or 150 - -- Create a Vec2 in a way that works even if MOOSE VECTOR2 class isn't available - local function _mkVec2(x, z) - if VECTOR2 and VECTOR2.New then return VECTOR2:New(x, z) end - -- DCS uses Vec2 with fields x and y - return { x = x, y = z } - end - local v = _mkVec2(z.coord.x, z.coord.z) - return ZONE_RADIUS:New(z.name or ('CTLD_ZONE_'..math.random(10000,99999)), v, r) - end - return nil -end - -local function _getUnitType(unit) - local ud = unit and unit:GetDesc() or nil - return ud and ud.typeName or unit and unit:GetTypeName() -end - --- Get aircraft capacity limits for crates and troops --- Returns { maxCrates, maxTroops, maxWeightKg } for the given unit --- Falls back to DefaultCapacity if aircraft type not specifically configured -local function _getAircraftCapacity(unit) - if not unit then - return { - maxCrates = CTLD.Config.DefaultCapacity.maxCrates or 4, - maxTroops = CTLD.Config.DefaultCapacity.maxTroops or 12, - maxWeightKg = CTLD.Config.DefaultCapacity.maxWeightKg or 2000 - } - end - - local unitType = _getUnitType(unit) - local capacities = CTLD.Config.AircraftCapacities or {} - local specific = capacities[unitType] - - if specific then - return { - maxCrates = specific.maxCrates or 0, - maxTroops = specific.maxTroops or 0, - maxWeightKg = specific.maxWeightKg or 0 - } - end - - -- Fallback to defaults - local defaults = CTLD.Config.DefaultCapacity or {} - return { - maxCrates = defaults.maxCrates or 4, - maxTroops = defaults.maxTroops or 12, - maxWeightKg = defaults.maxWeightKg or 2000 - } -end - --- Check if a unit is in the air (flying/hovering, not landed) --- Based on original CTLD logic: uses DCS InAir() API plus velocity threshold --- Returns: true if airborne, false if landed/grounded -local function _isUnitInAir(unit) - if not unit then return false end - - -- First check: DCS API InAir() - if it says we're on ground, trust it - if not unit:InAir() then - return false - end - - -- Second check: velocity threshold (handles edge cases where InAir() is true but we're stationary on ground) - -- Less than 0.05 m/s (~0.1 knots) = essentially stopped = consider landed - -- NOTE: AI can hold perfect hover, so only apply this check for player-controlled units - local vel = unit:GetVelocity() - if vel and unit:GetPlayerName() then - local vx = vel.x or 0 - local vz = vel.z or 0 - local groundSpeed = math.sqrt((vx * vx) + (vz * vz)) -- horizontal speed in m/s - if groundSpeed < 0.05 then - return false -- stopped on ground - end - end - - return true -- airborne -end - --- Get ground speed in m/s for a unit -local function _getGroundSpeed(unit) - if not unit then return 0 end - local vel = unit:GetVelocity() - if not vel or not vel.x or not vel.z then return 0 end - return math.sqrt(vel.x * vel.x + vel.z * vel.z) -end - --- Calculate height above ground level for a unit (meters) -local function _getUnitAGL(unit) - if not unit then return math.huge end - local pos = unit:GetPointVec3() - if not pos then return math.huge end - local terrain = 0 - if land and land.getHeight then - local success, h = pcall(land.getHeight, { x = pos.x, y = pos.z }) - if success and type(h) == 'number' then - terrain = h - end - end - return pos.y - terrain -end - -local function _nearestZonePoint(unit, list) - if not unit or not unit:IsAlive() then return nil end - -- Get unit position using DCS API to avoid dependency on MOOSE point methods - local uname = unit:GetName() - local du = Unit.getByName and Unit.getByName(uname) or nil - if not du or not du:getPoint() then return nil end - local up = du:getPoint() - local ux, uz = up.x, up.z - - local best, bestd = nil, nil - for _, z in ipairs(list or {}) do - local mz = _findZone(z) - local zx, zz - if z and z.name and trigger and trigger.misc and trigger.misc.getZone then - local tz = trigger.misc.getZone(z.name) - if tz and tz.point then zx, zz = tz.point.x, tz.point.z end - end - if (not zx) and mz and mz.GetPointVec3 then - local zp = mz:GetPointVec3() - -- Try to read numeric fields directly to avoid method calls - if zp and type(zp) == 'table' and zp.x and zp.z then zx, zz = zp.x, zp.z end - end - if (not zx) and z and z.coord then - zx, zz = z.coord.x, z.coord.z - end - - if zx and zz then - local dx = (zx - ux) - local dz = (zz - uz) - local d = math.sqrt(dx*dx + dz*dz) - if (not bestd) or d < bestd then best, bestd = mz, d end - end - end - if not best then return nil, nil end - return best, bestd -end - --- Check if a unit is inside a Pickup Zone. Returns (inside:boolean, zone, dist, radius) -function CTLD:_isUnitInsidePickupZone(unit, activeOnly) - if not unit or not unit:IsAlive() then return false, nil, nil, nil end - local zone, dist - if activeOnly then - zone, dist = self:_nearestActivePickupZone(unit) - else - local defs = self.Config and self.Config.Zones and self.Config.Zones.PickupZones or {} - zone, dist = _nearestZonePoint(unit, defs) - end - if not zone or not dist then return false, nil, nil, nil end - local r = self:_getZoneRadius(zone) - if not r then return false, zone, dist, nil end - return dist <= r, zone, dist, r -end - --- Helper: get nearest ACTIVE pickup zone (by configured list), respecting CTLD's active flags -function CTLD:_collectActivePickupDefs() - local out = {} - local added = {} -- Track added zone names to prevent duplicates - - -- From config-defined zones - local defs = (self.Config and self.Config.Zones and self.Config.Zones.PickupZones) or {} - for _, z in ipairs(defs) do - local n = z.name - if (not n) or self._ZoneActive.Pickup[n] ~= false then - table.insert(out, z) - if n then added[n] = true end - end - end - - -- From MOOSE zone objects if present (skip if already added from config) - if self.PickupZones and #self.PickupZones > 0 then - for _, mz in ipairs(self.PickupZones) do - if mz and mz.GetName then - local n = mz:GetName() - if self._ZoneActive.Pickup[n] ~= false and not added[n] then - table.insert(out, { name = n }) - added[n] = true - end - end - end - end - return out -end - -function CTLD:_nearestActivePickupZone(unit) - return _nearestZonePoint(unit, self:_collectActivePickupDefs()) -end - -local function _defaultCountryForSide(side) - if not (country and country.id) then return nil end - if side == coalition.side.BLUE then - return country.id.USA or country.id.CJTF_BLUE - elseif side == coalition.side.RED then - return country.id.RUSSIA or country.id.CJTF_RED - elseif side == coalition.side.NEUTRAL then - return country.id.UN or country.id.CJTF_NEUTRAL or country.id.USA - end - return nil -end - -local function _coalitionAddGroup(side, category, groupData, ctldConfig) - -- Enforce side/category in groupData just to be safe - groupData.category = category - local countryId = ctldConfig and ctldConfig.CountryId - if not countryId then - countryId = _defaultCountryForSide(side) - if ctldConfig then ctldConfig.CountryId = countryId end - end - if countryId then - groupData.country = countryId - end - - -- Apply air-spawn altitude adjustment for AIRPLANE category if DroneAirSpawn is enabled - if category == Group.Category.AIRPLANE and ctldConfig and ctldConfig.DroneAirSpawn and ctldConfig.DroneAirSpawn.Enabled then - if groupData.units and #groupData.units > 0 then - local altAGL = ctldConfig.DroneAirSpawn.AltitudeMeters or 3048 - local speed = ctldConfig.DroneAirSpawn.SpeedMps or 120 - - for _, unit in ipairs(groupData.units) do - -- Get terrain height at spawn location - local terrainHeight = land.getHeight({x = unit.x, y = unit.y}) - -- Set altitude ASL (Above Sea Level) - unit.alt = terrainHeight + altAGL - unit.speed = speed - -- Ensure unit has appropriate spawn type set - unit.alt_type = "BARO" -- Barometric altitude - end - end - end - - local addCountry = countryId or side - return coalition.addGroup(addCountry, category, groupData) -end - -local function _spawnStaticCargo(side, point, cargoType, name) - local static = { - name = name, - type = cargoType, - x = point.x, - y = point.z, - heading = 0, - canCargo = true, - } - return coalition.addStaticObject(side, static) -end - -local function _vec3FromUnit(unit) - local p = unit:GetPointVec3() - return { x = p.x, y = p.y, z = p.z } -end - --- Update DCS internal cargo weight based on loaded crates and troops --- This affects aircraft performance (hover, fuel consumption, speed, etc.) -local function _updateCargoWeight(group) - if not group then return end - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local gname = group:GetName() - local totalWeight = 0 - - -- Add weight from loaded crates - local crateData = CTLD._loadedCrates[gname] - if crateData and crateData.totalWeightKg then - totalWeight = totalWeight + crateData.totalWeightKg - end - - -- Add weight from loaded troops - local troopData = CTLD._troopsLoaded[gname] - if troopData and troopData.weightKg then - totalWeight = totalWeight + troopData.weightKg - end - - -- Call DCS API to set internal cargo weight (affects flight model) - local unitName = unit:GetName() - if unitName and trigger and trigger.action and trigger.action.setUnitInternalCargo then - pcall(function() - trigger.action.setUnitInternalCargo(unitName, totalWeight) - end) - end -end - --- Unique id generator for map markups (lines/circles/text) -local function _nextMarkupId() - CTLD._NextMarkupId = (CTLD._NextMarkupId or 10000) + 1 - return CTLD._NextMarkupId -end - -local function _spawnCrateSmoke(position, color, config, crateId) - if not position or not color then return end - - -- Parse config with defaults - local enabled = true - local autoRefresh = false - local refreshInterval = 240 - local maxRefreshDuration = 600 - local offsetMeters = 5 - local offsetRandom = true - local offsetVertical = 2 - - if config then - enabled = (config.Enabled ~= false) -- default true - autoRefresh = (config.AutoRefresh == true) - refreshInterval = tonumber(config.RefreshInterval) or 240 - maxRefreshDuration = tonumber(config.MaxRefreshDuration) or 600 - offsetMeters = tonumber(config.OffsetMeters) or 5 - offsetRandom = (config.OffsetRandom ~= false) -- default true - offsetVertical = tonumber(config.OffsetVertical) or 2 - end - - if not enabled then return end - - -- Compute ground-adjusted position with offsets - local sx, sz = position.x, position.z - local sy = position.y or 0 - if sy == 0 and land and land.getHeight then - local ok, h = pcall(land.getHeight, { x = sx, y = sz }) - if ok and type(h) == 'number' then sy = h end - end - - -- Apply lateral and vertical offsets - local ox, oz = 0, 0 - if offsetMeters > 0 then - local angle = offsetRandom and (math.random() * 2 * math.pi) or 0 - ox = offsetMeters * math.cos(angle) - oz = offsetMeters * math.sin(angle) - end - local smokePos = { x = sx + ox, y = sy + offsetVertical, z = sz + oz } - - -- Emit smoke now - local coord = COORDINATE:New(smokePos.x, smokePos.y, smokePos.z) - if coord and coord.Smoke then - if color == trigger.smokeColor.Green then - coord:SmokeGreen() - elseif color == trigger.smokeColor.Red then - coord:SmokeRed() - elseif color == trigger.smokeColor.White then - coord:SmokeWhite() - elseif color == trigger.smokeColor.Orange then - coord:SmokeOrange() - elseif color == trigger.smokeColor.Blue then - coord:SmokeBlue() - else - coord:SmokeGreen() - end - else - trigger.action.smoke(smokePos, color) - end - - -- Record smoke meta for global refresh loop instead of per-crate timer - if autoRefresh and crateId and refreshInterval > 0 and maxRefreshDuration > 0 then - CTLD._crates = CTLD._crates or {} - local meta = CTLD._crates[crateId] - if meta then - meta._smoke = meta._smoke or {} - if not meta._smoke.enabled then - meta._smoke.enabled = true - end - meta._smoke.auto = true - meta._smoke.startTime = timer.getTime() - meta._smoke.nextTime = timer.getTime() + refreshInterval - meta._smoke.interval = refreshInterval - meta._smoke.maxDuration = maxRefreshDuration - meta._smoke.color = color - meta._smoke.offsetMeters = offsetMeters - meta._smoke.offsetRandom = offsetRandom - meta._smoke.offsetVertical = offsetVertical - - -- Ensure background ticker(s) are running - if CTLD._ensureBackgroundTasks then - CTLD:_ensureBackgroundTasks() - end - end - end -end - --- Clean up smoke refresh schedule for a crate -local function _cleanupCrateSmoke(crateId) - if not crateId then return end - -- Clear legacy per-crate schedule if present - CTLD._smokeRefreshSchedules = CTLD._smokeRefreshSchedules or {} - if CTLD._smokeRefreshSchedules[crateId] then - if CTLD._smokeRefreshSchedules[crateId].funcId then - pcall(timer.removeFunction, CTLD._smokeRefreshSchedules[crateId].funcId) - end - CTLD._smokeRefreshSchedules[crateId] = nil - end - -- Clear new smoke meta so the global loop stops refreshing - if CTLD._crates and CTLD._crates[crateId] then - CTLD._crates[crateId]._smoke = nil - end -end - --- Central schedule registry helpers -function CTLD:_registerSchedule(key, funcId) - self._schedules = self._schedules or {} - if self._schedules[key] then - pcall(timer.removeFunction, self._schedules[key]) - end - self._schedules[key] = funcId -end - -function CTLD:_cancelSchedule(key) - if self._schedules and self._schedules[key] then - pcall(timer.removeFunction, self._schedules[key]) - self._schedules[key] = nil - end -end - --- Track one-shot timers for cleanup -local function _trackOneShotTimer(id) - if id and CTLD._pendingTimers then - CTLD._pendingTimers[id] = true - end - return id -end - --- Clean up one-shot timers when they execute -local function _wrapOneShotCallback(callback) - return function(...) - local result = callback(...) - -- If callback returns a time, it's recurring - don't remove - if not result or type(result) ~= 'number' then - local trackedId = nil - for id, _ in pairs(CTLD._pendingTimers or {}) do - if id == callback then - trackedId = id - break - end - end - if trackedId and CTLD._pendingTimers then - CTLD._pendingTimers[trackedId] = nil - end - end - return result - end -end - -local function _removeMenuHandle(menu) - if not menu or type(menu) ~= 'table' then return end - - local function _menuIsRegistered(m) - if not MENU_INDEX then return true end - if not m.Group or not m.MenuText then return true end - local okPath, path = pcall(function() - return MENU_INDEX:ParentPath(m.ParentMenu, m.MenuText) - end) - if not okPath or not path then - return false - end - local okHas, registered = pcall(function() - return MENU_INDEX:HasGroupMenu(m.Group, path) - end) - if not okHas then - return false - end - return registered == m - end - - if menu.Remove and _menuIsRegistered(menu) then - local ok, err = pcall(function() menu:Remove() end) - if not ok then - _logVerbose(string.format('[MenuCleanup] Failed to remove menu %s: %s', tostring(menu.MenuText), tostring(err))) - end - end - - if menu.Destroy then pcall(function() menu:Destroy() end) end - if menu.Delete then pcall(function() menu:Delete() end) end -end - -local function _countTableEntries(t) - if not t then return 0 end - local n = 0 - for _ in pairs(t) do n = n + 1 end - return n -end - -local function _cleanupGroupMenus(ctld, groupName) - if not (ctld and groupName) then return end - if ctld.MenusByGroup and ctld.MenusByGroup[groupName] then - _removeMenuHandle(ctld.MenusByGroup[groupName]) - ctld.MenusByGroup[groupName] = nil - end - if CTLD._inStockMenus and CTLD._inStockMenus[groupName] then - for _, menu in pairs(CTLD._inStockMenus[groupName]) do - _removeMenuHandle(menu) - end - CTLD._inStockMenus[groupName] = nil - end -end - -local function _clearPerGroupCaches(groupName) - if not groupName then return end - local caches = { - CTLD._troopsLoaded, - CTLD._loadedCrates, - CTLD._loadedTroopTypes, - CTLD._deployedTroops, - CTLD._buildConfirm, - CTLD._buildCooldown, - CTLD._medevacUnloadStates, - CTLD._medevacLoadStates, - CTLD._medevacEnrouteStates, - CTLD._coachOverride, - } - for _, tbl in ipairs(caches) do - if tbl then tbl[groupName] = nil end - end - if CTLD._msgState then - CTLD._msgState['GRP:'..groupName] = nil - end - - -- Note: One-shot timers are now self-cleaning via wrapper, but we log for visibility - _logVerbose(string.format('[CTLD] Cleared caches for group %s', groupName)) -end - -local function _clearPerUnitCachesForGroup(group) - if not group then return end - local units - local ok, res = pcall(function() return group:GetUnits() end) - if ok and type(res) == 'table' then - units = res - else - local okUnit, unit = pcall(function() return group:GetUnit(1) end) - if okUnit and unit then units = { unit } end - end - if not units then return end - for _, unit in ipairs(units) do - if unit then - local uname = unit.GetName and unit:GetName() - if uname then - if CTLD._hoverState then CTLD._hoverState[uname] = nil end - if CTLD._unitLast then CTLD._unitLast[uname] = nil end - if CTLD._coachState then CTLD._coachState[uname] = nil end - end - end - end -end - -local function _groupHasAliveTransport(group, allowedTypes) - if not (group and allowedTypes) then return false end - local units - local ok, res = pcall(function() return group:GetUnits() end) - if ok and type(res) == 'table' then - units = res - else - local okUnit, unit = pcall(function() return group:GetUnit(1) end) - if okUnit and unit then units = { unit } end - end - if not units then return false end - for _, unit in ipairs(units) do - if unit and unit.IsAlive and unit:IsAlive() then - local typ = _getUnitType(unit) - if typ and _isIn(allowedTypes, typ) then - return true - end - end - end - return false -end - -function CTLD:_cleanupTransportGroup(group, groupName) - local gname = groupName - if not gname and group and group.GetName then - gname = group:GetName() - end - if not gname then return end - - _cleanupGroupMenus(self, gname) - _clearPerGroupCaches(gname) - - if group then - _clearPerUnitCachesForGroup(group) - else - local mooseGroup = nil - if GROUP and GROUP.FindByName then - local ok, res = pcall(function() return GROUP:FindByName(gname) end) - if ok then mooseGroup = res end - end - if mooseGroup then _clearPerUnitCachesForGroup(mooseGroup) end - end - - _logDebug(string.format('[MenuCleanup] Cleared CTLD state for group %s', gname)) -end - -function CTLD:_removeDynamicSalvageZone(zoneName, reason) - if not zoneName then return end - - if self.SalvageDropZones then - for idx = #self.SalvageDropZones, 1, -1 do - local zone = self.SalvageDropZones[idx] - if zone and zone.GetName and zone:GetName() == zoneName then - table.remove(self.SalvageDropZones, idx) - end - end - end - - if self._ZoneDefs and self._ZoneDefs.SalvageDropZones then - self._ZoneDefs.SalvageDropZones[zoneName] = nil - end - - if self._ZoneActive and self._ZoneActive.SalvageDrop then - self._ZoneActive.SalvageDrop[zoneName] = nil - end - - if self._DynamicSalvageZones then - self._DynamicSalvageZones[zoneName] = nil - end - - if self._DynamicSalvageQueue then - for idx = #self._DynamicSalvageQueue, 1, -1 do - if self._DynamicSalvageQueue[idx] == zoneName then - table.remove(self._DynamicSalvageQueue, idx) - end - end - end - - self:_removeZoneDrawing('SalvageDrop', zoneName) - _logInfo(string.format('[SlingLoadSalvage] Removed dynamic salvage zone %s (%s)', zoneName, reason or 'cleanup')) - local ok, err = pcall(function() self:DrawZonesOnMap() end) - if not ok then - _logError(string.format('[SlingLoadSalvage] DrawZonesOnMap failed after removing %s: %s', zoneName, tostring(err))) - end -end - -function CTLD:_enforceDynamicSalvageZoneLimit() - local cfg = self.Config and self.Config.SlingLoadSalvage or nil - if not cfg or not cfg.Enabled then return end - - local zones = self._DynamicSalvageZones - if not zones then return end - - local lifetime = tonumber(cfg.DynamicZoneLifetime or 0) or 0 - local maxZones = tonumber(cfg.MaxDynamicZones or 0) or 0 - local now = timer and timer.getTime and timer.getTime() or 0 - - if lifetime > 0 then - local expired = {} - for name, meta in pairs(zones) do - if meta then - local expiresAt = meta.expiresAt - if not expiresAt and meta.createdAt then - expiresAt = meta.createdAt + lifetime - end - if expiresAt and now >= expiresAt then - table.insert(expired, name) - end - end - end - for _, zname in ipairs(expired) do - self:_removeDynamicSalvageZone(zname, 'expired') - end - end - - if maxZones > 0 and self._DynamicSalvageQueue then - while #self._DynamicSalvageQueue > maxZones do - local oldest = table.remove(self._DynamicSalvageQueue, 1) - if oldest and zones[oldest] then - self:_removeDynamicSalvageZone(oldest, 'max-cap') - end - end - end -end - --- Global smoke refresh ticker (single loop for all crates) -function CTLD:_ensureGlobalSmokeTicker() - if self._schedules and self._schedules.smokeTicker then return end - - local function tick() - local now = timer.getTime() - if CTLD and CTLD._crates then - for name, meta in pairs(CTLD._crates) do - if meta and meta._smoke and meta._smoke.auto and meta.point then - local s = meta._smoke - if (now - (s.startTime or now)) > (s.maxDuration or 0) then - meta._smoke = nil - elseif now >= (s.nextTime or 0) then - -- Spawn another puff - local pos = { x = meta.point.x, y = 0, z = meta.point.z } - if land and land.getHeight then - local ok, h = pcall(land.getHeight, { x = pos.x, y = pos.z }) - if ok and type(h) == 'number' then pos.y = h end - end - _spawnCrateSmoke(pos, s.color or trigger.smokeColor.Green, { - Enabled = true, - AutoRefresh = false, -- avoid recursion; we manage nextTime here - OffsetMeters = s.offsetMeters or 0, - OffsetRandom = s.offsetRandom ~= false, - OffsetVertical = s.offsetVertical or 0, - }, name) - s.nextTime = now + (s.interval or 240) - end - end - end - end - return timer.getTime() + 10 -- tick every 10s - end - - local id = timer.scheduleFunction(tick, nil, timer.getTime() + 10) - self:_registerSchedule('smokeTicker', id) -end - --- Periodic GC to prune stale messaging/coach entries and smoke meta -function CTLD:_ensurePeriodicGC() - if self._schedules and self._schedules.periodicGC then return end - - local function gcTick() - local now = timer.getTime() - - -- Coach state: remove units that no longer exist - if CTLD and CTLD._coachState then - for uname, _ in pairs(CTLD._coachState) do - local u = Unit.getByName(uname) - if not u then CTLD._coachState[uname] = nil end - end - end - - -- Message throttle state: remove dead/missing groups - if CTLD and CTLD._msgState then - for scope, _ in pairs(CTLD._msgState) do - local gname = string.match(scope, '^GRP:(.+)$') - if gname then - local g = Group.getByName(gname) - if not g then CTLD._msgState[scope] = nil end - end - end - end - - -- Smoke meta: prune crates without points or exceeded duration - if CTLD and CTLD._crates then - for name, meta in pairs(CTLD._crates) do - if meta and meta._smoke then - local s = meta._smoke - if (not meta.point) or ((now - (s.startTime or now)) > (s.maxDuration or 0)) then - meta._smoke = nil - end - end - end - end - - -- Enforce MEDEVAC crew limit (keep last 100 requests) - if CTLD and CTLD._medevacCrews then - local crewCount = 0 - local crewList = {} - for crewName, crewData in pairs(CTLD._medevacCrews) do - crewCount = crewCount + 1 - table.insert(crewList, { name = crewName, time = crewData.requestTime or 0 }) - end - if crewCount > 100 then - table.sort(crewList, function(a, b) return a.time < b.time end) - local toRemove = crewCount - 100 - for i = 1, toRemove do - local crewName = crewList[i].name - local crewData = CTLD._medevacCrews[crewName] - if crewData and crewData.markerID then - pcall(function() trigger.action.removeMark(crewData.markerID) end) - end - CTLD._medevacCrews[crewName] = nil - end - env.info(string.format('[CTLD][GC] Pruned %d old MEDEVAC crew entries', toRemove)) - end - end - - -- Enforce salvage crate limit (keep last 50 active crates per side) - if CTLD and CTLD._salvageCrates then - local crateBySide = { [coalition.side.BLUE] = {}, [coalition.side.RED] = {} } - for crateName, crateData in pairs(CTLD._salvageCrates) do - if crateData.side then - table.insert(crateBySide[crateData.side], { name = crateName, time = crateData.spawnTime or 0 }) - end - end - for side, crates in pairs(crateBySide) do - if #crates > 50 then - table.sort(crates, function(a, b) return a.time < b.time end) - local toRemove = #crates - 50 - for i = 1, toRemove do - local crateName = crates[i].name - local crateData = CTLD._salvageCrates[crateName] - if crateData and crateData.staticObject and crateData.staticObject.destroy then - pcall(function() crateData.staticObject:destroy() end) - end - CTLD._salvageCrates[crateName] = nil - end - local sideName = (side == coalition.side.BLUE and 'BLUE') or 'RED' - env.info(string.format('[CTLD][GC] Pruned %d old %s salvage crates', toRemove, sideName)) - end - end - end - - -- Clean up stale pending timer references - if CTLD and CTLD._pendingTimers then - local timerCount = 0 - for _ in pairs(CTLD._pendingTimers) do - timerCount = timerCount + 1 - end - if timerCount > 200 then - -- If we have too many pending timers, clear old ones (they may have fired already) - env.info(string.format('[CTLD][GC] Clearing %d stale timer references', timerCount)) - CTLD._pendingTimers = {} - end - end - - return timer.getTime() + 300 -- every 5 minutes - end - - local id = timer.scheduleFunction(gcTick, nil, timer.getTime() + 300) - self:_registerSchedule('periodicGC', id) -end - -function CTLD:_ensureBackgroundTasks() - if self._bgStarted then return end - self._bgStarted = true - self:_ensureGlobalSmokeTicker() - self:_ensurePeriodicGC() - self:_ensureAdaptiveBackgroundLoop() - self:_ensureSlingLoadEventHandler() - self:_startHourlyDiagnostics() -end - -function CTLD:_startHoverScheduler() - local coachCfg = CTLD.HoverCoachConfig or {} - if not coachCfg.enabled or self.HoverSched then return end - local interval = coachCfg.interval or 0.75 - local startDelay = coachCfg.startDelay or interval - self.HoverSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() self:ScanHoverPickup() end) - if not ok then _logError('HoverSched ScanHoverPickup error: '..tostring(err)) end - end, {}, startDelay, interval) -end - -function CTLD:_startGroundLoadScheduler() - local groundCfg = CTLD.GroundAutoLoadConfig or {} - if not groundCfg.Enabled or self.GroundLoadSched then return end - local interval = 1.0 -- check every second for ground load conditions - self.GroundLoadSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() self:ScanGroundAutoLoad() end) - if not ok then _logError('GroundLoadSched ScanGroundAutoLoad error: '..tostring(err)) end - end, {}, interval, interval) -end - --- Adaptive background loop consolidating salvage checks and periodic pruning -function CTLD:_ensureAdaptiveBackgroundLoop() - if self._schedules and self._schedules.backgroundLoop then return end - - local function backgroundTick() - local now = timer.getTime() - - -- Salvage crate housekeeping - local cfg = self.Config.SlingLoadSalvage - local activeCrates = 0 - if cfg and cfg.Enabled then - for _, meta in pairs(CTLD._salvageCrates) do - if meta and meta.side == self.Side then - activeCrates = activeCrates + 1 - end - end - - -- Run the standard checker to handle delivery/expiration - local ok, err = pcall(function() self:_CheckSlingLoadSalvageCrates() end) - if not ok then - _logError('[SlingLoadSalvage] backgroundTick error: '..tostring(err)) - end - - -- Stale crate cleanup: destroy any crate that lost its static object reference - for cname, meta in pairs(CTLD._salvageCrates) do - if meta and (not meta.staticObject or (meta.staticObject.destroy and not meta.staticObject:isExist())) then - CTLD._salvageCrates[cname] = nil - end - end - - -- Dynamic salvage zone lifetime enforcement - self:_enforceDynamicSalvageZoneLimit() - end - - -- Hover coach cleanup: remove entries for missing units - if CTLD._coachState then - for uname, _ in pairs(CTLD._coachState) do - if not Unit.getByName(uname) then - CTLD._coachState[uname] = nil - end - end - end - - -- Ensure the hover scan scheduler matches active transport presence - local hasTransports = false - for gname, _ in pairs(self.MenusByGroup or {}) do - local grp = nil - if GROUP and GROUP.FindByName then - local ok, res = pcall(function() return GROUP:FindByName(gname) end) - if ok then grp = res end - end - if grp and grp:IsAlive() then - hasTransports = true - break - end - if not grp and Group and Group.getByName then - local ok, dcsGrp = pcall(function() return Group.getByName(gname) end) - if ok and dcsGrp and dcsGrp:isExist() then - hasTransports = true - break - end - end - end - - if hasTransports then - if (not self.HoverSched) and self._startHoverScheduler then - pcall(function() self:_startHoverScheduler() end) - end - else - if self.HoverSched and self.HoverSched.Stop then - pcall(function() self.HoverSched:Stop() end) - end - self.HoverSched = nil - end - - -- Determine next wake interval based on active salvage crates - local baseInterval = (cfg and cfg.DetectionInterval) or 5 - local adaptive = (cfg and cfg.AdaptiveIntervals) or {} - local nextInterval - if activeCrates == 0 then - nextInterval = adaptive.idle or math.max(baseInterval * 2, 10) - elseif activeCrates <= 20 then - nextInterval = adaptive.low or math.max(baseInterval * 2, 10) - elseif activeCrates <= 35 then - nextInterval = adaptive.medium or math.max(baseInterval * 3, 15) - else - nextInterval = adaptive.high or math.max(baseInterval * 4, 20) - end - nextInterval = math.min(nextInterval, 30) - - CTLD._lastSalvageInterval = nextInterval - - return now + nextInterval - end - - local id = timer.scheduleFunction(function() - local nextTime = backgroundTick() - return nextTime - end, nil, timer.getTime() + 2) - self:_registerSchedule('backgroundLoop', id) -end - -function CTLD:_ensureSlingLoadEventHandler() - -- No event handler needed - we use inAir() checks like original CTLD.lua - if self._slingHandlerRegistered then return end - self._slingHandlerRegistered = true -end - -function CTLD:_startHourlyDiagnostics() - if not (timer and timer.scheduleFunction) then return end - if self._schedules and self._schedules.hourlyDiagnostics then return end - - local function diagTick() - local salvageCount = 0 - for _, _ in ipairs(self.SalvageDropZones or {}) do salvageCount = salvageCount + 1 end - local menuCount = _countTableEntries(self.MenusByGroup) - local dynamicCount = _countTableEntries(self._DynamicSalvageZones) - local sideLabel = (self.Side == coalition.side.BLUE and 'BLUE') - or (self.Side == coalition.side.RED and 'RED') - or (self.Side == coalition.side.NEUTRAL and 'NEUTRAL') - or tostring(self.Side) - - -- Comprehensive memory usage stats - local cratesCount = _countTableEntries(CTLD._crates) - local medevacCrewsCount = _countTableEntries(CTLD._medevacCrews) - local salvageCratesCount = _countTableEntries(CTLD._salvageCrates) - local coachStateCount = _countTableEntries(CTLD._coachState) - local hoverStateCount = _countTableEntries(CTLD._hoverState) - local pendingTimersCount = _countTableEntries(CTLD._pendingTimers) - local msgStateCount = _countTableEntries(CTLD._msgState) - - env.info(string.format('[CTLD][SoakTest][%s] salvageZones=%d dynamicZones=%d menus=%d', - sideLabel, salvageCount, dynamicCount, menuCount)) - env.info(string.format('[CTLD][Memory][%s] crates=%d medevacCrews=%d salvageCrates=%d coachState=%d hoverState=%d pendingTimers=%d msgState=%d', - sideLabel, cratesCount, medevacCrewsCount, salvageCratesCount, coachStateCount, hoverStateCount, pendingTimersCount, msgStateCount)) - - return timer.getTime() + 3600 - end - - local id = timer.scheduleFunction(function() - return diagTick() - end, nil, timer.getTime() + 3600) - self:_registerSchedule('hourlyDiagnostics', id) -end - -local function _ctldHelperGet() - local ctldClass = _G._MOOSE_CTLD or CTLD - if not ctldClass then - env.info('[CTLD] Runtime helper unavailable: CTLD not loaded') - return nil - end - return ctldClass -end - -local function _ctldSideName(side) - if side == coalition.side.BLUE then return 'BLUE' end - if side == coalition.side.RED then return 'RED' end - if side == coalition.side.NEUTRAL then return 'NEUTRAL' end - return tostring(side or 'nil') -end - -local function _ctldFormatSeconds(secs) - if not secs or secs <= 0 then return '0s' end - local minutes = math.floor(secs / 60) - local seconds = math.floor(secs % 60) - if minutes > 0 then - return string.format('%dm%02ds', minutes, seconds) - end - return string.format('%ds', seconds) -end - -if not _G.CTLD_DumpRuntimeStats then - function _G.CTLD_DumpRuntimeStats() - local ctldClass = _ctldHelperGet() - if not ctldClass then return end - - local now = timer and timer.getTime and timer.getTime() or 0 - local salvageBySide = {} - local oldestBySide = {} - for name, meta in pairs(ctldClass._salvageCrates or {}) do - if meta and meta.side then - salvageBySide[meta.side] = (salvageBySide[meta.side] or 0) + 1 - if meta.spawnTime then - local age = now - meta.spawnTime - if age > (oldestBySide[meta.side] or 0) then - oldestBySide[meta.side] = age - end - end - end - end - - local medevacCount = 0 - for _ in pairs(ctldClass._medevacCrews or {}) do - medevacCount = medevacCount + 1 - end - - env.info(string.format('[CTLD] Active salvage crates: BLUE=%d RED=%d', - salvageBySide[coalition.side.BLUE] or 0, - salvageBySide[coalition.side.RED] or 0)) - env.info(string.format('[CTLD] Oldest salvage crate age: BLUE=%s RED=%s', - _ctldFormatSeconds(oldestBySide[coalition.side.BLUE] or 0), - _ctldFormatSeconds(oldestBySide[coalition.side.RED] or 0))) - env.info(string.format('[CTLD] Active MEDEVAC crews: %d', medevacCount)) - - local totalSchedules = 0 - local instanceCount = 0 - for _, inst in ipairs(ctldClass._instances or {}) do - instanceCount = instanceCount + 1 - if inst._schedules then - for _ in pairs(inst._schedules) do - totalSchedules = totalSchedules + 1 - end - end - for key, value in pairs(inst) do - if type(value) == 'table' and value.Stop and key:match('Sched') then - totalSchedules = totalSchedules + 1 - end - end - end - - env.info(string.format('[CTLD] Instances: %d, scheduler objects (approx): %d', instanceCount, totalSchedules)) - env.info(string.format('[CTLD] Last salvage loop interval: %s', _ctldFormatSeconds(ctldClass._lastSalvageInterval or 0))) - end -end - -if not _G.CTLD_DumpCrateAges then - function _G.CTLD_DumpCrateAges() - local ctldClass = _ctldHelperGet() - if not ctldClass then return end - - local crates = {} - local now = timer and timer.getTime and timer.getTime() or 0 - local lifetime = (ctldClass.Config and ctldClass.Config.SlingLoadSalvage and ctldClass.Config.SlingLoadSalvage.CrateLifetime) or 0 - for name, meta in pairs(ctldClass._salvageCrates or {}) do - local age = meta.spawnTime and (now - meta.spawnTime) or 0 - table.insert(crates, { - name = name, - side = meta.side, - age = age, - remaining = math.max(0, lifetime - age), - weight = meta.weight or 0, - }) - end - - table.sort(crates, function(a, b) return a.age > b.age end) - - env.info(string.format('[CTLD] Listing %d salvage crates (lifetime=%ss)', #crates, tostring(lifetime))) - for i = 1, math.min(#crates, 25) do - local c = crates[i] - env.info(string.format('[CTLD] #%02d %s side=%s weight=%dkg age=%s remaining=%s', - i, c.name, _ctldSideName(c.side), c.weight, - _ctldFormatSeconds(c.age), _ctldFormatSeconds(c.remaining))) - end - end -end - -if not _G.CTLD_ListSchedules then - function _G.CTLD_ListSchedules() - local ctldClass = _ctldHelperGet() - if not ctldClass then return end - - local instances = ctldClass._instances or {} - if #instances == 0 then - env.info('[CTLD] No CTLD instances registered') - return - end - - for idx, inst in ipairs(instances) do - local sideLabel = _ctldSideName(inst.Side) - env.info(string.format('[CTLD] Instance #%d side=%s', idx, sideLabel)) - - if inst._schedules then - for key, funcId in pairs(inst._schedules) do - env.info(string.format(' [timer] key=%s funcId=%s', tostring(key), tostring(funcId))) - end - end - - for key, value in pairs(inst) do - if type(value) == 'table' and value.Stop and key:match('Sched') then - local running = 'unknown' - if type(value.IsRunning) == 'function' then - local ok, res = pcall(value.IsRunning, value) - if ok then running = tostring(res) end - end - env.info(string.format(' [sched] key=%s running=%s', tostring(key), running)) - end - end - end - end -end - --- Spawn smoke for MEDEVAC crews with offset system --- position: {x, y, z} table --- smokeColor: trigger.smokeColor enum value --- config: MEDEVAC config table (for offset settings) -local function _spawnMEDEVACSmoke(position, smokeColor, config) - if not position or not smokeColor then return end - - -- Apply smoke offset system - local smokePos = { - x = position.x, - y = land.getHeight({x = position.x, y = position.z}), - z = position.z - } - - local offsetMeters = (config and config.SmokeOffsetMeters) or 5 - local offsetRandom = (not config or config.SmokeOffsetRandom ~= false) -- default true - local offsetVertical = (config and config.SmokeOffsetVertical) or 2 - - if offsetMeters > 0 then - local angle = 0 -- North by default - if offsetRandom then - angle = math.random() * 2 * math.pi -- Random direction - end - smokePos.x = smokePos.x + offsetMeters * math.cos(angle) - smokePos.z = smokePos.z + offsetMeters * math.sin(angle) - end - smokePos.y = smokePos.y + offsetVertical - - -- Spawn smoke using MOOSE COORDINATE (better appearance) or fallback to trigger.action.smoke - local coord = COORDINATE:New(smokePos.x, smokePos.y, smokePos.z) - if coord and coord.Smoke then - if smokeColor == trigger.smokeColor.Green then - coord:SmokeGreen() - elseif smokeColor == trigger.smokeColor.Red then - coord:SmokeRed() - elseif smokeColor == trigger.smokeColor.White then - coord:SmokeWhite() - elseif smokeColor == trigger.smokeColor.Orange then - coord:SmokeOrange() - elseif smokeColor == trigger.smokeColor.Blue then - coord:SmokeBlue() - else - coord:SmokeRed() -- default - end - else - trigger.action.smoke(smokePos, smokeColor) - end -end - --- Resolve a zone's center (vec3) and radius (meters). --- Accepts a MOOSE ZONE object returned by _findZone/ZONE:FindByName/ZONE_RADIUS:New -function CTLD:_getZoneCenterAndRadius(mz) - if not mz then return nil, nil end - local name = mz.GetName and mz:GetName() or nil - -- Prefer Mission Editor zone data if available - if name and trigger and trigger.misc and trigger.misc.getZone then - local z = trigger.misc.getZone(name) - if z and z.point and z.radius then - local p = { x = z.point.x, y = z.point.y or 0, z = z.point.z } - return p, z.radius - end - end - -- Fall back to MOOSE zone center - local pv = mz.GetPointVec3 and mz:GetPointVec3() or nil - local p = pv and { x = pv.x, y = pv.y or 0, z = pv.z } or nil - -- Try to fetch a configured radius from our zone defs - local r - if name and self._ZoneDefs then - local d = self._ZoneDefs.PickupZones and self._ZoneDefs.PickupZones[name] - or self._ZoneDefs.DropZones and self._ZoneDefs.DropZones[name] - or self._ZoneDefs.FOBZones and self._ZoneDefs.FOBZones[name] - or self._ZoneDefs.MASHZones and self._ZoneDefs.MASHZones[name] - if d and d.radius then r = d.radius end - end - r = r or (mz.GetRadius and mz:GetRadius()) or 150 - return p, r -end - --- Draw a circle and label for a zone on the F10 map for this coalition. --- kind: 'Pickup' | 'Drop' | 'FOB' | 'MASH' -function CTLD:_drawZoneCircleAndLabel(kind, mz, opts) - if not (trigger and trigger.action and trigger.action.circleToAll and trigger.action.textToAll) then return end - opts = opts or {} - local p, r = self:_getZoneCenterAndRadius(mz) - if not p or not r then return end - local side = (opts.ForAll and -1) or self.Side - local outline = opts.OutlineColor or {0,1,0,0.85} - local fill = opts.FillColor or {0,1,0,0.15} - local lineType = opts.LineType or 1 - local readOnly = (opts.ReadOnly ~= false) - local fontSize = opts.FontSize or 18 - local labelPrefix = opts.LabelPrefix or 'Zone' - local zname = (mz.GetName and mz:GetName()) or '(zone)' - local circleId = _nextMarkupId() - local textId = _nextMarkupId() - trigger.action.circleToAll(side, circleId, p, r, outline, fill, lineType, readOnly, "") - local label = string.format('%s: %s', labelPrefix, zname) - -- Place label centered above the circle (12 o'clock). Horizontal nudge via LabelOffsetX. - -- Simple formula: extra offset from edge = r * ratio + fromEdge - local extra = (r * (opts.LabelOffsetRatio or 0.0)) + (opts.LabelOffsetFromEdge or 30) - local nx = p.x + (opts.LabelOffsetX or 0) - local nz = p.z - (r + (extra or 0)) - local textPos = { x = nx, y = 0, z = nz } - trigger.action.textToAll(side, textId, textPos, {1,1,1,0.9}, {0,0,0,0}, fontSize, readOnly, label) - -- Track ids so they can be cleared later - self._MapMarkup = self._MapMarkup or { Pickup = {}, Drop = {}, FOB = {}, MASH = {}, SalvageDrop = {} } - self._MapMarkup[kind] = self._MapMarkup[kind] or {} - self._MapMarkup[kind][zname] = { circle = circleId, text = textId } -end - -function CTLD:ClearMapDrawings() - if not (self._MapMarkup and trigger and trigger.action and trigger.action.removeMark) then return end - for _, byName in pairs(self._MapMarkup) do - for _, ids in pairs(byName) do - if ids.circle then pcall(trigger.action.removeMark, ids.circle) end - if ids.text then pcall(trigger.action.removeMark, ids.text) end - end - end - self._MapMarkup = { Pickup = {}, Drop = {}, FOB = {}, MASH = {}, SalvageDrop = {} } -end - -function CTLD:_removeZoneDrawing(kind, zname) - if not (self._MapMarkup and self._MapMarkup[kind] and self._MapMarkup[kind][zname]) then return end - local ids = self._MapMarkup[kind][zname] - if ids.circle then pcall(trigger.action.removeMark, ids.circle) end - if ids.text then pcall(trigger.action.removeMark, ids.text) end - self._MapMarkup[kind][zname] = nil -end - --- Public: set a specific zone active/inactive by kind and name -function CTLD:SetZoneActive(kind, name, active, silent) - if not (kind and name) then return end - local k = (kind == 'Pickup' or kind == 'Drop' or kind == 'FOB' or kind == 'MASH') and kind or nil - if not k then return end - self._ZoneActive = self._ZoneActive or { Pickup = {}, Drop = {}, FOB = {}, MASH = {} } - self._ZoneActive[k][name] = (active ~= false) - -- Update drawings for this one zone only - if self.Config.MapDraw and self.Config.MapDraw.Enabled then - -- Find the MOOSE zone object by name - local list = (k=='Pickup' and self.PickupZones) or (k=='Drop' and self.DropZones) or (k=='FOB' and self.FOBZones) or (k=='MASH' and self.MASHZones) or {} - local mz - for _,z in ipairs(list or {}) do if z and z.GetName and z:GetName() == name then mz = z break end end - if self._ZoneActive[k][name] then - if mz then - local md = self.Config.MapDraw - local opts = { - OutlineColor = md.OutlineColor, - FillColor = (md.FillColors and md.FillColors[k]) or nil, - LineType = (md.LineTypes and md.LineTypes[k]) or md.LineType or 1, - FontSize = md.FontSize, - ReadOnly = (md.ReadOnly ~= false), - LabelOffsetX = md.LabelOffsetX, - LabelOffsetFromEdge = md.LabelOffsetFromEdge, - LabelOffsetRatio = md.LabelOffsetRatio, - LabelPrefix = ((md.LabelPrefixes and md.LabelPrefixes[k]) - or (k=='Pickup' and md.LabelPrefix) - or (k..' Zone')) - } - self:_drawZoneCircleAndLabel(k, mz, opts) - end - else - self:_removeZoneDrawing(k, name) - end - end - -- Optional messaging - local stateStr = self._ZoneActive[k][name] and 'ACTIVATED' or 'DEACTIVATED' - _logVerbose(string.format('Zone %s %s (%s)', tostring(name), stateStr, k)) - if not silent then - local msgKey = self._ZoneActive[k][name] and 'zone_activated' or 'zone_deactivated' - _eventSend(self, nil, self.Side, msgKey, { kind = k, zone = name }) - end -end - -function CTLD:DrawZonesOnMap() - local md = self.Config and self.Config.MapDraw or {} - if not md.Enabled then return end - -- Clear previous drawings before re-drawing - self:ClearMapDrawings() - local opts = { - OutlineColor = md.OutlineColor, - LineType = md.LineType, - FontSize = md.FontSize, - ReadOnly = (md.ReadOnly ~= false), - LabelPrefix = md.LabelPrefix or 'Zone', - LabelOffsetX = md.LabelOffsetX, - LabelOffsetFromEdge = md.LabelOffsetFromEdge, - LabelOffsetRatio = md.LabelOffsetRatio, - ForAll = (md.ForAll == true), - } - if md.DrawPickupZones then - for _,mz in ipairs(self.PickupZones or {}) do - local name = mz:GetName() - if self._ZoneActive.Pickup[name] ~= false then - opts.LabelPrefix = (md.LabelPrefixes and md.LabelPrefixes.Pickup) or md.LabelPrefix or 'Pickup Zone' - opts.LineType = (md.LineTypes and md.LineTypes.Pickup) or md.LineType or 1 - opts.FillColor = (md.FillColors and md.FillColors.Pickup) or nil - self:_drawZoneCircleAndLabel('Pickup', mz, opts) - end - end - end - if md.DrawDropZones then - for _,mz in ipairs(self.DropZones or {}) do - local name = mz:GetName() - if self._ZoneActive.Drop[name] ~= false then - opts.LabelPrefix = (md.LabelPrefixes and md.LabelPrefixes.Drop) or 'Drop Zone' - opts.LineType = (md.LineTypes and md.LineTypes.Drop) or md.LineType or 1 - opts.FillColor = (md.FillColors and md.FillColors.Drop) or nil - self:_drawZoneCircleAndLabel('Drop', mz, opts) - end - end - end - if md.DrawFOBZones then - for _,mz in ipairs(self.FOBZones or {}) do - local name = mz:GetName() - if self._ZoneActive.FOB[name] ~= false then - opts.LabelPrefix = (md.LabelPrefixes and md.LabelPrefixes.FOB) or 'FOB Zone' - opts.LineType = (md.LineTypes and md.LineTypes.FOB) or md.LineType or 1 - opts.FillColor = (md.FillColors and md.FillColors.FOB) or nil - self:_drawZoneCircleAndLabel('FOB', mz, opts) - end - end - end - if md.DrawMASHZones then - for _,mz in ipairs(self.MASHZones or {}) do - local name = mz:GetName() - if self._ZoneActive.MASH[name] ~= false then - opts.LabelPrefix = (md.LabelPrefixes and md.LabelPrefixes.MASH) or 'MASH' - opts.LineType = (md.LineTypes and md.LineTypes.MASH) or md.LineType or 1 - opts.FillColor = (md.FillColors and md.FillColors.MASH) or nil - self:_drawZoneCircleAndLabel('MASH', mz, opts) - end - end - if CTLD._mashZones then - for mashId, data in pairs(CTLD._mashZones) do - if data and data.side == self.Side and data.isMobile then - local zoneName = data.displayName or mashId - if self._ZoneActive.MASH[zoneName] ~= false then - opts.LabelPrefix = (md.LabelPrefixes and md.LabelPrefixes.MASH) or 'MASH' - opts.LineType = (md.LineTypes and md.LineTypes.MASH) or md.LineType or 1 - opts.FillColor = (md.FillColors and md.FillColors.MASH) or nil - local zoneObj = data.zone - if not (zoneObj and zoneObj.GetPointVec3 and zoneObj.GetRadius) then - local pos = data.position or { x = 0, z = 0 } - if ZONE_RADIUS and VECTOR2 then - local v2 = (VECTOR2 and VECTOR2.New) and VECTOR2:New(pos.x, pos.z) or { x = pos.x, y = pos.z } - zoneObj = ZONE_RADIUS:New(zoneName, v2, data.radius or 500) - else - local posCopy = { x = pos.x, z = pos.z } - zoneObj = {} - function zoneObj:GetName() - return zoneName - end - function zoneObj:GetPointVec3() - return { x = posCopy.x, y = 0, z = posCopy.z } - end - function zoneObj:GetRadius() - return data.radius or 500 - end - end - data.zone = zoneObj - end - if zoneObj then - self:_drawZoneCircleAndLabel('MASH', zoneObj, opts) - end - end - end - end - end - end - if md.DrawSalvageZones then - for _,mz in ipairs(self.SalvageDropZones or {}) do - local name = mz:GetName() - if self._ZoneActive.SalvageDrop[name] ~= false then - opts.LabelPrefix = (md.LabelPrefixes and md.LabelPrefixes.SalvageDrop) or 'Salvage Zone' - opts.LineType = (md.LineTypes and md.LineTypes.SalvageDrop) or md.LineType or 1 - opts.FillColor = (md.FillColors and md.FillColors.SalvageDrop) or self.Config.SlingLoadSalvage.ZoneColors.fill - self:_drawZoneCircleAndLabel('SalvageDrop', mz, opts) - end - end - end -end - --- Unit preference detection and unit-aware formatting -local function _getPlayerIsMetric(unit) - local ok, isMetric = pcall(function() - local pname = unit and unit.GetPlayerName and unit:GetPlayerName() or nil - if pname and CTLD and CTLD._playerUnitPrefs then - local pref = CTLD._playerUnitPrefs[pname] - if pref == 'metric' then return true end - if pref == 'imperial' then return false end - end - if pname and type(SETTINGS) == 'table' and SETTINGS.Set then - local ps = SETTINGS:Set(pname) - if ps and ps.IsMetric then return ps:IsMetric() end - end - if _SETTINGS and _SETTINGS.IsMetric then return _SETTINGS:IsMetric() end - return true - end) - return (ok and isMetric) and true or false -end - -function CTLD:_SetGroupUnitPreference(group, mode) - if not group or not group:IsAlive() then return end - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then - _msgGroup(group, 'No active player unit to bind preference.') - return - end - local pname = unit.GetPlayerName and unit:GetPlayerName() or nil - if not pname or pname == '' then - _msgGroup(group, 'Unit preference requires a player-controlled slot.') - return - end - if mode ~= 'metric' and mode ~= 'imperial' and mode ~= nil then - _msgGroup(group, 'Invalid units selection requested.') - return - end - self._playerUnitPrefs = self._playerUnitPrefs or {} - if mode then - self._playerUnitPrefs[pname] = mode - else - self._playerUnitPrefs[pname] = nil - end - local label - if mode == 'metric' then - label = 'metric (meters)' - elseif mode == 'imperial' then - label = 'imperial (nautical miles / feet)' - else - label = 'mission default' - end - _msgGroup(group, string.format('CTLD units preference set to %s for %s.', label, pname)) -end - -function CTLD:_ShowGroupUnitPreference(group) - if not group or not group:IsAlive() then return end - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then - _msgGroup(group, 'No active player unit to inspect preference.') - return - end - local pname = unit.GetPlayerName and unit:GetPlayerName() or nil - if not pname or pname == '' then - _msgGroup(group, 'Unit preference requires a player-controlled slot.') - return - end - local prefs = self._playerUnitPrefs or {} - local explicit = prefs[pname] - local effective = _getPlayerIsMetric(unit) and 'metric (meters)' or 'imperial (nautical miles / feet)' - local source = explicit and 'CTLD preference' or 'mission default' - if explicit == 'metric' then - effective = 'metric (meters)' - elseif explicit == 'imperial' then - effective = 'imperial (nautical miles / feet)' - end - _msgGroup(group, string.format('%s units setting: %s (source: %s).', pname, effective, source)) -end - -local function _round(n, prec) - local m = 10^(prec or 0) - return math.floor(n * m + 0.5) / m -end - -local function _fmtDistance(meters, isMetric) - if isMetric then - local v = math.max(0, _round(meters, 0)) - return v, 'm' - else - local ft = meters * 3.28084 - -- snap to 5 ft increments for readability - ft = math.max(0, math.floor((ft + 2.5) / 5) * 5) - return ft, 'ft' - end -end - -local function _fmtRange(meters, isMetric) - meters = math.max(0, meters or 0) - if isMetric then - if meters >= 1000 then - local km = meters / 1000 - local prec = (km >= 10) and 0 or 1 - return _round(km, prec), 'km' - end - return _round(meters, 0), 'm' - else - local nm = meters / 1852 - local prec = (nm >= 10) and 0 or 1 - return _round(nm, prec), 'NM' - end -end - -local function _fmtSpeed(mps, isMetric) - if isMetric then - return _round(mps, 1), 'm/s' - else - local fps = mps * 3.28084 - return math.max(0, math.floor(fps + 0.5)), 'ft/s' - end -end - -local function _fmtAGL(meters, isMetric) - return _fmtDistance(meters, isMetric) -end - --- Coalition utility: return opposite side (BLUE<->RED); NEUTRAL returns RED by default -local function _enemySide(side) - if coalition and coalition.side then - if side == coalition.side.BLUE then return coalition.side.RED end - if side == coalition.side.RED then return coalition.side.BLUE end - end - return coalition.side.RED -end - --- Find nearest enemy-held base within radius; returns {point=vec3, name=string, dist=meters} -function CTLD:_findNearestEnemyBase(point, radius) - local enemy = _enemySide(self.Side) - local ok, bases = pcall(function() - if coalition and coalition.getAirbases then return coalition.getAirbases(enemy) end - return {} - end) - if not ok or not bases then return nil end - local best - for _,ab in ipairs(bases) do - local p = ab:getPoint() - local dx = (p.x - point.x); local dz = (p.z - point.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= radius and ((not best) or d < best.dist) then - best = { point = { x = p.x, z = p.z }, name = ab:getName() or 'Base', dist = d } - end - end - return best -end - --- Find nearest enemy ground group centroid within radius; returns {point=vec3, group=GROUP|nil, dcsGroupName=string, dist=meters, type=string} -function CTLD:_findNearestEnemyGround(point, radius) - local enemy = _enemySide(self.Side) - local best - -- Use MOOSE SET_GROUP to enumerate enemy ground groups - local set = SET_GROUP:New():FilterCoalitions(enemy):FilterCategories(Group.Category.GROUND):FilterActive(true):FilterStart() - set:ForEachGroup(function(g) - local alive = g:IsAlive() - if alive then - local c = g:GetCoordinate() - if c then - local v3 = c:GetVec3() - local dx = (v3.x - point.x); local dz = (v3.z - point.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= radius and ((not best) or d < best.dist) then - -- Try to infer a type label from first unit - local ut = 'unit' - local u1 = g:GetUnit(1) - if u1 then ut = _getUnitType(u1) or ut end - best = { point = { x = v3.x, z = v3.z }, group = g, dcsGroupName = g:GetName(), dist = d, type = ut } - end - end - end - end) - return best -end - --- Order a ground group by name to move toward target point at a given speed (km/h). Uses MOOSE route when available. -function CTLD:_orderGroundGroupToPointByName(groupName, targetPoint, speedKmh) - if not groupName or not targetPoint then return end - local mg - local ok = pcall(function() mg = GROUP:FindByName(groupName) end) - if ok and mg then - local vec2 = (VECTOR2 and VECTOR2.New) and VECTOR2:New(targetPoint.x, targetPoint.z) or { x = targetPoint.x, y = targetPoint.z } - -- RouteGroundTo(speed km/h). Use pcall to avoid mission halt if API differs. - local _, _ = pcall(function() mg:RouteGroundTo(vec2, speedKmh or 25) end) - return - end - -- Fallback: DCS Group controller simple mission to single waypoint - local dg = Group.getByName(groupName) - if not dg then return end - local ctrl = dg:getController() - if not ctrl then return end - -- Try to set a simple go-to task - local task = { - id = 'Mission', - params = { - route = { - points = { - { - x = targetPoint.x, y = targetPoint.z, speed = 5, action = 'Off Road', task = {}, type = 'Turning Point', ETA = 0, ETA_locked = false, - } - } - } - } - } - pcall(function() ctrl:setTask(task) end) -end - --- Assign attack behavior to a newly spawned ground group by name -function CTLD:_assignAttackBehavior(groupName, originPoint, isVehicle) - if not (self.Config.AttackAI and self.Config.AttackAI.Enabled) then return end - local radius = isVehicle and (self.Config.AttackAI.VehicleSearchRadius or 5000) or (self.Config.AttackAI.TroopSearchRadius or 3000) - local prioBase = (self.Config.AttackAI.PrioritizeEnemyBases ~= false) - local speed = isVehicle and (self.Config.AttackAI.VehicleAdvanceSpeedKmh or 35) or (self.Config.AttackAI.TroopAdvanceSpeedKmh or 20) - local player = 'Player' - -- Try to infer last requesting player from crate/troop context is complex; caller should pass announcements separately when needed. - -- Target selection - local target - local pickedBase - if prioBase then - local base = self:_findNearestEnemyBase(originPoint, radius) - if base then target = { point = base.point, name = base.name, kind = 'base', dist = base.dist } pickedBase = base end - end - if not target then - local eg = self:_findNearestEnemyGround(originPoint, radius) - if eg then target = { point = eg.point, name = eg.dcsGroupName, kind = 'enemy', dist = eg.dist, etype = eg.type } end - end - -- Order movement if we have a target - if target then - self:_orderGroundGroupToPointByName(groupName, target.point, speed) - end - return target -- caller will handle announcement -end - -local function _bearingDeg(from, to) - local dx = (to.x - from.x) - local dz = (to.z - from.z) - local ang = math.deg(math.atan2(dx, dz)) -- 0=N, +CW - if ang < 0 then ang = ang + 360 end - return math.floor(ang + 0.5) -end - --- Normalize MOOSE/DCS heading to both radians and degrees consistently. --- Some environments may yield degrees; others radians. This returns (rad, deg). -local function _headingRadDeg(unit) - local h = (unit and unit.GetHeading and unit:GetHeading()) or 0 - local hrad, hdeg - if h and h > (2*math.pi + 0.1) then - -- Looks like degrees - hdeg = h % 360 - hrad = math.rad(hdeg) - else - -- Radians (normalize into [0, 2pi)) - hrad = (h or 0) % (2*math.pi) - hdeg = math.deg(hrad) - end - return hrad, hdeg -end - -local function _projectToBodyFrame(dx, dz, hdg) - -- world (east=X=dx, north=Z=dz) to body frame (fwd/right) - local fwd = dx * math.sin(hdg) + dz * math.cos(hdg) - local right = dx * math.cos(hdg) - dz * math.sin(hdg) - return right, fwd -end - -local function _playerNameFromGroup(group) - if not group then return 'Player' end - local unit = group:GetUnit(1) - local pname = unit and unit.GetPlayerName and unit:GetPlayerName() - if pname and pname ~= '' then return pname end - return group:GetName() or 'Player' -end - -local function _coachSend(self, group, unitName, key, data, isCoach) - local cfg = CTLD.HoverCoachConfig or {} - if cfg.enabled and (not self.HoverSched) then - if self._startHoverScheduler then - self:_startHoverScheduler() - end - end - local now = timer.getTime() - CTLD._coachState[unitName] = CTLD._coachState[unitName] or { lastKeyTimes = {} } - local st = CTLD._coachState[unitName] - local last = st.lastKeyTimes[key] or 0 - local minGap = isCoach and ((cfg.throttle and cfg.throttle.coachUpdate) or 1.5) or ((cfg.throttle and cfg.throttle.generic) or 3.0) - local repeatGap = (cfg.throttle and cfg.throttle.repeatSame) or (minGap * 2) - if last > 0 and (now - last) < minGap then return end - -- prevent repeat spam of identical key too fast (only after first send) - if last > 0 and (now - last) < repeatGap then return end - local tpl = CTLD.Messages and CTLD.Messages[key] - if not tpl then return end - local text = _fmtTemplate(tpl, data) - if text and text ~= '' then - _msgGroup(group, text) - st.lastKeyTimes[key] = now - end -end - -local _groundLoadFallbacks = { - Start = "Ground crew on it—{count} crate(s) ready in {seconds}s.", - Progress = "Loading steady—{remaining}s to go.", - Complete = "Ground load complete—{count} crate(s) secure.", -} - -local function _prepareGroundLoadMessage(self, category, data) - data = data or {} - local comms = self.GroundLoadComms or {} - local pool = comms and comms[category] - local tpl - if pool and #pool > 0 then - tpl = pool[math.random(#pool)] - else - tpl = _groundLoadFallbacks[category] - end - data.ground_line = _fmtTemplate(tpl or '', data) - return data -end - -local function _eventSend(self, group, side, key, data) - local now = timer.getTime() - local scopeKey - if group then scopeKey = 'GRP:'..group:GetName() else scopeKey = 'COAL:'..tostring(side or self.Side) end - CTLD._msgState[scopeKey] = CTLD._msgState[scopeKey] or { lastKeyTimes = {} } - local st = CTLD._msgState[scopeKey] - local last = st.lastKeyTimes[key] or 0 - local cfg = CTLD.HoverCoachConfig - local minGap = (cfg and cfg.throttle and cfg.throttle.generic) or 3.0 - local repeatGap = (cfg and cfg.throttle and cfg.throttle.repeatSame) or (minGap * 2) - if last > 0 and (now - last) < minGap then return end - if last > 0 and (now - last) < repeatGap then return end - local tpl = CTLD.Messages and CTLD.Messages[key] - if not tpl then return end - local text = _fmtTemplate(tpl, data) - if not text or text == '' then return end - if group then _msgGroup(group, text) else _msgCoalition(side or self.Side, text) end - st.lastKeyTimes[key] = now -end - --- Format helpers for menu labels and recipe info -function CTLD:_recipeTotalCrates(def) - if not def then return 1 end - if type(def.requires) == 'table' then - local n = 0 - for _,qty in pairs(def.requires) do n = n + (qty or 0) end - return math.max(1, n) - end - return math.max(1, def.required or 1) -end - -function CTLD:_friendlyNameForKey(key) - local d = self.Config and self.Config.CrateCatalog and self.Config.CrateCatalog[key] - if not d then return tostring(key) end - return (d.menu or d.description or key) -end - -function CTLD:_formatMenuLabelWithCrates(key, def) - local base = (def and (def.menu or def.description)) or key - local total = self:_recipeTotalCrates(def) - local suffix = (total == 1) and '1 crate' or (tostring(total)..' crates') - -- Optionally append stock for UX; uses nearest pickup zone dynamically - if self.Config.Inventory and self.Config.Inventory.ShowStockInMenu then - local group = nil - -- Try to find any active group menu owner to infer nearest zone; if none, skip hint - for gname,_ in pairs(self.MenusByGroup or {}) do group = GROUP:FindByName(gname); if group then break end end - if group and group:IsAlive() then - local unit = group:GetUnit(1) - if unit and unit:IsAlive() then - local zone, dist = _nearestZonePoint(unit, self.Config.Zones and self.Config.Zones.PickupZones or {}) - if zone and dist and dist <= (self.Config.PickupZoneMaxDistance or 10000) then - local zname = zone:GetName() - -- For composite recipes, show bundle availability based on component stock; otherwise show per-key stock - if def and type(def.requires) == 'table' then - local stockTbl = CTLD._stockByZone[zname] or {} - local bundles = math.huge - for reqKey, qty in pairs(def.requires) do - local have = tonumber(stockTbl[reqKey] or 0) or 0 - local need = tonumber(qty or 0) or 0 - if need > 0 then bundles = math.min(bundles, math.floor(have / need)) end - end - if bundles == math.huge then bundles = 0 end - return string.format('%s (%s) [%s: %d bundle%s]', base, suffix, zname, bundles, (bundles==1 and '' or 's')) - else - local stock = (CTLD._stockByZone[zname] and CTLD._stockByZone[zname][key]) or 0 - return string.format('%s (%s) [%s: %d]', base, suffix, zname, stock) - end - end - end - end - end - return string.format('%s (%s)', base, suffix) -end - -function CTLD:_formatRecipeInfo(key, def) - local lines = {} - local title = self:_friendlyNameForKey(key) - table.insert(lines, string.format('%s', title)) - if def and def.isFOB then table.insert(lines, '(FOB recipe)') end - if def and type(def.requires) == 'table' then - local total = self:_recipeTotalCrates(def) - table.insert(lines, string.format('Requires: %d crate(s) total', total)) - table.insert(lines, 'Breakdown:') - -- stable order - local items = {} - for k,qty in pairs(def.requires) do table.insert(items, {k=k, q=qty}) end - table.sort(items, function(a,b) return tostring(a.k) < tostring(b.k) end) - for _,it in ipairs(items) do - local fname = self:_friendlyNameForKey(it.k) - table.insert(lines, string.format('- %dx %s', it.q or 1, fname)) - end - else - local n = self:_recipeTotalCrates(def) - table.insert(lines, string.format('Requires: %d crate(s)', n)) - end - if def and def.dcsCargoType then - table.insert(lines, string.format('Cargo type: %s', tostring(def.dcsCargoType))) - end - return table.concat(lines, '\n') -end - --- Determine an approximate radius for a ZONE. Tries MOOSE radius, then trigger zone radius, then configured radius. -function CTLD:_getZoneRadius(zone) - if zone and zone.Radius then return zone.Radius end - local name = zone and zone.GetName and zone:GetName() or nil - if name and trigger and trigger.misc and trigger.misc.getZone then - local z = trigger.misc.getZone(name) - if z and z.radius then return z.radius end - end - if name and self._ZoneDefs and self._ZoneDefs.FOBZones and self._ZoneDefs.FOBZones[name] then - local d = self._ZoneDefs.FOBZones[name] - if d and d.radius then return d.radius end - end - return 150 -end - --- Check if a 2D point (x,z) lies within any FOB zone; returns (bool, zone) -function CTLD:IsPointInFOBZones(point) - for _,z in ipairs(self.FOBZones or {}) do - local pz = z:GetPointVec3() - local r = self:_getZoneRadius(z) - local dx = (pz.x - point.x) - local dz = (pz.z - point.z) - if (dx*dx + dz*dz) <= (r*r) then return true, z end - end - return false, nil -end - --- #endregion Utilities - --- ========================= --- Construction --- ========================= --- #region Construction -function CTLD:New(cfg) - local o = setmetatable({}, self) - o.Config = DeepCopy(CTLD.Config) - if cfg then o.Config = DeepMerge(o.Config, cfg) end - - -- Debug: check if MASH zones survived the merge - _logDebug('After config merge:') - _logDebug(' o.Config.Zones exists: '..tostring(o.Config.Zones ~= nil)) - if o.Config.Zones then - _logDebug(' o.Config.Zones.MASHZones exists: '..tostring(o.Config.Zones.MASHZones ~= nil)) - if o.Config.Zones.MASHZones then - _logDebug(' o.Config.Zones.MASHZones count: '..tostring(#o.Config.Zones.MASHZones)) - end - end - - o.Side = o.Config.CoalitionSide - o.CountryId = o.Config.CountryId or _defaultCountryForSide(o.Side) - o.Config.CountryId = o.CountryId - o.MenuRoots = {} - o.MenusByGroup = {} - o._DynamicSalvageZones = {} - o._DynamicSalvageQueue = {} - o._jtacRegistry = {} - - -- Ground auto-load state tracking - CTLD._groundLoadState = CTLD._groundLoadState or {} - CTLD._groundLoadTimers = CTLD._groundLoadTimers or {} - - -- If caller disabled builtin catalog, clear it before merging any globals - if o.Config.UseBuiltinCatalog == false then - o.Config.CrateCatalog = {} - end - - -- If a global catalog was loaded earlier (via DO SCRIPT FILE), merge it automatically - -- Supported globals: _CTLD_EXTRACTED_CATALOG (our extractor), CTLD_CATALOG, MOOSE_CTLD_CATALOG - do - local globalsToCheck = { '_CTLD_EXTRACTED_CATALOG', 'CTLD_CATALOG', 'MOOSE_CTLD_CATALOG' } - for _,gn in ipairs(globalsToCheck) do - local t = rawget(_G, gn) - if type(t) == 'table' then - o:MergeCatalog(t) - _logInfo('Merged crate catalog from global '..gn) - end - end - end - - -- Load troop types from catalog if available - do - local troopTypes = rawget(_G, '_CTLD_TROOP_TYPES') - if type(troopTypes) == 'table' and next(troopTypes) then - o.Config.Troops.TroopTypes = troopTypes - _logInfo('Loaded troop types from _CTLD_TROOP_TYPES') - else - -- Fallback: catalog not loaded, warn user and provide minimal defaults - _logError('WARNING: _CTLD_TROOP_TYPES not found. Catalog may not be loaded. Using minimal troop fallbacks.') - _logError('Please ensure catalog file is loaded via DO SCRIPT FILE *before* creating CTLD instances.') - -- Minimal fallback troop types to prevent spawning wrong units - o.Config.Troops.TroopTypes = { - AS = { label = 'Assault Squad', size = 8, unitsBlue = { 'Soldier M4' }, unitsRed = { 'Infantry AK' }, units = { 'Infantry AK' } }, - AA = { label = 'MANPADS Team', size = 4, unitsBlue = { 'Soldier stinger' }, unitsRed = { 'SA-18 Igla-S manpad' }, units = { 'Infantry AK' } }, - AT = { label = 'AT Team', size = 4, unitsBlue = { 'Soldier M136' }, unitsRed = { 'Soldier RPG' }, units = { 'Infantry AK' } }, - AR = { label = 'Mortar Team', size = 4, unitsBlue = { '2B11 mortar' }, unitsRed = { '2B11 mortar' }, units = { '2B11 mortar' } }, - } - end - end - - -- Run unit type validation after catalogs/troop types load so issues surface early - o:_validateCatalogUnitTypes() - - o:InitZones() - -- Validate configured zones and warn if missing - o:ValidateZones() - -- Optional: draw configured zones on the F10 map - if o.Config.MapDraw and o.Config.MapDraw.Enabled then - -- Defer a tiny bit to ensure mission environment is fully up - timer.scheduleFunction(function() - pcall(function() o:DrawZonesOnMap() end) - end, {}, timer.getTime() + 1) - end - -- Optional: bind zone activation to mission flags (merge from config table and per-zone flag fields) - do - local merged = {} - -- Collect from explicit bindings (backward compatible) - if o.Config.ZoneEventBindings then - for _,b in ipairs(o.Config.ZoneEventBindings) do table.insert(merged, b) end - end - -- Collect from per-zone entries (preferred) - local function pushFromZones(kind, list) - for _,z in ipairs(list or {}) do - if z and z.name and z.flag then - table.insert(merged, { kind = kind, name = z.name, flag = z.flag, activeWhen = z.activeWhen or 1 }) - end - end - end - pushFromZones('Pickup', o.Config.Zones and o.Config.Zones.PickupZones) - pushFromZones('Drop', o.Config.Zones and o.Config.Zones.DropZones) - pushFromZones('FOB', o.Config.Zones and o.Config.Zones.FOBZones) - pushFromZones('MASH', o.Config.Zones and o.Config.Zones.MASHZones) - pushFromZones('SalvageDrop', o.Config.Zones and o.Config.Zones.SalvageDropZones) - - o._BindingsMerged = merged - if o._BindingsMerged and #o._BindingsMerged > 0 then - o._ZoneFlagState = {} - o._ZoneFlagsPrimed = false - o.ZoneFlagSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() - if not o._ZoneFlagsPrimed then - -- Prime states on first run without spamming messages - for _,b in ipairs(o._BindingsMerged) do - if b and b.flag and b.kind and b.name then - local val = (trigger and trigger.misc and trigger.misc.getUserFlag) and trigger.misc.getUserFlag(b.flag) or 0 - local activeWhen = (b.activeWhen ~= nil) and b.activeWhen or 1 - local shouldBeActive = (val == activeWhen) - local key = tostring(b.kind)..'|'..tostring(b.name) - o._ZoneFlagState[key] = shouldBeActive - o:SetZoneActive(b.kind, b.name, shouldBeActive, true) - end - end - o._ZoneFlagsPrimed = true - return - end - -- Subsequent runs: announce changes - for _,b in ipairs(o._BindingsMerged) do - if b and b.flag and b.kind and b.name then - local val = (trigger and trigger.misc and trigger.misc.getUserFlag) and trigger.misc.getUserFlag(b.flag) or 0 - local activeWhen = (b.activeWhen ~= nil) and b.activeWhen or 1 - local shouldBeActive = (val == activeWhen) - local key = tostring(b.kind)..'|'..tostring(b.name) - if o._ZoneFlagState[key] ~= shouldBeActive then - o._ZoneFlagState[key] = shouldBeActive - o:SetZoneActive(b.kind, b.name, shouldBeActive, false) - end - end - end - end) - if not ok then _logError('ZoneFlagSched error: '..tostring(err)) end - end, {}, 1, 1) - end - end - o:InitMenus() - - -- Initialize inventory for configured pickup zones (seed from catalog initialStock) - if o.Config.Inventory and o.Config.Inventory.Enabled then - pcall(function() o:InitInventory() end) - end - - -- Initialize MEDEVAC system - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - pcall(function() o:InitMEDEVAC() end) - end - - -- Periodic cleanup for crates - o.Sched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() o:CleanupCrates() end) - if not ok then _logError('CleanupCrates scheduler error: '..tostring(err)) end - end, {}, 60, 60) - - -- Periodic cleanup for deployed troops (remove dead/missing groups) - o.TroopCleanupSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() o:CleanupDeployedTroops() end) - if not ok then _logError('CleanupDeployedTroops scheduler error: '..tostring(err)) end - end, {}, 30, 30) - - -- Optional: auto-build FOBs inside FOB zones when crates present - if o.Config.AutoBuildFOBInZones then - o.AutoFOBSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() o:AutoBuildFOBCheck() end) - if not ok then _logError('AutoBuildFOBCheck scheduler error: '..tostring(err)) end - end, {}, 10, 10) -- check every 10 seconds (tunable) - end - - -- Optional: hover pickup scanner - local coachCfg = CTLD.HoverCoachConfig or {} - if coachCfg.enabled then - o.HoverSched = nil - o:_startHoverScheduler() - end - - -- Optional: ground auto-load scanner - local groundCfg = CTLD.GroundAutoLoadConfig or {} - if groundCfg.Enabled then - o.GroundLoadSched = nil - o:_startGroundLoadScheduler() - end - - -- MEDEVAC auto-pickup and auto-unload scheduler - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - local checkInterval = (CTLD.MEDEVAC.AutoPickup and CTLD.MEDEVAC.AutoPickup.CheckInterval) or 3 - o.MEDEVACSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() o:ScanMEDEVACAutoActions() end) - if not ok then _logError('MEDEVAC auto-actions scheduler error: '..tostring(err)) end - end, {}, checkInterval, checkInterval) - end - - if o.Config.JTAC and o.Config.JTAC.Enabled then - local jtacInterval = 5 - if o.Config.JTAC.AutoLase then - local refresh = tonumber(o.Config.JTAC.AutoLase.RefreshSeconds) or 15 - local idle = tonumber(o.Config.JTAC.AutoLase.IdleRescanSeconds) or 30 - jtacInterval = math.max(2, math.min(refresh, idle, 10)) - end - o.JTACSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() o:_tickJTACs() end) - if not ok then _logError('JTAC tick scheduler error: '..tostring(err)) end - end, {}, jtacInterval, jtacInterval) - _logInfo(string.format('JTAC init: Enabled=TRUE AutoLase=%s SearchRadius=%s Refresh=%s IdleRescan=%s LockType=%s Verbose=%s Interval=%.1f', - tostring(o.Config.JTAC.AutoLase and o.Config.JTAC.AutoLase.Enabled ~= false), - tostring(o.Config.JTAC.AutoLase and o.Config.JTAC.AutoLase.SearchRadius), - tostring(o.Config.JTAC.AutoLase and o.Config.JTAC.AutoLase.RefreshSeconds), - tostring(o.Config.JTAC.AutoLase and o.Config.JTAC.AutoLase.IdleRescanSeconds), - tostring(o.Config.JTAC.LockType), - tostring(o.Config.JTAC.Verbose), - jtacInterval)) - end - - table.insert(CTLD._instances, o) - o:_ensureBackgroundTasks() - local versionLabel = CTLD.Version or 'unknown' - _msgCoalition(o.Side, string.format('CTLD %s initialized for coalition', versionLabel)) - return o -end - -function CTLD:InitZones() - self.PickupZones = {} - self.DropZones = {} - self.FOBZones = {} - self.MASHZones = {} - self.SalvageDropZones = {} - self._ZoneDefs = { PickupZones = {}, DropZones = {}, FOBZones = {}, MASHZones = {}, SalvageDropZones = {} } - self._ZoneActive = { Pickup = {}, Drop = {}, FOB = {}, MASH = {}, SalvageDrop = {} } - for _,z in ipairs(self.Config.Zones.PickupZones or {}) do - local mz = _findZone(z) - if mz then - table.insert(self.PickupZones, mz) - local name = mz:GetName() - self._ZoneDefs.PickupZones[name] = z - if self._ZoneActive.Pickup[name] == nil then self._ZoneActive.Pickup[name] = (z.active ~= false) end - end - end - for _,z in ipairs(self.Config.Zones.DropZones or {}) do - local mz = _findZone(z) - if mz then - table.insert(self.DropZones, mz) - local name = mz:GetName() - self._ZoneDefs.DropZones[name] = z - if self._ZoneActive.Drop[name] == nil then self._ZoneActive.Drop[name] = (z.active ~= false) end - end - end - for _,z in ipairs(self.Config.Zones.FOBZones or {}) do - local mz = _findZone(z) - if mz then - table.insert(self.FOBZones, mz) - local name = mz:GetName() - self._ZoneDefs.FOBZones[name] = z - if self._ZoneActive.FOB[name] == nil then self._ZoneActive.FOB[name] = (z.active ~= false) end - end - end - for _,z in ipairs(self.Config.Zones.MASHZones or {}) do - local mz = _findZone(z) - if mz then - table.insert(self.MASHZones, mz) - local name = mz:GetName() - self._ZoneDefs.MASHZones[name] = z - if self._ZoneActive.MASH[name] == nil then self._ZoneActive.MASH[name] = (z.active ~= false) end - end - end - for _,z in ipairs(self.Config.Zones.SalvageDropZones or {}) do - local mz = _findZone(z) - if mz then - table.insert(self.SalvageDropZones, mz) - local name = mz:GetName() - if z and z.side == nil then z.side = self.Side end - self._ZoneDefs.SalvageDropZones[name] = z - if self._ZoneActive.SalvageDrop[name] == nil then self._ZoneActive.SalvageDrop[name] = (z.active ~= false) end - end - end -end - --- Validate configured zone names exist in the mission; warn coalition if any are missing. -function CTLD:ValidateZones() - local function zoneExistsByName(name) - if not name or name == '' then return false end - if trigger and trigger.misc and trigger.misc.getZone then - local z = trigger.misc.getZone(name) - if z then return true end - end - if ZONE and ZONE.FindByName then - local mz = ZONE:FindByName(name) - if mz then return true end - end - return false - end - - local function sideToStr(s) - if coalition and coalition.side then - if s == coalition.side.BLUE then return 'BLUE' end - if s == coalition.side.RED then return 'RED' end - if s == coalition.side.NEUTRAL then return 'NEUTRAL' end - end - return tostring(s) - end - - local function join(t) - local s = '' - for i,name in ipairs(t) do s = s .. (i>1 and ', ' or '') .. tostring(name) end - return s - end - - local missing = { Pickup = {}, Drop = {}, FOB = {}, MASH = {}, SalvageDrop = {} } - local found = { Pickup = {}, Drop = {}, FOB = {}, MASH = {}, SalvageDrop = {} } - local coords = { Pickup = 0, Drop = 0, FOB = 0, MASH = 0, SalvageDrop = 0 } - - for _,z in ipairs(self.Config.Zones.PickupZones or {}) do - if z.name then - if zoneExistsByName(z.name) then table.insert(found.Pickup, z.name) else table.insert(missing.Pickup, z.name) end - elseif z.coord then - coords.Pickup = coords.Pickup + 1 - end - end - for _,z in ipairs(self.Config.Zones.DropZones or {}) do - if z.name then - if zoneExistsByName(z.name) then table.insert(found.Drop, z.name) else table.insert(missing.Drop, z.name) end - elseif z.coord then - coords.Drop = coords.Drop + 1 - end - end - for _,z in ipairs(self.Config.Zones.FOBZones or {}) do - if z.name then - if zoneExistsByName(z.name) then table.insert(found.FOB, z.name) else table.insert(missing.FOB, z.name) end - elseif z.coord then - coords.FOB = coords.FOB + 1 - end - end - for _,z in ipairs(self.Config.Zones.MASHZones or {}) do - if z.name then - if zoneExistsByName(z.name) then table.insert(found.MASH, z.name) else table.insert(missing.MASH, z.name) end - elseif z.coord then - coords.MASH = coords.MASH + 1 - end - end - for _,z in ipairs(self.Config.Zones.SalvageDropZones or {}) do - if z.name then - if zoneExistsByName(z.name) then table.insert(found.SalvageDrop, z.name) else table.insert(missing.SalvageDrop, z.name) end - elseif z.coord then - coords.SalvageDrop = coords.SalvageDrop + 1 - end - end - - -- Log a concise summary to dcs.log - local sideStr = sideToStr(self.Side) - _logVerbose(string.format('[ZoneValidation][%s] Pickup: configured=%d (named=%d, coord=%d) found=%d missing=%d', - sideStr, - #(self.Config.Zones.PickupZones or {}), #found.Pickup + #missing.Pickup, coords.Pickup, #found.Pickup, #missing.Pickup)) - _logVerbose(string.format('[ZoneValidation][%s] Drop : configured=%d (named=%d, coord=%d) found=%d missing=%d', - sideStr, - #(self.Config.Zones.DropZones or {}), #found.Drop + #missing.Drop, coords.Drop, #found.Drop, #missing.Drop)) - _logVerbose(string.format('[ZoneValidation][%s] FOB : configured=%d (named=%d, coord=%d) found=%d missing=%d', - sideStr, - #(self.Config.Zones.FOBZones or {}), #found.FOB + #missing.FOB, coords.FOB, #found.FOB, #missing.FOB)) - _logVerbose(string.format('[ZoneValidation][%s] MASH : configured=%d (named=%d, coord=%d) found=%d missing=%d', - sideStr, - #(self.Config.Zones.MASHZones or {}), #found.MASH + #missing.MASH, coords.MASH, #found.MASH, #missing.MASH)) - _logVerbose(string.format('[ZoneValidation][%s] Salvage: configured=%d (named=%d, coord=%d) found=%d missing=%d', - sideStr, - #(self.Config.Zones.SalvageDropZones or {}), #found.SalvageDrop + #missing.SalvageDrop, coords.SalvageDrop, #found.SalvageDrop, #missing.SalvageDrop)) - - local anyMissing = (#missing.Pickup > 0) or (#missing.Drop > 0) or (#missing.FOB > 0) or (#missing.MASH > 0) or (#missing.SalvageDrop > 0) - if anyMissing then - if #missing.Pickup > 0 then - local msg = 'CTLD config warning: Missing Pickup Zones: '..join(missing.Pickup) - _msgCoalition(self.Side, msg); _logError('[ZoneValidation]['..sideStr..'] '..msg) - end - if #missing.Drop > 0 then - local msg = 'CTLD config warning: Missing Drop Zones: '..join(missing.Drop) - _msgCoalition(self.Side, msg); _logError('[ZoneValidation]['..sideStr..'] '..msg) - end - if #missing.FOB > 0 then - local msg = 'CTLD config warning: Missing FOB Zones: '..join(missing.FOB) - _msgCoalition(self.Side, msg); _logError('[ZoneValidation]['..sideStr..'] '..msg) - end - if #missing.MASH > 0 then - local msg = 'CTLD config warning: Missing MASH Zones: '..join(missing.MASH) - _msgCoalition(self.Side, msg); _logError('[ZoneValidation]['..sideStr..'] '..msg) - end - if #missing.SalvageDrop > 0 then - local msg = 'CTLD config warning: Missing Salvage Drop Zones: '..join(missing.SalvageDrop) - _msgCoalition(self.Side, msg); _logError('[ZoneValidation]['..sideStr..'] '..msg) - end - else - _logVerbose(string.format('[ZoneValidation][%s] All configured zone names resolved successfully.', sideStr)) - end - - self._MissingZones = missing -end --- #endregion Construction - --- ========================= --- Menus --- ========================= --- #region Menus -function CTLD:InitMenus() - if self.Config.UseGroupMenus then - -- Create placeholder menu at mission start to reserve F10 position if requested - if self.Config.CreateMenuAtMissionStart then - -- Create a coalition-level placeholder that will be replaced by per-group menus on birth - self.PlaceholderMenu = MENU_COALITION:New(self.Side, self.Config.RootMenuName or 'CTLD') - MENU_COALITION_COMMAND:New(self.Side, 'Spawn in an aircraft to see options', self.PlaceholderMenu, function() - _msgCoalition(self.Side, 'CTLD menus will appear when you spawn in a transport aircraft.') - end) - end - self:WireBirthHandler() - -- No coalition-level root when using per-group menus; Admin/Help is nested under each group's CTLD menu - else - self.MenuRoot = MENU_COALITION:New(self.Side, self.Config.RootMenuName or 'CTLD') - self:BuildCoalitionMenus(self.MenuRoot) - self:InitCoalitionAdminMenu() - end -end - -function CTLD:WireBirthHandler() - local handler = EVENTHANDLER:New() - handler:HandleEvent(EVENTS.Birth) - handler:HandleEvent(EVENTS.Dead) - handler:HandleEvent(EVENTS.Crash) - handler:HandleEvent(EVENTS.PilotDead) - handler:HandleEvent(EVENTS.Ejection) - handler:HandleEvent(EVENTS.PlayerLeaveUnit) - local selfref = self - - local function hasTrackedState(gname) - if not gname then return false end - if selfref.MenusByGroup and selfref.MenusByGroup[gname] then return true end - local tbls = { - CTLD._inStockMenus, - CTLD._loadedCrates, - CTLD._troopsLoaded, - CTLD._loadedTroopTypes, - CTLD._deployedTroops, - CTLD._buildConfirm, - CTLD._buildCooldown, - CTLD._coachOverride, - CTLD._medevacUnloadStates, - CTLD._medevacLoadStates, - CTLD._medevacEnrouteStates, - } - for _, tbl in ipairs(tbls) do - if tbl and tbl[gname] then return true end - end - if CTLD._msgState and CTLD._msgState['GRP:'..gname] then return true end - return false - end - - local function teardownIfGroupInactive(eventData, reason) - if not eventData then return end - local unit = eventData.IniUnit - local group = eventData.IniGroup or (unit and unit.GetGroup and unit:GetGroup()) or nil - if not group or not group.GetName then return end - if group.GetCoalition and group:GetCoalition() ~= selfref.Side then return end - local gname = group:GetName() - if not gname or gname == '' then return end - if not hasTrackedState(gname) then return end - local allowed = selfref.Config and selfref.Config.AllowedAircraft or {} - if _groupHasAliveTransport(group, allowed) then return end - selfref:_cleanupTransportGroup(group, gname) - if reason then - _logDebug(string.format('[MenuCleanup] Group %s removed due to %s', gname, reason)) - end - end - - local function scheduleDeferredCleanup(group) - if not (group and group.GetName) then return end - local gname = group:GetName() - if not gname or gname == '' then return end - if not hasTrackedState(gname) then return end - if not (timer and timer.scheduleFunction) then return end - timer.scheduleFunction(function(arg) - local name = arg and arg.groupName or nil - if not name then return nil end - if not selfref then return nil end - local grp = GROUP and GROUP:FindByName(name) or nil - local allowed = selfref.Config and selfref.Config.AllowedAircraft or {} - if grp and _groupHasAliveTransport(grp, allowed) then - return nil - end - selfref:_cleanupTransportGroup(grp, name) - _logDebug(string.format('[MenuCleanup] Group %s cleaned up after player left', name)) - return nil - end, { groupName = gname }, timer.getTime() + 3) - end - - function handler:OnEventBirth(eventData) - local unit = eventData.IniUnit - if not unit or not unit:IsAlive() then return end - if unit:GetCoalition() ~= selfref.Side then return end - local typ = _getUnitType(unit) - if not _isIn(selfref.Config.AllowedAircraft, typ) then return end - local grp = unit:GetGroup() - if not grp then return end - local gname = grp:GetName() - if selfref.MenusByGroup[gname] then return end - selfref.MenusByGroup[gname] = selfref:BuildGroupMenus(grp) - _msgGroup(grp, 'CTLD menu available (F10)') - end - - function handler:OnEventDead(eventData) - teardownIfGroupInactive(eventData, 'Dead') - end - - function handler:OnEventCrash(eventData) - teardownIfGroupInactive(eventData, 'Crash') - end - - function handler:OnEventPilotDead(eventData) - teardownIfGroupInactive(eventData, 'PilotDead') - end - - function handler:OnEventEjection(eventData) - teardownIfGroupInactive(eventData, 'Ejection') - end - - function handler:OnEventPlayerLeaveUnit(eventData) - local unit = eventData and eventData.IniUnit - if not unit then return end - if unit.GetCoalition and unit:GetCoalition() ~= selfref.Side then return end - local group = unit.GetGroup and unit:GetGroup() or nil - if not group then return end - scheduleDeferredCleanup(group) - end - - self.BirthHandler = handler -end - -function CTLD:BuildGroupMenus(group) - local root = MENU_GROUP:New(group, self.Config.RootMenuName or 'CTLD') - -- Safe menu command helper: wraps callbacks to prevent silent errors - local function CMD(title, parent, cb) - return MENU_GROUP_COMMAND:New(group, title, parent, function() - local ok, err = pcall(cb) - if not ok then - _logError('Menu error: '..tostring(err)) - MESSAGE:New('CTLD menu error: '..tostring(err), 8):ToGroup(group) - end - end) - end - - -- Initialize per-player coach preference from default - local gname = group:GetName() - CTLD._coachOverride = CTLD._coachOverride or {} - if CTLD._coachOverride[gname] == nil then - local coachCfg = CTLD.HoverCoachConfig or {} - CTLD._coachOverride[gname] = coachCfg.coachOnByDefault - end - - -- Top-level roots per requested structure - local opsRoot = MENU_GROUP:New(group, 'Operations', root) - local logRoot = MENU_GROUP:New(group, 'Logistics', root) - local toolsRoot = MENU_GROUP:New(group, 'Field Tools', root) - local navRoot = MENU_GROUP:New(group, 'Navigation', root) - local adminRoot = MENU_GROUP:New(group, 'Admin/Help', root) - - local prefsMenu = MENU_GROUP:New(group, 'Preferences', adminRoot) - CMD('Use Metric Units', prefsMenu, function() self:_SetGroupUnitPreference(group, 'metric') end) - CMD('Use Imperial Units', prefsMenu, function() self:_SetGroupUnitPreference(group, 'imperial') end) - CMD('Use Mission Default Units', prefsMenu, function() self:_SetGroupUnitPreference(group, nil) end) - CMD('Show My Units Setting', prefsMenu, function() self:_ShowGroupUnitPreference(group) end) - - -- Admin/Help -> Player Guides (moved to top of Admin/Help) - local help = MENU_GROUP:New(group, 'Player Guides', adminRoot) - MENU_GROUP_COMMAND:New(group, 'CTLD Basics (2-minute tour)', help, function() - local lines = {} - table.insert(lines, 'CTLD Basics - 2 minute tour') - table.insert(lines, '') - table.insert(lines, 'Loop: Request -> Deliver -> Build -> Fight') - table.insert(lines, '- Request crates at an ACTIVE Supply Zone (Pickup).') - table.insert(lines, '- Deliver crates to the build point (within Build Radius).') - table.insert(lines, '- Build units or sites with "Build Here" (confirm + cooldown).') - table.insert(lines, '- Optional: set Attack or Defend behavior when building.') - table.insert(lines, '') - table.insert(lines, 'Key concepts:') - table.insert(lines, '- Zones: Pickup (supply), Drop (mission targets), FOB (forward supply).') - table.insert(lines, '- Inventory: stock is tracked per zone; requests consume stock there.') - table.insert(lines, '- FOBs: building one creates a local supply point with seeded stock.') - table.insert(lines, '- Advanced: SAM site repair crates, AI attack orders, EWR/JTAC support.') - MESSAGE:New(table.concat(lines, '\n'), 35):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'Zones - Guide', help, function() - local lines = {} - table.insert(lines, 'CTLD Zones - Guide') - table.insert(lines, '') - table.insert(lines, 'Zone types:') - table.insert(lines, '- Pickup (Supply): Request crates and load troops here. Crate requests require proximity to an ACTIVE pickup zone (default within 10 km).') - table.insert(lines, '- Drop: Mission-defined delivery or rally areas. Some missions may require delivery or deployment at these zones (see briefing).') - table.insert(lines, '- FOB: Forward Operating Base areas. Some recipes (FOB Site) can be built here; if FOB restriction is enabled, FOB-only builds must be inside an FOB zone.') - table.insert(lines, '') - table.insert(lines, 'Colors and map marks:') - table.insert(lines, '- Pickup zone crate spawns are marked with smoke in the configured color. Admin/Help -> Draw CTLD Zones on Map draws zone circles and labels on F10.') - table.insert(lines, '- Use Admin/Help -> Clear CTLD Map Drawings to remove the drawings. Drawings are read-only if configured.') - table.insert(lines, '') - table.insert(lines, 'How to use zones:') - table.insert(lines, '- To request crates: move within the pickup zone distance and use CTLD -> Request Crate.') - table.insert(lines, '- To load troops: must be inside a Pickup zone if troop loading restriction is enabled.') - table.insert(lines, '- Navigation: CTLD -> Coach & Nav -> Vectors to Nearest Pickup Zone gives bearing and range.') - table.insert(lines, '- Activation: Zones can be active/inactive per mission logic; inactive pickup zones block crate requests.') - table.insert(lines, '') - table.insert(lines, string.format('Build Radius: about %d m to collect nearby crates when building.', self.Config.BuildRadius or 60)) - table.insert(lines, string.format('Pickup Zone Max Distance: about %d m to request crates.', self.Config.PickupZoneMaxDistance or 10000)) - MESSAGE:New(table.concat(lines, '\n'), 40):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'Inventory - How It Works', help, function() - local inv = self.Config.Inventory or {} - local enabled = inv.Enabled ~= false - local showHint = inv.ShowStockInMenu == true - local fobPct = math.floor(((inv.FOBStockFactor or 0.25) * 100) + 0.5) - local lines = {} - table.insert(lines, 'CTLD Inventory - How It Works') - table.insert(lines, '') - table.insert(lines, 'Overview:') - table.insert(lines, '- Inventory is tracked per Supply (Pickup) Zone and per FOB. Requests consume stock at that location.') - table.insert(lines, string.format('- Inventory is %s.', enabled and 'ENABLED' or 'DISABLED')) - table.insert(lines, '') - table.insert(lines, 'Starting stock:') - table.insert(lines, '- Each configured Supply Zone is seeded from the catalog initialStock for every crate type at mission start.') - table.insert(lines, string.format('- When you build a FOB, it creates a small Supply Zone with stock seeded at ~%d%% of initialStock.', fobPct)) - table.insert(lines, '') - table.insert(lines, 'Requesting crates:') - table.insert(lines, '- You must be within range of an ACTIVE Supply Zone to request crates; stock is decremented on spawn.') - table.insert(lines, '- If out of stock for a type at that zone, requests are denied for that type until resupplied (mission logic).') - table.insert(lines, '') - table.insert(lines, 'UI hints:') - table.insert(lines, string.format('- Show stock in menu labels: %s.', showHint and 'ON' or 'OFF')) - table.insert(lines, '- Some missions may include an "In Stock Here" list showing only items available at the nearest zone.') - MESSAGE:New(table.concat(lines, '\n'), 40):ToGroup(group) - end) - - MENU_GROUP_COMMAND:New(group, 'Troop Transport & JTAC Use', help, function() - local lines = {} - table.insert(lines, 'Troop Transport & JTAC Use') - table.insert(lines, '') - table.insert(lines, 'Troops:') - table.insert(lines, '- Load inside an ACTIVE Supply Zone (if mission enforces it).') - table.insert(lines, '- Deploy with Defend (hold) or Attack (advance to targets/bases).') - table.insert(lines, '- Attack uses a search radius and moves at configured speed.') - table.insert(lines, '') - table.insert(lines, 'JTAC:') - table.insert(lines, '- Build JTAC units (MRAP/Tigr or drones) to support target marking.') - table.insert(lines, '- JTAC helps with target designation/SA; details depend on mission setup.') - MESSAGE:New(table.concat(lines, '\n'), 35):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'Crates 101: Requesting and Handling', help, function() - local lines = {} - table.insert(lines, 'Crates 101 - Requesting and Handling') - table.insert(lines, '') - table.insert(lines, '- Request crates near an ACTIVE Supply Zone; max distance is configurable.') - table.insert(lines, '- Menu labels show the total crates required for a recipe.') - table.insert(lines, '- Drop crates close together but avoid overlap; smoke marks spawns.') - table.insert(lines, '- Use Coach & Nav tools: vectors to nearest pickup zone, re-mark crate with smoke.') - MESSAGE:New(table.concat(lines, '\n'), 35):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'Hover Pickup & Slingloading', help, function() - local coachCfg = CTLD.HoverCoachConfig or {} - local aglMin = (coachCfg.thresholds and coachCfg.thresholds.aglMin) or 5 - local aglMax = (coachCfg.thresholds and coachCfg.thresholds.aglMax) or 20 - local capGS = (coachCfg.thresholds and coachCfg.thresholds.captureGS) or (4/3.6) - local hold = (coachCfg.thresholds and coachCfg.thresholds.stabilityHold) or 1.8 - local lines = {} - table.insert(lines, 'Hover Pickup & Slingloading') - table.insert(lines, '') - table.insert(lines, string.format('- Hover pickup: hold AGL %d-%d m, speed < %.1f m/s, for ~%.1f s to auto-load.', aglMin, aglMax, capGS, hold)) - table.insert(lines, '- Keep steady within ~15 m of the crate; Hover Coach gives cues if enabled.') - table.insert(lines, '- Slingloading tips: avoid rotor wash over stacks; approach from upwind; re-mark crate with smoke if needed.') - MESSAGE:New(table.concat(lines, '\n'), 35):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'Build System: Build Here and Advanced', help, function() - local br = self.Config.BuildRadius or 60 - local win = self.Config.BuildConfirmWindowSeconds or 10 - local cd = self.Config.BuildCooldownSeconds or 60 - local lines = {} - table.insert(lines, 'Build System - Build Here and Advanced') - table.insert(lines, '') - table.insert(lines, string.format('- Build Here collects crates within ~%d m. Double-press within %d s to confirm.', br, win)) - table.insert(lines, string.format('- Cooldown: about %d s per group after a successful build.', cd)) - table.insert(lines, '- Advanced Build lets you choose Defend (hold) or Attack (move).') - table.insert(lines, '- Static or unsuitable units will hold even if Attack is chosen.') - table.insert(lines, '- FOB-only recipes must be inside an FOB zone when restriction is enabled.') - MESSAGE:New(table.concat(lines, '\n'), 40):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'FOBs: Forward Supply & Why They Matter', help, function() - local fobPct = math.floor(((self.Config.Inventory and self.Config.Inventory.FOBStockFactor or 0.25) * 100) + 0.5) - local lines = {} - table.insert(lines, 'FOBs - Forward Supply and Why They Matter') - table.insert(lines, '') - table.insert(lines, '- Build a FOB by assembling its crate recipe (see Recipe Info).') - table.insert(lines, string.format('- A new local Supply Zone is created and seeded at ~%d%% of initial stock.', fobPct)) - table.insert(lines, '- FOBs shorten logistics legs and increase throughput toward the front.') - table.insert(lines, '- If enabled, FOB-only builds must occur inside FOB zones.') - MESSAGE:New(table.concat(lines, '\n'), 35):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'SAM Sites: Building, Repairing, and Augmenting', help, function() - local br = self.Config.BuildRadius or 60 - local lines = {} - table.insert(lines, 'SAM Sites - Building, Repairing, and Augmenting') - table.insert(lines, '') - table.insert(lines, 'Build:') - table.insert(lines, '- Assemble site recipes using the required component crates (see menu labels). Build Here will place the full site.') - table.insert(lines, '') - table.insert(lines, 'Repair/Augment (merged):') - table.insert(lines, '- Request the matching "Repair/Launcher +1" crate for your site type (HAWK, Patriot, KUB, BUK).') - table.insert(lines, string.format('- Drop repair crate(s) within ~%d m of the site, then use Build Here (confirm window applies).', br)) - table.insert(lines, '- The nearest matching site (within a local search) is respawned fully repaired; +1 launcher per crate, up to caps.') - table.insert(lines, '- Caps: HAWK 6, Patriot 6, KUB 3, BUK 6. Extra crates beyond the cap are not consumed.') - table.insert(lines, '- Must match coalition and site type; otherwise no changes are applied.') - table.insert(lines, '- Respawn is required to apply repairs/augmentation due to DCS limitations.') - table.insert(lines, '') - table.insert(lines, 'Placement tips:') - table.insert(lines, '- Space launchers to avoid masking; keep radars with good line-of-sight; avoid fratricide arcs.') - MESSAGE:New(table.concat(lines, '\n'), 45):ToGroup(group) - end) - MENU_GROUP_COMMAND:New(group, 'MASH & Salvage System', help, function() - local lines = {} - table.insert(lines, 'MASH & Salvage System - Player Guide') - table.insert(lines, '') - table.insert(lines, 'What is it?') - table.insert(lines, '- MASH (Mobile Army Surgical Hospital) zones accept MEDEVAC crew deliveries.') - table.insert(lines, '- When ground vehicles are destroyed, crews spawn nearby and call for rescue.') - table.insert(lines, '- Rescuing crews and delivering them to MASH earns Salvage Points for your coalition.') - table.insert(lines, '- Salvage Points let you build out-of-stock items, keeping logistics flowing.') - table.insert(lines, '') - table.insert(lines, 'How MEDEVAC works:') - table.insert(lines, '- Vehicle destroyed → crew spawns after delay with invulnerability period.') - table.insert(lines, '- MEDEVAC request announced with grid coordinates and salvage value.') - table.insert(lines, '- Crews have a time limit (default 60 minutes); failure = crew KIA and vehicle lost.') - table.insert(lines, '') - table.insert(lines, 'Pickup Methods:') - table.insert(lines, '- AUTO: Land within 500m of crew - they will run to you and board automatically!') - table.insert(lines, '- HOVER: Fly close, hover nearby, load troops normally - system detects MEDEVAC crew.') - table.insert(lines, '- Original vehicle respawns when crew is picked up (if enabled).') - table.insert(lines, '') - table.insert(lines, 'Delivering to MASH:') - table.insert(lines, '- AUTO: Land in any MASH zone - crews unload automatically after 2 seconds.') - table.insert(lines, '- MANUAL: Deploy troops inside MASH zone - salvage points awarded automatically.') - table.insert(lines, '- Coalition message shows points earned and new total.') - table.insert(lines, '') - table.insert(lines, 'Using Salvage Points:') - table.insert(lines, '- When crate requests fail (out of stock), salvage auto-applies if available.') - table.insert(lines, '- Each catalog item has a salvage cost (usually matches its value).') - table.insert(lines, '- Check current salvage: Coach & Nav -> MEDEVAC Status.') - table.insert(lines, '') - table.insert(lines, 'Mobile MASH:') - table.insert(lines, '- Build Mobile MASH crates to deploy field hospitals anywhere.') - table.insert(lines, '- Mobile MASH creates a new delivery zone with radio beacon.') - table.insert(lines, '- Multiple mobile MASHs can be deployed for forward operations.') - table.insert(lines, '') - table.insert(lines, 'Best practices:') - table.insert(lines, '- Monitor MEDEVAC requests: Coach & Nav -> Vectors to Nearest MEDEVAC Crew.') - table.insert(lines, '- Prioritize high-value vehicles (armor, AA) for maximum salvage.') - table.insert(lines, '- Deploy Mobile MASH near active combat zones to reduce delivery time.') - table.insert(lines, '- Coordinate with team: share MEDEVAC locations and salvage status.') - table.insert(lines, '- Watch for warnings: 15min and 5min alerts before crew timeout.') - MESSAGE:New(table.concat(lines, '\n'), 50):ToGroup(group) - end) - - -- Operations -> Troop Transport - local troopsRoot = MENU_GROUP:New(group, 'Troop Transport', opsRoot) - CMD('Load Troops', troopsRoot, function() self:LoadTroops(group) end) - -- Optional typed troop loading submenu - do - local typedRoot = MENU_GROUP:New(group, 'Load Troops (Type)', troopsRoot) - local tcfg = (self.Config.Troops and self.Config.Troops.TroopTypes) or {} - -- Stable order per common roles - local order = { 'AS', 'AA', 'AT', 'AR' } - local seen = {} - local function addItem(key) - local def = tcfg[key] - if not def then return end - local label = (def.label or key) - local size = def.size or 6 - CMD(string.format('%s (%d)', label, size), typedRoot, function() - self:LoadTroops(group, { typeKey = key }) - end) - seen[key] = true - end - for _,k in ipairs(order) do addItem(k) end - -- Add any additional custom types not in the default order - for k,_ in pairs(tcfg) do if not seen[k] then addItem(k) end end - end - do - local tr = (self.Config.AttackAI and self.Config.AttackAI.TroopSearchRadius) or 3000 - CMD('Deploy [Hold Position]', troopsRoot, function() self:UnloadTroops(group, { behavior = 'defend' }) end) - CMD(string.format('Deploy [Attack (%dm)]', tr), troopsRoot, function() self:UnloadTroops(group, { behavior = 'attack' }) end) - end - - -- Operations -> JTAC - do - local jtacRoot = MENU_GROUP:New(group, 'JTAC', opsRoot) - -- Track per-group active JTAC selection - CTLD._activeJTACByGroup = CTLD._activeJTACByGroup or {} - - -- Select Active JTAC: cycle to nearest or next if already selected - CMD('Select Active JTAC (cycle nearest)', jtacRoot, function() self:JTAC_SelectActiveForGroup(group, { mode = 'nearest' }) end) - - -- Control submenu - local ctl = MENU_GROUP:New(group, 'Control', jtacRoot) - CMD('Pause/Resume Auto-Lase', ctl, function() self:JTAC_TogglePause(group) end) - CMD('Release Current Target', ctl, function() self:JTAC_ReleaseTarget(group) end) - CMD('Force Rescan / Reacquire', ctl, function() self:JTAC_ForceRescan(group) end) - - -- Targeting submenu - local tgt = MENU_GROUP:New(group, 'Targeting', jtacRoot) - local lock = MENU_GROUP:New(group, 'Lock Filter', tgt) - CMD('All', lock, function() self:JTAC_SetLockFilter(group, 'all') end) - CMD('Vehicles only', lock, function() self:JTAC_SetLockFilter(group, 'vehicle') end) - CMD('Troops only', lock, function() self:JTAC_SetLockFilter(group, 'troop') end) - local prof = MENU_GROUP:New(group, 'Priority Profile', tgt) - CMD('Threat (SAM>AAA>Armor>IFV>Arty>Inf)', prof, function() self:JTAC_SetPriority(group, 'threat') end) - CMD('Armor-first', prof, function() self:JTAC_SetPriority(group, 'armor') end) - CMD('Soft-first', prof, function() self:JTAC_SetPriority(group, 'soft') end) - CMD('Infantry-last', prof, function() self:JTAC_SetPriority(group, 'inf_last') end) - - -- Range & Effects submenu - local rng = MENU_GROUP:New(group, 'Range & Effects', jtacRoot) - local sr = MENU_GROUP:New(group, 'Search Radius', rng) - for _,km in ipairs({4,6,8,10,12}) do - CMD(string.format('%d km', km), sr, function() self:JTAC_SetSearchRadius(group, km*1000) end) - end - local sm = MENU_GROUP:New(group, 'Smoke', rng) - CMD('Toggle Smoke On/Off', sm, function() self:JTAC_ToggleSmoke(group) end) - CMD('Color: Blue', sm, function() self:JTAC_SetSmokeColor(group, 'blue') end) - CMD('Color: Orange', sm, function() self:JTAC_SetSmokeColor(group, 'orange') end) - - -- Comms & Laser submenu - local comm = MENU_GROUP:New(group, 'Comms & Laser', jtacRoot) - CMD('Announcements On/Off', comm, function() self:JTAC_ToggleAnnouncements(group) end) - -- Laser code management can be added in phase 2 - - -- Utilities - local util = MENU_GROUP:New(group, 'Utilities', jtacRoot) - CMD('Mark Current Target on Map', util, function() self:JTAC_MarkCurrentTarget(group) end) - -- Rename/Dismiss can be added in phase 2 - - -- Status & Diagnostics (keep at bottom of JTAC) - CMD('List JTAC Status', jtacRoot, function() self:ListJTACStatus(group) end) - CMD('JTAC Diagnostics', jtacRoot, function() self:JTACDiagnostics(group) end) - end - - -- Operations -> MEDEVAC - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - local medevacRoot = MENU_GROUP:New(group, 'MEDEVAC', opsRoot) - CMD('Show Onboard Manifest', medevacRoot, function() self:ShowOnboardManifest(group) end) - - -- List Active MEDEVAC Requests - CMD('List Active MEDEVAC Requests', medevacRoot, function() self:ListActiveMEDEVACRequests(group) end) - - -- Nearest MEDEVAC Location - CMD('Nearest MEDEVAC Location', medevacRoot, function() self:NearestMEDEVACLocation(group) end) - - -- Coalition Salvage Points - CMD('Coalition Salvage Points', medevacRoot, function() self:ShowSalvagePoints(group) end) - - -- Vectors to Nearest MEDEVAC - CMD('Vectors to Nearest MEDEVAC', medevacRoot, function() self:VectorsToNearestMEDEVAC(group) end) - - -- MASH Locations - CMD('MASH Locations', medevacRoot, function() self:ListMASHLocations(group) end) - - -- Pop Smoke at Crew Locations - CMD('Pop Smoke at Crew Locations', medevacRoot, function() self:PopSmokeAtMEDEVACSites(group) end) - - -- Pop Smoke at MASH Zones - CMD('Pop Smoke at MASH Zones', medevacRoot, function() self:PopSmokeAtMASHZones(group) end) - - -- Duplicate guide from Admin/Help -> Player Guides for quick access - MENU_GROUP_COMMAND:New(group, 'MASH & Salvage System - Guide', medevacRoot, function() - local lines = {} - table.insert(lines, 'MASH & Salvage System - Player Guide') - table.insert(lines, '') - table.insert(lines, 'What is it?') - table.insert(lines, '- MASH (Mobile Army Surgical Hospital) zones accept MEDEVAC crew deliveries.') - table.insert(lines, '- When ground vehicles are destroyed, crews spawn nearby and call for rescue.') - table.insert(lines, '- Rescuing crews and delivering them to MASH earns Salvage Points for your coalition.') - table.insert(lines, '- Salvage Points let you build out-of-stock items, keeping logistics flowing.') - table.insert(lines, '') - table.insert(lines, 'How MEDEVAC works:') - table.insert(lines, '- Vehicle destroyed → crew spawns after delay with invulnerability period.') - table.insert(lines, '- MEDEVAC request announced with grid coordinates and salvage value.') - table.insert(lines, '- Crews have a time limit (default 60 minutes); failure = crew KIA and vehicle lost.') - table.insert(lines, '') - table.insert(lines, 'Pickup Methods:') - table.insert(lines, '- AUTO: Land within 500m of crew - they will run to you and board automatically!') - table.insert(lines, '- HOVER: Fly close, hover nearby, load troops normally - system detects MEDEVAC crew.') - table.insert(lines, '- Original vehicle respawns when crew is picked up (if enabled).') - table.insert(lines, '') - table.insert(lines, 'Delivering to MASH:') - table.insert(lines, '- AUTO: Land in any MASH zone - crews unload automatically after 2 seconds.') - table.insert(lines, '- MANUAL: Deploy troops inside MASH zone - salvage points awarded automatically.') - table.insert(lines, '- Coalition message shows points earned and new total.') - table.insert(lines, '') - table.insert(lines, 'Using Salvage Points:') - table.insert(lines, '- When crate requests fail (out of stock), salvage auto-applies if available.') - table.insert(lines, '- Each catalog item has a salvage cost (usually matches its value).') - table.insert(lines, '- Check current salvage: Coach & Nav -> MEDEVAC Status.') - table.insert(lines, '') - table.insert(lines, 'Mobile MASH:') - table.insert(lines, '- Build Mobile MASH crates to deploy field hospitals anywhere.') - table.insert(lines, '- Mobile MASH creates a new delivery zone with radio beacon.') - table.insert(lines, '- Multiple mobile MASHs can be deployed for forward operations.') - table.insert(lines, '') - table.insert(lines, 'Best practices:') - table.insert(lines, '- Monitor MEDEVAC requests: Coach & Nav -> Vectors to Nearest MEDEVAC Crew.') - table.insert(lines, '- Prioritize high-value vehicles (armor, AA) for maximum salvage.') - table.insert(lines, '- Deploy Mobile MASH near active combat zones to reduce delivery time.') - table.insert(lines, '- Coordinate with team: share MEDEVAC locations and salvage status.') - table.insert(lines, '- Watch for warnings: 15min and 5min alerts before crew timeout.') - MESSAGE:New(table.concat(lines, '\n'), 50):ToGroup(group) - end) - - -- Admin/Settings submenu - local medevacAdminRoot = MENU_GROUP:New(group, 'Admin/Settings', medevacRoot) - CMD('Clear All MEDEVAC Missions', medevacAdminRoot, function() self:ClearAllMEDEVACMissions(group) end) - end - - -- Operations (root) -> List JTAC Status (placed at bottom of Operations) - CMD('List JTAC Status', opsRoot, function() self:ListJTACStatus(group) end) - CMD('JTAC Diagnostics', opsRoot, function() self:JTACDiagnostics(group) end) - - -- Logistics -> Crates, Build, and Recipe Details - CMD('Show Onboard Manifest', logRoot, function() self:ShowOnboardManifest(group) end) - local reqRoot = MENU_GROUP:New(group, 'Request Crate', logRoot) - - local crateMgmt = MENU_GROUP:New(group, 'Crate Management', logRoot) - CMD('Drop One Loaded Crate', crateMgmt, function() self:DropLoadedCrates(group, 1) end) - CMD('Drop All Loaded Crates', crateMgmt, function() self:DropLoadedCrates(group, -1) end) - self:_BuildOrRefreshLoadedCrateMenu(group, crateMgmt) - CMD('Re-mark Nearest Crate (Smoke)', crateMgmt, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - local bestName, bestMeta, bestd - for name,meta in pairs(CTLD._crates) do - if meta.side == self.Side then - local dx = (meta.point.x - here.x) - local dz = (meta.point.z - here.z) - local d = math.sqrt(dx*dx + dz*dz) - if (not bestd) or d < bestd then - bestName, bestMeta, bestd = name, meta, d - end - end - end - if bestName and bestMeta then - local sx, sz = bestMeta.point.x, bestMeta.point.z - local sy = 0 - if land and land.getHeight then - local ok, h = pcall(land.getHeight, { x = sx, y = sz }) - if ok and type(h) == 'number' then sy = h end - end - local smokeColor = self.Config.PickupZoneSmokeColor - _spawnCrateSmoke({ x = sx, y = sy, z = sz }, smokeColor, self.Config.CrateSmoke, bestName) - _eventSend(self, group, nil, 'crate_re_marked', { id = bestName, mark = 'smoke' }) - else - _msgGroup(group, 'No friendly crates found to mark.') - end - end) - - local buildRoot = MENU_GROUP:New(group, 'Build Menu', logRoot) - CMD('Build Here', buildRoot, function() self:BuildAtGroup(group) end) - self:_BuildOrRefreshBuildAdvancedMenu(group, buildRoot) - MENU_GROUP_COMMAND:New(group, 'Refresh Buildable List', buildRoot, function() - self:_BuildOrRefreshBuildAdvancedMenu(group, buildRoot) - MESSAGE:New('Buildable list refreshed.', 6):ToGroup(group) - end) - - local infoRoot = MENU_GROUP:New(group, 'Recipe Info', logRoot) - if self.Config.UseCategorySubmenus then - local reqSubmenus = {} - local function getRequestSub(catLabel) - if not reqSubmenus[catLabel] then - reqSubmenus[catLabel] = MENU_GROUP:New(group, catLabel, reqRoot) - end - return reqSubmenus[catLabel] - end - - local infoSubs = {} - local function getInfoSub(catLabel) - if not infoSubs[catLabel] then - infoSubs[catLabel] = MENU_GROUP:New(group, catLabel, infoRoot) - end - return infoSubs[catLabel] - end - - local replacementQueue = {} - for key,def in pairs(self.Config.CrateCatalog) do - if not (def and def.hidden) then - local sideOk = (not def.side) or def.side == self.Side - if sideOk then - local catLabel = (def and def.menuCategory) or 'Other' - local reqParent = getRequestSub(catLabel) - local label = self:_formatMenuLabelWithCrates(key, def) - - if def and type(def.requires) == 'table' then - CMD(label, reqParent, function() self:RequestRecipeBundleForGroup(group, key) end) - for reqKey,_ in pairs(def.requires) do - local compDef = self.Config.CrateCatalog[reqKey] - local compSideOk = (not compDef) or (not compDef.side) or compDef.side == self.Side - if compDef and compDef.hidden and compSideOk then - local queue = replacementQueue[catLabel] - if not queue then - queue = { list = {}, seen = {} } - replacementQueue[catLabel] = queue - end - if not queue.seen[reqKey] then - queue.seen[reqKey] = true - table.insert(queue.list, { key = reqKey, def = compDef }) - end - end - end - else - CMD(label, reqParent, function() self:RequestCrateForGroup(group, key) end) - end - - local infoParent = getInfoSub(catLabel) - CMD((def and (def.menu or def.description)) or key, infoParent, function() - local text = self:_formatRecipeInfo(key, def) - _msgGroup(group, text) - end) - end - end - end - - for catLabel,queue in pairs(replacementQueue) do - if queue and queue.list and #queue.list > 0 then - table.sort(queue.list, function(a,b) - local la = (a.def and (a.def.menu or a.def.description)) or a.key - local lb = (b.def and (b.def.menu or b.def.description)) or b.key - return tostring(la) < tostring(lb) - end) - local reqParent = getRequestSub(catLabel) - local replMenu = MENU_GROUP:New(group, 'Replacement Crates', reqParent) - for _,entry in ipairs(queue.list) do - local replLabel = string.format('Replacement: %s', self:_formatMenuLabelWithCrates(entry.key, entry.def)) - CMD(replLabel, replMenu, function() self:RequestCrateForGroup(group, entry.key) end) - end - end - end - else - local replacementList = {} - local replacementSeen = {} - for key,def in pairs(self.Config.CrateCatalog) do - if not (def and def.hidden) then - local sideOk = (not def.side) or def.side == self.Side - if sideOk then - local label = self:_formatMenuLabelWithCrates(key, def) - if def and type(def.requires) == 'table' then - CMD(label, reqRoot, function() self:RequestRecipeBundleForGroup(group, key) end) - for reqKey,_ in pairs(def.requires) do - local compDef = self.Config.CrateCatalog[reqKey] - local compSideOk = (not compDef) or (not compDef.side) or compDef.side == self.Side - if compDef and compDef.hidden and compSideOk and not replacementSeen[reqKey] then - replacementSeen[reqKey] = true - table.insert(replacementList, { key = reqKey, def = compDef }) - end - end - else - CMD(label, reqRoot, function() self:RequestCrateForGroup(group, key) end) - end - - CMD((def and (def.menu or def.description)) or key, infoRoot, function() - local text = self:_formatRecipeInfo(key, def) - _msgGroup(group, text) - end) - end - end - end - - if #replacementList > 0 then - table.sort(replacementList, function(a,b) - local la = (a.def and (a.def.menu or a.def.description)) or a.key - local lb = (b.def and (b.def.menu or b.def.description)) or b.key - return tostring(la) < tostring(lb) - end) - local replMenu = MENU_GROUP:New(group, 'Replacement Crates', reqRoot) - for _,entry in ipairs(replacementList) do - local replLabel = string.format('Replacement: %s', self:_formatMenuLabelWithCrates(entry.key, entry.def)) - CMD(replLabel, replMenu, function() self:RequestCrateForGroup(group, entry.key) end) - end - end - end - - -- Logistics -> Show Inventory at Nearest Pickup Zone/FOB - CMD('Show Inventory at Nearest Zone', logRoot, function() self:ShowNearestZoneInventory(group) end) - - -- Field Tools - CMD('Create Drop Zone (AO)', toolsRoot, function() self:CreateDropZoneAtGroup(group) end) - - -- Salvage Collection Zones submenu - if self.Config.SlingLoadSalvage and self.Config.SlingLoadSalvage.Enabled then - local salvageZoneRoot = MENU_GROUP:New(group, 'Salvage Collection Zones', toolsRoot) - CMD('Create Salvage Zone Here', salvageZoneRoot, function() self:CreateSalvageZoneAtGroup(group) end) - CMD('Show Active Salvage Zones', salvageZoneRoot, function() self:ShowActiveSalvageZones(group) end) - CMD('Retire Oldest Salvage Zone', salvageZoneRoot, function() self:RetireOldestDynamicSalvageZone(group) end) - -- Dynamic per-zone management will be added by _rebuildSalvageZoneMenus - end - - local smokeRoot = MENU_GROUP:New(group, 'Smoke My Location', toolsRoot) - local function smokeHere(color) - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local p = unit:GetPointVec3() - -- Use full Vec3 to ensure correct placement - trigger.action.smoke({ x = p.x, y = p.y, z = p.z }, color) - end - MENU_GROUP_COMMAND:New(group, 'Green', smokeRoot, function() smokeHere(trigger.smokeColor.Green) end) - MENU_GROUP_COMMAND:New(group, 'Red', smokeRoot, function() smokeHere(trigger.smokeColor.Red) end) - MENU_GROUP_COMMAND:New(group, 'White', smokeRoot, function() smokeHere(trigger.smokeColor.White) end) - MENU_GROUP_COMMAND:New(group, 'Orange', smokeRoot, function() smokeHere(trigger.smokeColor.Orange) end) - MENU_GROUP_COMMAND:New(group, 'Blue', smokeRoot, function() smokeHere(trigger.smokeColor.Blue) end) - - -- Navigation - local gname = group:GetName() - CMD('Request Vectors to Nearest Crate', navRoot, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - local bestName, bestMeta, bestd - for name,meta in pairs(CTLD._crates) do - if meta.side == self.Side then - local dx = (meta.point.x - here.x) - local dz = (meta.point.z - here.z) - local d = math.sqrt(dx*dx + dz*dz) - if (not bestd) or d < bestd then - bestName, bestMeta, bestd = name, meta, d - end - end - end - if bestName and bestMeta then - local brg = _bearingDeg(here, bestMeta.point) - local isMetric = _getPlayerIsMetric(unit) - local rngV, rngU = _fmtRange(bestd, isMetric) - _eventSend(self, group, nil, 'vectors_to_crate', { id = bestName, brg = brg, rng = rngV, rng_u = rngU }) - else - _msgGroup(group, 'No friendly crates found.') - end - end) - - -- Sling-Load Salvage vectors - if self.Config.SlingLoadSalvage and self.Config.SlingLoadSalvage.Enabled then - CMD('Vectors to Nearest Salvage Crate', navRoot, function() self:ShowNearestSalvageCrate(group) end) - end - - CMD('Vectors to Nearest Pickup Zone', navRoot, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local zone = nil - local dist = nil - local list = nil - if self.Config and self.Config.Zones and self.Config.Zones.PickupZones then - list = {} - for _,z in ipairs(self.Config.Zones.PickupZones) do - if (not z.name) or self._ZoneActive.Pickup[z.name] ~= false then table.insert(list, z) end - end - elseif self.PickupZones and #self.PickupZones > 0 then - list = {} - for _,mz in ipairs(self.PickupZones) do - if mz and mz.GetName then - local n = mz:GetName() - if self._ZoneActive.Pickup[n] ~= false then table.insert(list, { name = n }) end - end - end - else - list = {} - end - zone, dist = _nearestZonePoint(unit, list) - if not zone then - local allDefs = self.Config and self.Config.Zones and self.Config.Zones.PickupZones or {} - if allDefs and #allDefs > 0 then - local fbZone, fbDist = _nearestZonePoint(unit, allDefs) - if fbZone then - local up = unit:GetPointVec3(); local zp = fbZone:GetPointVec3() - local from = { x = up.x, z = up.z } - local to = { x = zp.x, z = zp.z } - local brg = _bearingDeg(from, to) - local isMetric = _getPlayerIsMetric(unit) - local rngV, rngU = _fmtRange(fbDist or 0, isMetric) - _eventSend(self, group, nil, 'vectors_to_pickup_zone', { zone = fbZone:GetName(), brg = brg, rng = rngV, rng_u = rngU }) - return - end - end - _eventSend(self, group, nil, 'no_pickup_zones', {}) - return - end - local up = unit:GetPointVec3() - local zp = zone:GetPointVec3() - local from = { x = up.x, z = up.z } - local to = { x = zp.x, z = zp.z } - local brg = _bearingDeg(from, to) - local isMetric = _getPlayerIsMetric(unit) - local rngV, rngU = _fmtRange(dist, isMetric) - _eventSend(self, group, nil, 'vectors_to_pickup_zone', { zone = zone:GetName(), brg = brg, rng = rngV, rng_u = rngU }) - end) - - -- Navigation -> Smoke Nearest Zone (Pickup/Drop/FOB) - CMD('Smoke Nearest Zone (Pickup/Drop/FOB/MASH)', navRoot, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - -- Build lists of active zones by kind in a format usable by _nearestZonePoint - local function collectActive(kind) - if kind == 'Pickup' then - return self:_collectActivePickupDefs() - elseif kind == 'Drop' then - local out = {} - for _, mz in ipairs(self.DropZones or {}) do - if mz and mz.GetName then - local n = mz:GetName() - if (self._ZoneActive and self._ZoneActive.Drop and self._ZoneActive.Drop[n] ~= false) then - table.insert(out, { name = n }) - end - end - end - return out - elseif kind == 'FOB' then - local out = {} - for _, mz in ipairs(self.FOBZones or {}) do - if mz and mz.GetName then - local n = mz:GetName() - if (self._ZoneActive and self._ZoneActive.FOB and self._ZoneActive.FOB[n] ~= false) then - table.insert(out, { name = n }) - end - end - end - return out - elseif kind == 'MASH' then - local out = {} - if CTLD._mashZones then - for name, data in pairs(CTLD._mashZones) do - if data and data.side == self.Side and data.zone then - table.insert(out, { name = name }) - end - end - end - return out - end - return {} - end - - local bestKind, bestZone, bestDist - for _, k in ipairs({ 'Pickup', 'Drop', 'FOB', 'MASH' }) do - local list = collectActive(k) - if list and #list > 0 then - local z, d = _nearestZonePoint(unit, list) - if z and d and ((not bestDist) or d < bestDist) then - bestKind, bestZone, bestDist = k, z, d - end - end - end - - if not bestZone then - _msgGroup(group, 'No zones available to smoke.') - return - end - - -- Determine smoke point (zone center) - -- _getZoneCenterAndRadius returns (center, radius); call directly to capture center - local center - if self._getZoneCenterAndRadius then center = select(1, self:_getZoneCenterAndRadius(bestZone)) end - if not center then - local v3 = bestZone:GetPointVec3() - center = { x = v3.x, y = v3.y or 0, z = v3.z } - else - center = { x = center.x, y = center.y or 0, z = center.z } - end - - -- Choose smoke color per kind - local color = trigger.smokeColor.Green -- default - if bestKind == 'Pickup' then - color = self.Config.PickupZoneSmokeColor or trigger.smokeColor.Green - elseif bestKind == 'Drop' then - color = trigger.smokeColor.Red - elseif bestKind == 'FOB' then - color = trigger.smokeColor.White - elseif bestKind == 'MASH' then - color = trigger.smokeColor.Orange - end - - -- Apply smoke offset system (use crate smoke config settings) - local smokeConfig = self.Config.CrateSmoke or {} - local smokePos = { - x = center.x, - y = land.getHeight({x = center.x, y = center.z}), - z = center.z - } - local offsetMeters = tonumber(smokeConfig.OffsetMeters) or 5 - local offsetRandom = (smokeConfig.OffsetRandom ~= false) -- default true - local offsetVertical = tonumber(smokeConfig.OffsetVertical) or 2 - - if offsetMeters > 0 then - local angle = 0 - if offsetRandom then - angle = math.random() * 2 * math.pi - end - smokePos.x = smokePos.x + offsetMeters * math.cos(angle) - smokePos.z = smokePos.z + offsetMeters * math.sin(angle) - end - smokePos.y = smokePos.y + offsetVertical - - -- Use MOOSE COORDINATE smoke for better appearance (tall, thin smoke like cargo smoke) - local coord = COORDINATE:New(smokePos.x, smokePos.y, smokePos.z) - if coord and coord.Smoke then - if color == trigger.smokeColor.Green then - coord:SmokeGreen() - elseif color == trigger.smokeColor.Red then - coord:SmokeRed() - elseif color == trigger.smokeColor.White then - coord:SmokeWhite() - elseif color == trigger.smokeColor.Orange then - coord:SmokeOrange() - elseif color == trigger.smokeColor.Blue then - coord:SmokeBlue() - else - coord:SmokeGreen() - end - local distKm = bestDist / 1000 - local distNm = bestDist / 1852 - _msgGroup(group, string.format('Smoked nearest %s zone: %s (%.1f km / %.1f nm)', bestKind, bestZone:GetName(), distKm, distNm)) - elseif trigger and trigger.action and trigger.action.smoke then - -- Fallback to trigger.action.smoke if MOOSE COORDINATE not available - trigger.action.smoke(smokePos, color) - local distKm = bestDist / 1000 - local distNm = bestDist / 1852 - _msgGroup(group, string.format('Smoked nearest %s zone: %s (%.1f km / %.1f nm)', bestKind, bestZone:GetName(), distKm, distNm)) - else - _msgGroup(group, 'Smoke not available in this environment.') - end - end) - - -- Smoke all nearby zones within range - CMD('Smoke All Nearby Zones (5km)', navRoot, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local maxRange = 5000 -- 5km in meters - - -- Get unit position - local uname = unit:GetName() - local du = Unit.getByName and Unit.getByName(uname) or nil - if not du or not du:getPoint() then - _msgGroup(group, 'Unable to determine your position.') - return - end - local up = du:getPoint() - local ux, uz = up.x, up.z - - -- Helper function to calculate distance and smoke a zone if in range - local function smokeZoneIfInRange(zoneName, zoneObj, zoneType, smokeColor) - if not zoneObj then return false end - - -- Get zone center - local center - if self._getZoneCenterAndRadius then - center = select(1, self:_getZoneCenterAndRadius(zoneObj)) - end - if not center and zoneObj.GetPointVec3 then - local v3 = zoneObj:GetPointVec3() - center = { x = v3.x, y = v3.y or 0, z = v3.z } - end - - if not center then return false end - - -- Calculate distance - local dx = center.x - ux - local dz = center.z - uz - local dist = math.sqrt(dx*dx + dz*dz) - - if dist <= maxRange then - -- Apply smoke offset system - local smokeConfig = self.Config.CrateSmoke or {} - local smokePos = { - x = center.x, - y = land.getHeight({x = center.x, y = center.z}), - z = center.z - } - local offsetMeters = tonumber(smokeConfig.OffsetMeters) or 5 - local offsetRandom = (smokeConfig.OffsetRandom ~= false) - local offsetVertical = tonumber(smokeConfig.OffsetVertical) or 2 - - if offsetMeters > 0 then - local angle = 0 - if offsetRandom then - angle = math.random() * 2 * math.pi - end - smokePos.x = smokePos.x + offsetMeters * math.cos(angle) - smokePos.z = smokePos.z + offsetMeters * math.sin(angle) - end - smokePos.y = smokePos.y + offsetVertical - - -- Spawn smoke - local coord = COORDINATE:New(smokePos.x, smokePos.y, smokePos.z) - if coord and coord.Smoke then - if smokeColor == trigger.smokeColor.Green then - coord:SmokeGreen() - elseif smokeColor == trigger.smokeColor.Red then - coord:SmokeRed() - elseif smokeColor == trigger.smokeColor.White then - coord:SmokeWhite() - elseif smokeColor == trigger.smokeColor.Orange then - coord:SmokeOrange() - elseif smokeColor == trigger.smokeColor.Blue then - coord:SmokeBlue() - else - coord:SmokeGreen() - end - else - trigger.action.smoke(smokePos, smokeColor) - end - - return true, dist - end - - return false, dist - end - - -- Helper to get color name - local function getColorName(color) - if color == trigger.smokeColor.Green then return "Green" - elseif color == trigger.smokeColor.Red then return "Red" - elseif color == trigger.smokeColor.White then return "White" - elseif color == trigger.smokeColor.Orange then return "Orange" - elseif color == trigger.smokeColor.Blue then return "Blue" - else return "Unknown" end - end - - local count = 0 - local zones = {} - - -- Check Pickup zones - local pickupDefs = self:_collectActivePickupDefs() - for _, def in ipairs(pickupDefs or {}) do - local mz = _findZone(def) - if mz then - -- Check for zone-specific smoke override, then fall back to config default - local zdef = self._ZoneDefs and self._ZoneDefs.PickupZones and self._ZoneDefs.PickupZones[def.name] - local smokeColor = (zdef and zdef.smoke) or self.Config.PickupZoneSmokeColor or trigger.smokeColor.Green - local smoked, dist = smokeZoneIfInRange(def.name, mz, 'Pickup', smokeColor) - if smoked then - count = count + 1 - local zp = mz:GetPointVec3() - local brg = _bearingDeg({ x = ux, z = uz }, { x = zp.x, z = zp.z }) - table.insert(zones, string.format('Pickup: %s - %.1f km @ %03d° (%s)', def.name, dist/1000, brg, getColorName(smokeColor))) - end - end - end - - -- Check Drop zones - for _, mz in ipairs(self.DropZones or {}) do - if mz and mz.GetName then - local n = mz:GetName() - if (self._ZoneActive and self._ZoneActive.Drop and self._ZoneActive.Drop[n] ~= false) then - local smokeColor = trigger.smokeColor.Red - local smoked, dist = smokeZoneIfInRange(n, mz, 'Drop', smokeColor) - if smoked then - count = count + 1 - local zp = mz:GetPointVec3() - local brg = _bearingDeg({ x = ux, z = uz }, { x = zp.x, z = zp.z }) - table.insert(zones, string.format('Drop: %s - %.1f km @ %03d° (%s)', n, dist/1000, brg, getColorName(smokeColor))) - end - end - end - end - - -- Check FOB zones - for _, mz in ipairs(self.FOBZones or {}) do - if mz and mz.GetName then - local n = mz:GetName() - if (self._ZoneActive and self._ZoneActive.FOB and self._ZoneActive.FOB[n] ~= false) then - local smokeColor = trigger.smokeColor.White - local smoked, dist = smokeZoneIfInRange(n, mz, 'FOB', smokeColor) - if smoked then - count = count + 1 - local zp = mz:GetPointVec3() - local brg = _bearingDeg({ x = ux, z = uz }, { x = zp.x, z = zp.z }) - table.insert(zones, string.format('FOB: %s - %.1f km @ %03d° (%s)', n, dist/1000, brg, getColorName(smokeColor))) - end - end - end - end - - -- Check MASH zones - if CTLD._mashZones then - for name, data in pairs(CTLD._mashZones) do - if data and data.side == self.Side and data.zone then - local smokeColor = trigger.smokeColor.Orange - local smoked, dist = smokeZoneIfInRange(name, data.zone, 'MASH', smokeColor) - if smoked then - count = count + 1 - local zp = data.zone:GetPointVec3() - local brg = _bearingDeg({ x = ux, z = uz }, { x = zp.x, z = zp.z }) - table.insert(zones, string.format('MASH: %s - %.1f km @ %03d° (%s)', name, dist/1000, brg, getColorName(smokeColor))) - end - end - end - end - - -- Check Salvage Drop zones - for _, mz in ipairs(self.SalvageDropZones or {}) do - if mz and mz.GetName then - local n = mz:GetName() - local isActive = true - if self._ZoneActive and self._ZoneActive.SalvageDrop then - isActive = (self._ZoneActive.SalvageDrop[n] ~= false) - end - if isActive then - local zdef = self._ZoneDefs and self._ZoneDefs.SalvageDropZones and self._ZoneDefs.SalvageDropZones[n] - local smokeColor = (zdef and zdef.smoke) or trigger.smokeColor.Orange - local smoked, dist = smokeZoneIfInRange(n, mz, 'SalvageDrop', smokeColor) - if smoked then - count = count + 1 - local zp = mz:GetPointVec3() - local brg = _bearingDeg({ x = ux, z = uz }, { x = zp.x, z = zp.z }) - table.insert(zones, string.format('Salvage: %s - %.1f km @ %03d° (%s)', n, dist/1000, brg, getColorName(smokeColor))) - end - end - end - end - - if count == 0 then - _msgGroup(group, string.format('No zones found within %.1f km.', maxRange/1000), 10) - else - local msg = string.format('Smoked %d zone(s) within %.1f km:\n%s', count, maxRange/1000, table.concat(zones, '\n')) - _msgGroup(group, msg, 15) - end - end) - - -- Navigation -> MEDEVAC menu items (if MEDEVAC enabled) - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - CMD('Vectors to Nearest MEDEVAC Crew', navRoot, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local pos = unit:GetPointVec3() - local isMetric = _getPlayerIsMetric(unit) - local nearest = nil - local nearestDist = math.huge - - -- Find nearest crew of same coalition - for crewName, crewData in pairs(CTLD._medevacCrews or {}) do - if crewData.side == self.Side and not crewData.pickedUp then - local dx = crewData.position.x - pos.x - local dz = crewData.position.z - pos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist < nearestDist then - nearestDist = dist - nearest = crewData - end - end - end - - if not nearest then - _msgGroup(group, 'No active MEDEVAC requests.') - return - end - - local brg = _bearingDeg({ x = pos.x, z = pos.z }, { x = nearest.position.x, z = nearest.position.z }) - local v, u = _fmtRange(nearestDist, isMetric) - - -- Calculate time remaining until timeout - local cfg = CTLD.MEDEVAC - local timeoutAt = nearest.spawnTime + (cfg.CrewTimeout or 3600) - local timeRemain = math.max(0, math.floor((timeoutAt - timer.getTime()) / 60)) - - _msgGroup(group, _fmtTemplate(CTLD.Messages.medevac_vectors, { - vehicle = nearest.vehicleType, - brg = brg, - rng = v, - rng_u = u, - time_remain = timeRemain - })) - end) - - CMD('Vectors to Nearest MASH', navRoot, function() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local pos = unit:GetPointVec3() - local isMetric = _getPlayerIsMetric(unit) - local nearest = nil - local nearestDist = math.huge - - -- Find nearest MASH of same coalition - for _, mashData in pairs(CTLD._mashZones or {}) do - if mashData.side == self.Side then - local dx = mashData.position.x - pos.x - local dz = mashData.position.z - pos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist < nearestDist then - nearestDist = dist - nearest = mashData - end - end - end - - if not nearest then - _msgGroup(group, 'No active MASH zones.') - return - end - - local brg = _bearingDeg({ x = pos.x, z = pos.z }, { x = nearest.position.x, z = nearest.position.z }) - local v, u = _fmtRange(nearestDist, isMetric) - local mashName = nearest.isMobile and ('Mobile MASH ' .. (nearest.id:match('_(%d+)$') or '?')) or nearest.catalogKey - - _msgGroup(group, string.format('Nearest MASH: %s, bearing %d°, range %s %s', mashName, brg, v, u)) - end) - end - - -- Hover Coach (at end of Navigation submenu) - CMD('Hover Coach: Enable', navRoot, function() - CTLD._coachOverride = CTLD._coachOverride or {} - CTLD._coachOverride[gname] = true - _eventSend(self, group, nil, 'coach_enabled', {}) - end) - CMD('Hover Coach: Disable', navRoot, function() - CTLD._coachOverride = CTLD._coachOverride or {} - CTLD._coachOverride[gname] = false - _eventSend(self, group, nil, 'coach_disabled', {}) - end) - - -- Admin/Help - -- Status & map controls - CMD('Show CTLD Status', adminRoot, function() - local crates = 0 - for _ in pairs(CTLD._crates) do crates = crates + 1 end - local msg = string.format('CTLD Status:\nActive crates: %d\nPickup zones: %d\nDrop zones: %d\nFOB zones: %d\nBuild Confirm: %s (%ds window)\nBuild Cooldown: %s (%ds)' - , crates, #(self.PickupZones or {}), #(self.DropZones or {}), #(self.FOBZones or {}) - , self.Config.BuildConfirmEnabled and 'ON' or 'OFF', self.Config.BuildConfirmWindowSeconds or 0 - , self.Config.BuildCooldownEnabled and 'ON' or 'OFF', self.Config.BuildCooldownSeconds or 0) - - -- Add MEDEVAC info if enabled - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - local activeRequests = 0 - for _, data in pairs(CTLD._medevacCrews or {}) do - if data.side == self.Side and not data.pickedUp then - activeRequests = activeRequests + 1 - end - end - local salvage = CTLD._salvagePoints[self.Side] or 0 - local mashCount = 0 - for _, m in pairs(CTLD._mashZones or {}) do - if m.side == self.Side then mashCount = mashCount + 1 end - end - msg = msg .. string.format('\n\nMEDEVAC:\nActive requests: %d\nMASH zones: %d\nSalvage points: %d', - activeRequests, mashCount, salvage) - end - - MESSAGE:New(msg, 20):ToGroup(group) - end) - CMD('Draw CTLD Zones on Map', adminRoot, function() - self:DrawZonesOnMap() - MESSAGE:New('CTLD zones drawn on F10 map.', 8):ToGroup(group) - end) - CMD('Clear CTLD Map Drawings', adminRoot, function() - self:ClearMapDrawings() - MESSAGE:New('CTLD map drawings cleared.', 8):ToGroup(group) - end) - - -- MEDEVAC Statistics (if enabled) - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CMD('Show MEDEVAC Statistics', adminRoot, function() - local stats = CTLD._medevacStats[self.Side] or {} - local lines = {} - table.insert(lines, 'MEDEVAC Statistics:') - table.insert(lines, '') - table.insert(lines, string.format('Crews spawned: %d', stats.spawned or 0)) - table.insert(lines, string.format('Crews rescued: %d', stats.rescued or 0)) - table.insert(lines, string.format('Delivered to MASH: %d', stats.delivered or 0)) - table.insert(lines, string.format('Timed out: %d', stats.timedOut or 0)) - table.insert(lines, string.format('Killed in action: %d', stats.killed or 0)) - table.insert(lines, '') - table.insert(lines, string.format('Vehicles respawned: %d', stats.vehiclesRespawned or 0)) - table.insert(lines, string.format('Salvage earned: %d', stats.salvageEarned or 0)) - table.insert(lines, string.format('Salvage used: %d', stats.salvageUsed or 0)) - table.insert(lines, string.format('Current salvage: %d', CTLD._salvagePoints[self.Side] or 0)) - - MESSAGE:New(table.concat(lines, '\n'), 30):ToGroup(group) - end) - end - - -- Admin/Help -> Debug - local debugMenu = MENU_GROUP:New(group, 'Debug', adminRoot) - CMD('Enable verbose logging', debugMenu, function() - self.Config.LogLevel = LOG_DEBUG - _logInfo(string.format('[%s] Verbose/Debug logging ENABLED via Admin menu', tostring(self.Side))) - MESSAGE:New('CTLD verbose logging ENABLED (LogLevel=4)', 8):ToGroup(group) - end) - CMD('Normal logging (INFO)', debugMenu, function() - self.Config.LogLevel = LOG_INFO - _logInfo(string.format('[%s] Logging set to INFO level via Admin menu', tostring(self.Side))) - MESSAGE:New('CTLD logging set to INFO (LogLevel=2)', 8):ToGroup(group) - end) - CMD('Minimal logging (ERRORS only)', debugMenu, function() - self.Config.LogLevel = LOG_ERROR - _logInfo(string.format('[%s] Logging set to ERROR-only via Admin menu', tostring(self.Side))) - MESSAGE:New('CTLD logging set to ERRORS only (LogLevel=1)', 8):ToGroup(group) - end) - CMD('Disable all logging', debugMenu, function() - self.Config.LogLevel = LOG_NONE - MESSAGE:New('CTLD logging DISABLED (LogLevel=0)', 8):ToGroup(group) - end) - - -- Admin/Help -> Player Guides (moved earlier) - - return root -end - --- Create or refresh the filtered "In Stock Here" menu for a group. --- If rootMenu is provided, (re)create under that. Otherwise, reuse previous stored root. -function CTLD:_BuildOrRefreshInStockMenu(group, rootMenu) - if not (self.Config.Inventory and self.Config.Inventory.Enabled and self.Config.Inventory.HideZeroStockMenu) then return end - if not group or not group:IsAlive() then return end - local gname = group:GetName() - -- remove previous menu if present and rootMenu not explicitly provided - local existing = CTLD._inStockMenus[gname] - if existing and existing.menu and (rootMenu == nil) then - pcall(function() existing.menu:Remove() end) - CTLD._inStockMenus[gname] = nil - end - - local parent = rootMenu or (self.MenusByGroup and self.MenusByGroup[gname]) - if not parent then return end - - -- Create a fresh submenu root - local inRoot = MENU_GROUP:New(group, 'Request Crate (In Stock Here)', parent) - CTLD._inStockMenus[gname] = { menu = inRoot } - - -- Find nearest active pickup zone - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local zone, dist = self:_nearestActivePickupZone(unit) - if not zone then - MENU_GROUP_COMMAND:New(group, 'No active supply zone nearby', inRoot, function() - -- Inform and also provide vectors to nearest configured zone if any - _eventSend(self, group, nil, 'no_pickup_zones', {}) - -- Fallback: try any configured pickup zone (ignoring active state) for helpful vectors - local list = self.Config and self.Config.Zones and self.Config.Zones.PickupZones or {} - if list and #list > 0 then - local unit = group:GetUnit(1) - if unit and unit:IsAlive() then - local fallbackZone, fallbackDist = _nearestZonePoint(unit, list) - if fallbackZone then - local up = unit:GetPointVec3(); local zp = fallbackZone:GetPointVec3() - local brg = _bearingDeg({x=up.x,z=up.z}, {x=zp.x,z=zp.z}) - local isMetric = _getPlayerIsMetric(unit) - local rngV, rngU = _fmtRange(fallbackDist or 0, isMetric) - _eventSend(self, group, nil, 'vectors_to_pickup_zone', { zone = fallbackZone:GetName(), brg = brg, rng = rngV, rng_u = rngU }) - end - end - end - end) - -- Still add a refresh item - MENU_GROUP_COMMAND:New(group, 'Refresh In-Stock List', inRoot, function() self:_BuildOrRefreshInStockMenu(group) end) - return - end - local zname = zone:GetName() - local maxd = self.Config.PickupZoneMaxDistance or 10000 - if not dist or dist > maxd then - MENU_GROUP_COMMAND:New(group, string.format('Nearest zone %s is beyond limit (%.0f m).', zname, dist or 0), inRoot, function() - local isMetric = _getPlayerIsMetric(unit) - local v, u = _fmtRange(math.max(0, (dist or 0) - maxd), isMetric) - local up = unit:GetPointVec3(); local zp = zone:GetPointVec3() - local brg = _bearingDeg({x=up.x,z=up.z}, {x=zp.x,z=zp.z}) - _eventSend(self, group, nil, 'pickup_zone_required', { zone_dist = v, zone_dist_u = u, zone_brg = brg }) - end) - MENU_GROUP_COMMAND:New(group, 'Refresh In-Stock List', inRoot, function() self:_BuildOrRefreshInStockMenu(group) end) - return - end - - -- Info and refresh commands at top - MENU_GROUP_COMMAND:New(group, string.format('Nearest Supply: %s', zname), inRoot, function() - local up = unit:GetPointVec3(); local zp = zone:GetPointVec3() - local brg = _bearingDeg({x=up.x,z=up.z}, {x=zp.x,z=zp.z}) - local isMetric = _getPlayerIsMetric(unit) - local rngV, rngU = _fmtRange(dist or 0, isMetric) - _eventSend(self, group, nil, 'vectors_to_pickup_zone', { zone = zname, brg = brg, rng = rngV, rng_u = rngU }) - end) - MENU_GROUP_COMMAND:New(group, 'Refresh In-Stock List', inRoot, function() self:_BuildOrRefreshInStockMenu(group) end) - - -- Build commands for items with stock > 0 at this zone; single-unit entries only - local inStock = {} - local stock = CTLD._stockByZone[zname] or {} - for key,def in pairs(self.Config.CrateCatalog or {}) do - local sideOk = (not def.side) or def.side == self.Side - local isSingle = (type(def.requires) ~= 'table') - if sideOk and isSingle then - local cnt = tonumber(stock[key] or 0) or 0 - if cnt > 0 then - table.insert(inStock, { key = key, def = def, cnt = cnt }) - end - end - end - -- Stable sort by menu label for consistency - table.sort(inStock, function(a,b) - local la = (a.def and (a.def.menu or a.def.description)) or a.key - local lb = (b.def and (b.def.menu or b.def.description)) or b.key - return tostring(la) < tostring(lb) - end) - - if #inStock == 0 then - MENU_GROUP_COMMAND:New(group, 'None in stock at this zone', inRoot, function() - _msgGroup(group, string.format('No crates in stock at %s.', zname)) - end) - else - for _,it in ipairs(inStock) do - local base = (it.def and (it.def.menu or it.def.description)) or it.key - local total = self:_recipeTotalCrates(it.def) - local suffix = (total == 1) and '1 crate' or (tostring(total)..' crates') - local label = string.format('%s (%s) [%d available]', base, suffix, it.cnt) - MENU_GROUP_COMMAND:New(group, label, inRoot, function() - self:RequestCrateForGroup(group, it.key) - -- After requesting, refresh to reflect the decremented stock - local id = timer.scheduleFunction(function() self:_BuildOrRefreshInStockMenu(group) end, {}, timer.getTime() + 0.1) - _trackOneShotTimer(id) - end) - end - end -end - --- Create or refresh the dynamic Build (Advanced) menu for a group. -function CTLD:_BuildOrRefreshBuildAdvancedMenu(group, rootMenu) - if not group or not group:IsAlive() then return end - -- Clear previous dynamic children if any by recreating the submenu root when rootMenu passed - -- We'll remove and recreate inner items by making a temporary child root - local gname = group:GetName() - -- Remove existing dynamic children by creating a fresh inner menu under the provided root - local dynRoot = MENU_GROUP:New(group, 'Buildable Near You', rootMenu) - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - local hdgRad, _ = _headingRadDeg(unit) - local buildOffset = math.max(0, tonumber(self.Config.BuildSpawnOffset or 0) or 0) - local spawnAt = (buildOffset > 0) and { x = here.x + math.sin(hdgRad) * buildOffset, z = here.z + math.cos(hdgRad) * buildOffset } or { x = here.x, z = here.z } - local radius = self.Config.BuildRadius or 60 - local nearby = self:GetNearbyCrates(here, radius) - local filtered = {} - for _,c in ipairs(nearby) do if c.meta.side == self.Side then table.insert(filtered, c) end end - nearby = filtered - -- Count by key - local counts = {} - for _,c in ipairs(nearby) do counts[c.meta.key] = (counts[c.meta.key] or 0) + 1 end - -- Include carried crates if allowed - if self.Config.BuildRequiresGroundCrates ~= true then - local gname = group:GetName() - local carried = CTLD._loadedCrates[gname] - if carried and carried.byKey then - for k,v in pairs(carried.byKey) do counts[k] = (counts[k] or 0) + v end - end - end - -- FOB restriction context - local insideFOBZone = select(1, self:IsPointInFOBZones(here)) - - -- Build list of buildable recipes - local items = {} - for key,cat in pairs(self.Config.CrateCatalog or {}) do - local sideOk = (not cat.side) or cat.side == self.Side - if sideOk and cat and cat.build then - local ok = false - if type(cat.requires) == 'table' then - ok = true - for reqKey,qty in pairs(cat.requires) do if (counts[reqKey] or 0) < (qty or 0) then ok = false; break end end - else - ok = ((counts[key] or 0) >= (cat.required or 1)) - end - if ok then - if not (cat.isFOB and self.Config.RestrictFOBToZones and not insideFOBZone) then - table.insert(items, { key = key, def = cat }) - end - end - end - end - - if #items == 0 then - MENU_GROUP_COMMAND:New(group, 'None buildable here. Drop required crates close to your aircraft.', dynRoot, function() - MESSAGE:New('No buildable items with nearby crates. Use Recipe Info to check requirements.', 10):ToGroup(group) - end) - return - end - - -- Stable ordering by label - table.sort(items, function(a,b) - local la = (a.def and (a.def.menu or a.def.description)) or a.key - local lb = (b.def and (b.def.menu or b.def.description)) or b.key - return tostring(la) < tostring(lb) - end) - - -- Create per-item submenus - local function CMD(title, parent, cb) - return MENU_GROUP_COMMAND:New(group, title, parent, function() - local ok, err = pcall(cb) - if not ok then _logVerbose('BuildAdv menu error: '..tostring(err)); MESSAGE:New('CTLD menu error: '..tostring(err), 8):ToGroup(group) end - end) - end - - for _,it in ipairs(items) do - local label = (it.def and (it.def.menu or it.def.description)) or it.key - local perItem = MENU_GROUP:New(group, label, dynRoot) - -- Hold Position - CMD('Build [Hold Position]', perItem, function() - self:BuildSpecificAtGroup(group, it.key, { behavior = 'defend' }) - end) - -- Attack variant (render even if canAttackMove=false; we message accordingly) - local vr = (self.Config.AttackAI and self.Config.AttackAI.VehicleSearchRadius) or 5000 - CMD(string.format('Build [Attack (%dm)]', vr), perItem, function() - if it.def and it.def.canAttackMove == false then - MESSAGE:New('This unit is static or not suited to move; it will hold position.', 8):ToGroup(group) - self:BuildSpecificAtGroup(group, it.key, { behavior = 'defend' }) - else - self:BuildSpecificAtGroup(group, it.key, { behavior = 'attack' }) - end - end) - end -end - --- Build a specific recipe at the group position if crates permit; supports behavior opts -function CTLD:BuildSpecificAtGroup(group, recipeKey, opts) - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local ctld = self - -- Reuse Build cooldown/confirm logic - local now = timer.getTime() - local gname = group:GetName() - if self.Config.BuildCooldownEnabled then - local last = CTLD._buildCooldown[gname] - if last and (now - last) < (self.Config.BuildCooldownSeconds or 60) then - local rem = math.max(0, math.ceil((self.Config.BuildCooldownSeconds or 60) - (now - last))) - _msgGroup(group, string.format('Build on cooldown. Try again in %ds.', rem)) - return - end - end - if self.Config.BuildConfirmEnabled then - local first = CTLD._buildConfirm[gname] - local win = self.Config.BuildConfirmWindowSeconds or 10 - if not first or (now - first) > win then - CTLD._buildConfirm[gname] = now - _msgGroup(group, string.format('Confirm build: select again within %ds to proceed.', win)) - return - else - CTLD._buildConfirm[gname] = nil - end - end - - local def = self.Config.CrateCatalog[recipeKey] - if not def or not def.build then _msgGroup(group, 'Unknown or unbuildable recipe: '..tostring(recipeKey)); return end - - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - local hdgRad, hdgDeg = _headingRadDeg(unit) - local buildOffset = math.max(0, tonumber(self.Config.BuildSpawnOffset or 0) or 0) - local spawnAt = (buildOffset > 0) and { x = here.x + math.sin(hdgRad) * buildOffset, z = here.z + math.cos(hdgRad) * buildOffset } or { x = here.x, z = here.z } - local radius = self.Config.BuildRadius or 60 - local nearby = self:GetNearbyCrates(here, radius) - local filtered = {} - for _,c in ipairs(nearby) do if c.meta.side == self.Side then table.insert(filtered, c) end end - nearby = filtered - if #nearby == 0 and self.Config.BuildRequiresGroundCrates ~= true then - -- still can build using carried crates - elseif #nearby == 0 then - _eventSend(self, group, nil, 'build_insufficient_crates', { build = def.description or recipeKey }) - return - end - - -- Count by key - local counts = {} - for _,c in ipairs(nearby) do counts[c.meta.key] = (counts[c.meta.key] or 0) + 1 end - -- Include carried crates - local carried = CTLD._loadedCrates[gname] - if self.Config.BuildRequiresGroundCrates ~= true then - if carried and carried.byKey then for k,v in pairs(carried.byKey) do counts[k] = (counts[k] or 0) + v end end - end - - -- Helper to consume crates of a given key/qty (prefers carried when allowed) - local function consumeCrates(key, qty) - local removed = 0 - if self.Config.BuildRequiresGroundCrates ~= true then - if carried and carried.byKey and (carried.byKey[key] or 0) > 0 then - local take = math.min(qty, carried.byKey[key]) - carried.byKey[key] = carried.byKey[key] - take - if carried.byKey[key] <= 0 then carried.byKey[key] = nil end - carried.total = math.max(0, (carried.total or 0) - take) - removed = removed + take - if take > 0 then ctld:_scheduleLoadedCrateMenuRefresh(group) end - end - end - for _,c in ipairs(nearby) do - if removed >= qty then break end - if c.meta.key == key then - local obj = StaticObject.getByName(c.name) - if obj then obj:destroy() end - _cleanupCrateSmoke(c.name) -- Clean up smoke refresh schedule - if c.meta and c.meta.point then - _removeFromSpatialGrid(c.name, c.meta.point, 'crate') -- prune hover pickup spatial cache - end - CTLD._crates[c.name] = nil - removed = removed + 1 - end - end - end - - -- FOB restriction check - if def.isFOB and self.Config.RestrictFOBToZones then - local inside = select(1, self:IsPointInFOBZones(here)) - if not inside then _eventSend(self, group, nil, 'fob_restricted', {}); return end - end - - -- Special-case: SAM Site Repair/Augment entries (isRepair) - if def.isRepair == true or tostring(recipeKey):find('_REPAIR', 1, true) then - -- Map recipe key family to a template definition - local function identifyTemplate(key) - if key:find('HAWK', 1, true) then - return { - name='HAWK', side=def.side or self.Side, - baseUnits={ {type='Hawk sr', dx=12, dz=8}, {type='Hawk tr', dx=-12, dz=8}, {type='Hawk pcp', dx=18, dz=12}, {type='Hawk cwar', dx=-18, dz=12} }, - launcherType='Hawk ln', launcherStart={dx=0, dz=0}, launcherStep={dx=6, dz=0}, maxLaunchers=6 - } - elseif key:find('PATRIOT', 1, true) then - return { - name='PATRIOT', side=def.side or self.Side, - baseUnits={ {type='Patriot str', dx=14, dz=10}, {type='Patriot ECS', dx=-14, dz=10} }, - launcherType='Patriot ln', launcherStart={dx=0, dz=0}, launcherStep={dx=8, dz=0}, maxLaunchers=6 - } - elseif key:find('KUB', 1, true) then - return { - name='KUB', side=def.side or self.Side, - baseUnits={ {type='Kub 1S91 str', dx=12, dz=8} }, - launcherType='Kub 2P25 ln', launcherStart={dx=0, dz=0}, launcherStep={dx=6, dz=0}, maxLaunchers=3 - } - elseif key:find('BUK', 1, true) then - return { - name='BUK', side=def.side or self.Side, - baseUnits={ {type='SA-11 Buk SR 9S18M1', dx=12, dz=8}, {type='SA-11 Buk CC 9S470M1', dx=-12, dz=8} }, - launcherType='SA-11 Buk LN 9A310M1', launcherStart={dx=0, dz=0}, launcherStep={dx=6, dz=0}, maxLaunchers=6 - } - end - return nil - end - - local tpl = identifyTemplate(tostring(recipeKey)) - if not tpl then _msgGroup(group, 'No matching SAM site type for repair: '..tostring(recipeKey)); return end - - -- Determine how many repair crates to apply - local cratesAvail = counts[recipeKey] or 0 - if cratesAvail <= 0 then _eventSend(self, group, nil, 'build_insufficient_crates', { build = def.description or recipeKey }); return end - - -- Find nearest existing site group that matches template - local function vec2(u) - local p = u:getPoint(); return { x = p.x, z = p.z } - end - local function dist2(a,b) - local dx, dz = a.x-b.x, a.z-b.z; return math.sqrt(dx*dx+dz*dz) - end - local searchR = math.max(250, (self.Config.BuildRadius or 60) * 10) - local groups = coalition.getGroups(tpl.side, Group.Category.GROUND) or {} - local here2 = { x = here.x, z = here.z } - local bestG, bestD, bestInfo = nil, 1e9, nil - for _,g in ipairs(groups) do - if g and g:isExist() then - local units = g:getUnits() or {} - if #units > 0 then - -- Compute center and count types - local cx, cz = 0, 0 - local byType = {} - for _,u in ipairs(units) do - local pt = u:getPoint(); cx = cx + pt.x; cz = cz + pt.z - local tname = u:getTypeName() or '' - byType[tname] = (byType[tname] or 0) + 1 - end - cx = cx / #units; cz = cz / #units - local d = dist2(here2, { x = cx, z = cz }) - if d <= searchR then - -- Check presence of base units (at least 1 each) - local ok = true - for _,u in ipairs(tpl.baseUnits) do if (byType[u.type] or 0) < 1 then ok = false; break end end - -- Require at least 1 launcher or allow 0 (initial repair to full base)? we'll allow 0 too. - if ok then - if d < bestD then - bestG, bestD = g, d - bestInfo = { byType = byType, center = { x = cx, z = cz }, headingDeg = function() - local h = 0; local leader = units[1]; if leader and leader.isExist and leader:isExist() then h = math.deg(leader:getHeading() or 0) end; return h - end } - end - end - end - end - end - end - - if not bestG then - _msgGroup(group, 'No matching SAM site found nearby to repair/augment.') - return - end - - -- Current launchers in site - local curLaunchers = (bestInfo.byType[tpl.launcherType] or 0) - local maxL = tpl.maxLaunchers or (curLaunchers + cratesAvail) - local canAdd = math.max(0, (maxL - curLaunchers)) - if canAdd <= 0 then - _msgGroup(group, 'SAM site is already at max launchers.') - return - end - local addNum = math.min(cratesAvail, canAdd) - - -- Build new group composition: base units + (curLaunchers + addNum) launchers - local function buildSite(point, headingDeg, side, launcherCount) - local hdg = math.rad(headingDeg or 0) - local function off(dx, dz) - -- rotate offsets by heading - local s, c = math.sin(hdg), math.cos(hdg) - local rx = dx * c + dz * s - local rz = -dx * s + dz * c - return { x = point.x + rx, z = point.z + rz } - end - local units = {} - -- Place launchers in a row starting at launcherStart and stepping by launcherStep - for i=0, (launcherCount-1) do - local dx = (tpl.launcherStart.dx or 0) + (tpl.launcherStep.dx or 0) * i - local dz = (tpl.launcherStart.dz or 0) + (tpl.launcherStep.dz or 0) * i - local p = off(dx, dz) - table.insert(units, { type = tpl.launcherType, name = string.format('CTLD-%s-%d', tpl.launcherType, math.random(100000,999999)), x = p.x, y = p.z, heading = hdg }) - end - -- Place base units at their template offsets - for _,u in ipairs(tpl.baseUnits) do - local p = off(u.dx or 0, u.dz or 0) - table.insert(units, { type = u.type, name = string.format('CTLD-%s-%d', u.type, math.random(100000,999999)), x = p.x, y = p.z, heading = hdg }) - end - return { visible=false, lateActivation=false, tasks={}, task='Ground Nothing', route={}, units=units, name=string.format('CTLD_SITE_%d', math.random(100000,999999)) } - end - - _eventSend(self, group, nil, 'build_started', { build = def.description or recipeKey }) - -- Destroy old group, spawn new one - local oldName = bestG:getName() - local newLauncherCount = curLaunchers + addNum - local center = bestInfo.center - local headingDeg = bestInfo.headingDeg() - if Group.getByName(oldName) then pcall(function() Group.getByName(oldName):destroy() end) end - local gdata = buildSite({ x = center.x, z = center.z }, headingDeg, tpl.side, newLauncherCount) - local newG = _coalitionAddGroup(tpl.side, Group.Category.GROUND, gdata, self.Config) - if not newG then _eventSend(self, group, nil, 'build_failed', { reason = 'DCS group spawn error' }); return end - -- Consume used repair crates - consumeCrates(recipeKey, addNum) - _eventSend(self, nil, self.Side, 'build_success_coalition', { build = (def.description or recipeKey), player = _playerNameFromGroup(group) }) - if self.Config.BuildCooldownEnabled then CTLD._buildCooldown[gname] = now end - return - end - - -- Verify counts and build - if type(def.requires) == 'table' then - for reqKey,qty in pairs(def.requires) do if (counts[reqKey] or 0) < (qty or 0) then _eventSend(self, group, nil, 'build_insufficient_crates', { build = def.description or recipeKey }); return end end - local gdata = def.build({ x = spawnAt.x, z = spawnAt.z }, hdgDeg, def.side or self.Side) - _eventSend(self, group, nil, 'build_started', { build = def.description or recipeKey }) - local g = _coalitionAddGroup(def.side or self.Side, def.category or Group.Category.GROUND, gdata, self.Config) - if not g then _eventSend(self, group, nil, 'build_failed', { reason = 'DCS group spawn error' }); return end - if self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC pre: post-build (composite) key=%s group=%s', tostring(recipeKey), tostring(g:getName()))) - end - self:_maybeRegisterJTAC(recipeKey, def, g) - for reqKey,qty in pairs(def.requires) do consumeCrates(reqKey, qty or 0) end - _eventSend(self, nil, self.Side, 'build_success_coalition', { build = def.description or recipeKey, player = _playerNameFromGroup(group) }) - if def.isFOB then pcall(function() self:_CreateFOBPickupZone({ x = spawnAt.x, z = spawnAt.z }, def, hdg) end) end - if def.isMobileMASH then - _logDebug(string.format('[MobileMASH] BuildSpecificAtGroup invoking _CreateMobileMASH for key %s at (%.1f, %.1f)', tostring(recipeKey), spawnAt.x or -1, spawnAt.z or -1)) - local ok, err = pcall(function() self:_CreateMobileMASH(g, { x = spawnAt.x, z = spawnAt.z }, def) end) - if not ok then - _logError(string.format('[MobileMASH] _CreateMobileMASH invocation failed: %s', tostring(err))) - end - end - -- behavior - local behavior = opts and opts.behavior or nil - if behavior == 'attack' and (def.canAttackMove ~= false) and self.Config.AttackAI and self.Config.AttackAI.Enabled then - local t = self:_assignAttackBehavior(g:getName(), spawnAt, true) - local isMetric = _getPlayerIsMetric(group:GetUnit(1)) - if t and t.kind == 'base' then - local brg = _bearingDeg(spawnAt, t.point) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_base_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), base_name = t.name, brg = brg, rng = v, rng_u = u }) - elseif t and t.kind == 'enemy' then - local brg = _bearingDeg(spawnAt, t.point) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_enemy_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), enemy_type = t.etype or 'unit', brg = brg, rng = v, rng_u = u }) - else - local v, u = _fmtRange((self.Config.AttackAI and self.Config.AttackAI.VehicleSearchRadius) or 5000, isMetric) - _eventSend(self, nil, self.Side, 'attack_no_targets', { unit_name = g:getName(), player = _playerNameFromGroup(group), rng = v, rng_u = u }) - end - elseif behavior == 'attack' and def.canAttackMove == false then - MESSAGE:New('This unit is static or not suited to move; it will hold position.', 8):ToGroup(group) - end - if self.Config.BuildCooldownEnabled then CTLD._buildCooldown[gname] = now end - return - else - -- single-key - local need = def.required or 1 - if (counts[recipeKey] or 0) < need then _eventSend(self, group, nil, 'build_insufficient_crates', { build = def.description or recipeKey }); return end - local gdata = def.build({ x = spawnAt.x, z = spawnAt.z }, hdgDeg, def.side or self.Side) - _eventSend(self, group, nil, 'build_started', { build = def.description or recipeKey }) - local g = _coalitionAddGroup(def.side or self.Side, def.category or Group.Category.GROUND, gdata, self.Config) - if not g then _eventSend(self, group, nil, 'build_failed', { reason = 'DCS group spawn error' }); return end - if self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC pre: post-build (single) key=%s group=%s', tostring(recipeKey), tostring(g:getName()))) - end - self:_maybeRegisterJTAC(recipeKey, def, g) - consumeCrates(recipeKey, need) - _eventSend(self, nil, self.Side, 'build_success_coalition', { build = def.description or recipeKey, player = _playerNameFromGroup(group) }) - -- behavior - local behavior = opts and opts.behavior or nil - if behavior == 'attack' and (def.canAttackMove ~= false) and self.Config.AttackAI and self.Config.AttackAI.Enabled then - local t = self:_assignAttackBehavior(g:getName(), spawnAt, true) - local isMetric = _getPlayerIsMetric(group:GetUnit(1)) - if t and t.kind == 'base' then - local brg = _bearingDeg(spawnAt, t.point) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_base_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), base_name = t.name, brg = brg, rng = v, rng_u = u }) - elseif t and t.kind == 'enemy' then - local brg = _bearingDeg(spawnAt, t.point) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_enemy_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), enemy_type = t.etype or 'unit', brg = brg, rng = v, rng_u = u }) - else - local v, u = _fmtRange((self.Config.AttackAI and self.Config.AttackAI.VehicleSearchRadius) or 5000, isMetric) - _eventSend(self, nil, self.Side, 'attack_no_targets', { unit_name = g:getName(), player = _playerNameFromGroup(group), rng = v, rng_u = u }) - end - elseif behavior == 'attack' and def.canAttackMove == false then - MESSAGE:New('This unit is static or not suited to move; it will hold position.', 8):ToGroup(group) - end - if self.Config.BuildCooldownEnabled then CTLD._buildCooldown[gname] = now end - return - end -end - -function CTLD:_definitionIsJTAC(def) - if not def then return false end - if def.isJTAC == true then return true end - if type(def.jtac) == 'table' and def.jtac.enabled ~= false then return true end - if type(def.roles) == 'table' then - for _, role in ipairs(def.roles) do - if tostring(role):upper() == 'JTAC' then - return true - end - end - end - return false -end - -function CTLD:_maybeRegisterJTAC(recipeKey, def, dcsGroup) - if not (self.Config.JTAC and self.Config.JTAC.Enabled) then - if self.Config and self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo('JTAC check: JTAC disabled in config; skipping registration') - end - return - end - if not self:_definitionIsJTAC(def) then - if self.Config and self.Config.JTAC and self.Config.JTAC.Verbose then - local hasRoles = (def and type(def.roles) == 'table') and table.concat((function(r) local t={} for i,v in ipairs(r) do t[i]=tostring(v) end return t end)(def.roles),'|') or '(none)' - local hasJTAC = (def and type(def.jtac) == 'table') and 'yes' or 'no' - _logInfo(string.format('JTAC check: definition not JTAC. key=%s jtacTable=%s roles=%s isJTAC=%s', tostring(recipeKey), hasJTAC, hasRoles, tostring(def and def.isJTAC))) - end - return - end - if not dcsGroup then - if self.Config and self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC check: no DCS group to register. key=%s', tostring(recipeKey))) - end - return - end - if self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC check: attempting registration. key=%s unitType=%s group=%s', tostring(recipeKey), tostring(def and def.unitType or def and def.description or 'n/a'), tostring(dcsGroup and dcsGroup.getName and dcsGroup:getName() or ''))) - end - self:_registerJTACGroup(recipeKey, def, dcsGroup) -end - -function CTLD:_reserveJTACCode(side, groupName) - local pool = self.Config.JTAC and self.Config.JTAC.LaserCodes or { '1688' } - if not CTLD._jtacReservedCodes then - CTLD._jtacReservedCodes = { [coalition.side.BLUE] = {}, [coalition.side.RED] = {}, [coalition.side.NEUTRAL] = {} } - end - CTLD._jtacReservedCodes[side] = CTLD._jtacReservedCodes[side] or {} - for _, code in ipairs(pool) do - code = tostring(code) - if not CTLD._jtacReservedCodes[side][code] then - CTLD._jtacReservedCodes[side][code] = groupName - return code - end - end - local fallback = tostring(pool[1] or '1688') - _logVerbose(string.format('JTAC laser code pool exhausted for side %s, reusing %s', tostring(side), fallback)) - return fallback -end - -function CTLD:_releaseJTACCode(side, code, groupName) - if not code then return end - code = tostring(code) - if CTLD._jtacReservedCodes and CTLD._jtacReservedCodes[side] then - if CTLD._jtacReservedCodes[side][code] == groupName then - CTLD._jtacReservedCodes[side][code] = nil - end - end -end - -function CTLD:_registerJTACGroup(recipeKey, def, dcsGroup) - if not (dcsGroup and dcsGroup.getName) then return end - local groupName = dcsGroup:getName() - if not groupName then return end - - self:_cleanupJTACEntry(groupName) -- ensure stale entry cleared - - local side = dcsGroup:getCoalition() or self.Side - local code = self:_reserveJTACCode(side, groupName) - local platform = 'ground' - if def and def.jtac and def.jtac.platform then - platform = tostring(def.jtac.platform) - elseif def and def.category == Group.Category.AIRPLANE then - platform = 'air' - end - local cfgSmoke = self.Config.JTAC and self.Config.JTAC.Smoke or {} - local smokeColor = (side == coalition.side.BLUE) and cfgSmoke.ColorBlue or cfgSmoke.ColorRed - - local entry = { - groupName = groupName, - recipeKey = recipeKey, - def = def, - side = side, - code = code, - platform = platform, - smokeColor = smokeColor, - nextScan = timer.getTime() + 2, - smokeNext = 0, - lockType = def and def.jtac and def.jtac.lock, - } - - local friendlyName = (def and self:_friendlyNameForKey(recipeKey)) or groupName - entry.displayName = friendlyName - entry.lastState = 'onstation' - - self._jtacRegistry[groupName] = entry - - self:_announceJTAC('jtac_onstation', entry, { - jtac = friendlyName, - code = code, - }) - - _logInfo(string.format('JTAC registered: group=%s friendlyName=%s code=%s platform=%s verbose=%s', tostring(groupName), tostring(friendlyName), tostring(code), tostring(platform), tostring(self.Config.JTAC and self.Config.JTAC.Verbose))) -end - -function CTLD:_announceJTAC(msgKey, entry, payload) - if not entry then return end - local cfg = self.Config.JTAC and self.Config.JTAC.Announcements - local allowed = true - if entry and entry.announceOverride ~= nil then - allowed = entry.announceOverride == true - else - allowed = (cfg and cfg.Enabled ~= false) - end - if not allowed then return end - local tpl = CTLD.Messages[msgKey] - if not tpl then return end - local data = payload or {} - data.jtac = data.jtac or entry.displayName or entry.groupName - data.code = data.code or entry.code - local text = _fmtTemplate(tpl, data) - if text and text ~= '' then - _msgCoalition(entry.side or self.Side, text, cfg.Duration or self.Config.MessageDuration) - end -end - -function CTLD:_cleanupJTACEntry(groupName) - local entry = self._jtacRegistry and self._jtacRegistry[groupName] - if not entry then return end - self:_cancelJTACSpots(entry) - self:_releaseJTACCode(entry.side or self.Side, entry.code, groupName) - self._jtacRegistry[groupName] = nil -end - -function CTLD:_cancelJTACSpots(entry) - if not entry then return end - if entry.laserSpot then - pcall(function() Spot.destroy(entry.laserSpot) end) - entry.laserSpot = nil - end - if entry.irSpot then - pcall(function() Spot.destroy(entry.irSpot) end) - entry.irSpot = nil - end -end - -function CTLD:_tickJTACs() - if not self._jtacRegistry then return end - if not next(self._jtacRegistry) then return end - local now = timer.getTime() - for groupName, entry in pairs(self._jtacRegistry) do - if not entry.nextScan or now >= entry.nextScan then - local ok, err = pcall(function() - self:_processJTACEntry(groupName, entry, now) - end) - if not ok then - _logError(string.format('JTAC tick error for %s: %s', tostring(groupName), tostring(err))) - entry.nextScan = now + 10 - end - end - end -end - -function CTLD:_processJTACEntry(groupName, entry, now) - local cfg = self.Config.JTAC or {} - local autoCfg = cfg.AutoLase or {} - if autoCfg.Enabled == false then - self:_cancelJTACSpots(entry) - entry.nextScan = now + 30 - return - end - if entry.paused then - self:_cancelJTACSpots(entry) - entry.nextScan = now + 30 - entry.lastState = 'paused' - return - end - local group = Group.getByName(groupName) - if not group or not group:isExist() then - self:_cleanupJTACEntry(groupName) - return - end - - local units = group:getUnits() or {} - if #units == 0 then - self:_cancelJTACSpots(entry) - entry.nextScan = now + (autoCfg.TransportHoldSeconds or 10) - return - end - - local jtacUnit = units[1] - if not jtacUnit or jtacUnit:getLife() <= 0 or not jtacUnit:isActive() then - self:_cleanupJTACEntry(groupName) - return - end - - entry.jtacUnitName = entry.jtacUnitName or jtacUnit:getName() - entry.displayName = entry.displayName or entry.jtacUnitName or groupName - - local jtacPoint = jtacUnit:getPoint() - local searchRadius = tonumber(entry.searchRadiusOverride or autoCfg.SearchRadius) or 8000 - if cfg.Verbose then - _logInfo(string.format('JTAC tick: group=%s unit=%s radius=%.0f pos=(%.0f,%.0f,%.0f)', tostring(groupName), tostring(entry.jtacUnitName or jtacUnit:getName()), searchRadius, jtacPoint.x or -1, jtacPoint.y or -1, jtacPoint.z or -1)) - end - - local current = entry.currentTarget - local targetUnit = nil - local targetStatus = nil - - if current and current.name then - local candidate = Unit.getByName(current.name) - if candidate and candidate:isExist() and candidate:getLife() > 0 then - local tgtPoint = candidate:getPoint() - local dist = _distance3d(tgtPoint, jtacPoint) - if dist <= searchRadius and _hasLineOfSight(jtacPoint, tgtPoint) then - targetUnit = candidate - current.lastSeen = now - current.distance = dist - else - targetStatus = 'lost' - end - else - targetStatus = 'destroyed' - end - if targetStatus then - if targetStatus == 'destroyed' then - if entry.lastState ~= 'destroyed' then - self:_announceJTAC('jtac_target_destroyed', entry, { - jtac = entry.displayName, - target = current.label or current.name, - code = entry.code, - }) - entry.lastState = 'destroyed' - end - else - if entry.lastState ~= 'lost' then - self:_announceJTAC('jtac_target_lost', entry, { - jtac = entry.displayName, - target = current.label or current.name, - }) - entry.lastState = 'lost' - end - end - entry.currentTarget = nil - targetUnit = nil - self:_cancelJTACSpots(entry) - entry.nextScan = now + (targetStatus == 'lost' and (autoCfg.LostRetrySeconds or 10) or 5) - end - end - - if not targetUnit then - local lockPref = entry.lockType or cfg.LockType or 'all' - local selection = self:_findJTACNewTarget(entry, jtacPoint, searchRadius, lockPref) - if cfg.Verbose then - _logInfo(string.format('JTAC scan: group=%s lock=%s found=%s', tostring(groupName), tostring(lockPref), selection and (selection.unit and selection.unit:getTypeName()) or 'nil')) - end - if selection then - targetUnit = selection.unit - entry.currentTarget = { - name = targetUnit:getName(), - label = targetUnit:getTypeName(), - firstSeen = now, - lastSeen = now, - distance = selection.distance, - } - local grid = self:_GetMGRSString(targetUnit:getPoint()) - local newState = 'target:'..(entry.currentTarget.name or '') - if entry.lastState ~= newState then - self:_announceJTAC('jtac_new_target', entry, { - jtac = entry.displayName, - target = targetUnit:getTypeName(), - code = entry.code, - grid = grid, - }) - entry.lastState = newState - end - end - end - - if targetUnit then - self:_updateJTACSpots(entry, jtacUnit, targetUnit) - entry.nextScan = now + (autoCfg.RefreshSeconds or 15) - if cfg.Verbose then - _logInfo(string.format('JTAC lase: group=%s target=%s code=%s', tostring(groupName), tostring(targetUnit and targetUnit:getTypeName()), tostring(entry.code))) - end - else - self:_cancelJTACSpots(entry) - entry.nextScan = now + (autoCfg.IdleRescanSeconds or 30) - if entry.lastState ~= 'idle' then - self:_announceJTAC('jtac_idle', entry, { - jtac = entry.displayName, - }) - entry.lastState = 'idle' - end - end -end - -function CTLD:ListJTACStatus(group) - local lines = {} - table.insert(lines, 'JTAC Status') - table.insert(lines, '') - if not self._jtacRegistry or not next(self._jtacRegistry) then - table.insert(lines, '(none registered)') - else - local now = timer.getTime() - for gname, entry in pairs(self._jtacRegistry) do - local tgt = entry.currentTarget and entry.currentTarget.label or '(idle)' - local age = entry.currentTarget and (now - (entry.currentTarget.firstSeen or now)) or 0 - local nextScan = entry.nextScan and (entry.nextScan - now) or -1 - table.insert(lines, string.format('- %s code=%s plat=%s state=%s target=%s age=%.0fs nextScan=%.0fs', - entry.displayName or gname, tostring(entry.code), tostring(entry.platform), tostring(entry.lastState), tgt, age, nextScan)) - end - end - local text = table.concat(lines, '\n') - if group and group:IsAlive() then - MESSAGE:New(text, 20):ToGroup(group) - else - _msgCoalition(self.Side, text, 20) - end -end - -function CTLD:JTACDiagnostics(group) - local lines = {} - table.insert(lines, 'JTAC Diagnostics') - local cfg = self.Config.JTAC or {} - table.insert(lines, string.format('Enabled=%s Verbose=%s LockType=%s', tostring(cfg.Enabled), tostring(cfg.Verbose), tostring(cfg.LockType))) - local auto = cfg.AutoLase or {} - table.insert(lines, string.format('AutoLase Enabled=%s Radius=%s Refresh=%s IdleRescan=%s LostRetry=%s', tostring(auto.Enabled), tostring(auto.SearchRadius), tostring(auto.RefreshSeconds), tostring(auto.IdleRescanSeconds), tostring(auto.LostRetrySeconds))) - local countCatalog = 0 - local jtacKeys = {} - for key,def in pairs(self.Config.CrateCatalog or {}) do - if self:_definitionIsJTAC(def) then - countCatalog = countCatalog + 1 - table.insert(jtacKeys, key) - end - end - table.insert(lines, string.format('Catalog JTAC Definitions: %d', countCatalog)) - if #jtacKeys > 0 then - table.insert(lines, 'Keys: '..table.concat(jtacKeys, ', ')) - end - local regCount = 0 - for _ in pairs(self._jtacRegistry or {}) do regCount = regCount + 1 end - table.insert(lines, string.format('Registered JTAC Groups: %d', regCount)) - if regCount > 0 then - for gname, entry in pairs(self._jtacRegistry) do - table.insert(lines, string.format(' Reg: %s code=%s state=%s', gname, tostring(entry.code), tostring(entry.lastState))) - end - end - local text = table.concat(lines, '\n') - if group and group:IsAlive() then - MESSAGE:New(text, 25):ToGroup(group) - else - _msgCoalition(self.Side, text, 25) - end -end - --- ========================= --- JTAC Controls (per-group active selection) --- ========================= - -function CTLD:_getActiveJTAC(group) - local gname = group and group:GetName() - if not gname then return nil end - CTLD._activeJTACByGroup = CTLD._activeJTACByGroup or {} - local key = CTLD._activeJTACByGroup[gname] - if key and self._jtacRegistry and self._jtacRegistry[key] then - return self._jtacRegistry[key] - end - return nil -end - -local function _unitVec2(unit) - local p = unit:GetPointVec3(); return { x = p.x, z = p.z } -end - -function CTLD:JTAC_SelectActiveForGroup(group, opts) - local entries = {} - for name, entry in pairs(self._jtacRegistry or {}) do table.insert(entries, entry) end - if #entries == 0 then MESSAGE:New('No JTACs registered yet.', 8):ToGroup(group); return end - -- choose nearest to player unit - table.sort(entries, function(a,b) - local u = group:GetUnit(1); if not u then return false end - local up = _unitVec2(group:GetUnit(1)) - local function d(e) - local g = Group.getByName(e.groupName); if not g then return 1e12 end - local gu = g:getUnits(); if not gu or #gu==0 then return 1e12 end - local p = gu[1]:getPoint(); local dx = (p.x - up.x); local dz=(p.z - up.z); return math.sqrt(dx*dx+dz*dz) - end - return d(a) < d(b) - end) - local chosen = entries[1] - CTLD._activeJTACByGroup = CTLD._activeJTACByGroup or {} - CTLD._activeJTACByGroup[group:GetName()] = chosen.groupName - MESSAGE:New(string.format('Active JTAC set to %s (code %s).', chosen.displayName or chosen.groupName, tostring(chosen.code)), 10):ToGroup(group) -end - -function CTLD:JTAC_TogglePause(group) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - e.paused = not e.paused - local msg = e.paused and 'paused' or 'resumed' - MESSAGE:New(string.format('JTAC %s %s.', e.displayName or e.groupName, msg), 8):ToGroup(group) -end - -function CTLD:JTAC_ReleaseTarget(group) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - self:_cancelJTACSpots(e) - e.currentTarget = nil - e.nextScan = timer.getTime() + 1 - e.lastState = 'released' - MESSAGE:New('JTAC target released.', 6):ToGroup(group) -end - -function CTLD:JTAC_ForceRescan(group) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - e.currentTarget = nil - e.nextScan = timer.getTime() + 0.5 - e.lastState = 'rescan' - MESSAGE:New('JTAC rescan queued.', 6):ToGroup(group) -end - -function CTLD:JTAC_SetLockFilter(group, mode) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - e.lockType = (mode or 'all') - e.currentTarget = nil; e.nextScan = timer.getTime() + 0.5 - MESSAGE:New(string.format('JTAC lock filter set to %s.', mode), 6):ToGroup(group) -end - -function CTLD:JTAC_SetPriority(group, profile) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - e.priorityProfile = profile or 'balanced' - e.currentTarget = nil; e.nextScan = timer.getTime() + 0.5 - MESSAGE:New(string.format('JTAC priority set: %s', profile), 6):ToGroup(group) -end - -function CTLD:JTAC_SetSearchRadius(group, meters) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - e.searchRadiusOverride = tonumber(meters) - e.currentTarget = nil; e.nextScan = timer.getTime() + 0.5 - MESSAGE:New(string.format('JTAC search radius set to %dm.', meters or 0), 6):ToGroup(group) -end - -function CTLD:JTAC_ToggleSmoke(group) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - if e.smokeEnabledOverride == nil then - e.smokeEnabledOverride = not ((self.Config.JTAC and self.Config.JTAC.Smoke and self.Config.JTAC.Smoke.Enabled) ~= false) - else - e.smokeEnabledOverride = not e.smokeEnabledOverride - end - local state = e.smokeEnabledOverride and 'ON' or 'OFF' - MESSAGE:New('JTAC smoke '..state..'.', 6):ToGroup(group) -end - -function CTLD:JTAC_SetSmokeColor(group, which) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - if which == 'blue' then - e.smokeColor = trigger.smokeColor.Blue - elseif which == 'orange' then - e.smokeColor = trigger.smokeColor.Orange - end - MESSAGE:New('JTAC smoke color set.', 6):ToGroup(group) -end - -function CTLD:JTAC_ToggleAnnouncements(group) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - if e.announceOverride == nil then - local cfg = self.Config.JTAC and self.Config.JTAC.Announcements - e.announceOverride = not (cfg and cfg.Enabled ~= false) - else - e.announceOverride = not e.announceOverride - end - MESSAGE:New('JTAC announcements '..(e.announceOverride and 'ON' or 'OFF')..'.', 6):ToGroup(group) -end - -function CTLD:JTAC_MarkCurrentTarget(group) - local e = self:_getActiveJTAC(group); if not e then self:JTAC_SelectActiveForGroup(group); e=self:_getActiveJTAC(group) end; if not e then return end - if not e.currentTarget or not e.currentTarget.name then MESSAGE:New('No current target to mark.', 6):ToGroup(group); return end - local u = Unit.getByName(e.currentTarget.name); if not u or not u:isExist() then MESSAGE:New('Target no longer valid.', 6):ToGroup(group); return end - local p = u:getPoint() - CTLD._markId = (CTLD._markId or 900000) + 1 - local text = string.format('JTAC %s target: %s (code %s)', e.displayName or e.groupName, e.currentTarget.label or e.currentTarget.name, tostring(e.code)) - local side = (group and group.GetCoalition and group:GetCoalition()) or e.side or coalition.side.BLUE - pcall(function() trigger.action.markToCoalition(CTLD._markId, text, {x=p.x, y=p.y, z=p.z}, side) end) - MESSAGE:New('Marked current target on map.', 6):ToGroup(group) -end - -function CTLD:_findJTACNewTarget(entry, jtacPoint, radius, lockType) - local enemy = _enemySide(entry and entry.side or self.Side) - local best - local lock = (lockType or 'all'):lower() - local profile = entry and entry.priorityProfile or 'balanced' - local ok, groups = pcall(function() - return coalition.getGroups(enemy, Group.Category.GROUND) or {} - end) - if not ok then - groups = {} - end - - for _, grp in ipairs(groups) do - if grp and grp:isExist() then - local units = grp:getUnits() - if units then - for _, unit in ipairs(units) do - if unit and unit:isExist() and unit:isActive() and unit:getLife() > 0 then - local skip = false - if lock == 'troop' and not _isDcsInfantry(unit) then skip = true end - if lock == 'vehicle' and _isDcsInfantry(unit) then skip = true end - if not skip then - local pos = unit:getPoint() - local dist = _distance3d(pos, jtacPoint) - if dist <= radius and _hasLineOfSight(jtacPoint, pos) then - local score = _jtacTargetScoreProfiled(unit, profile) - if not best or score > best.score or (score == best.score and dist < best.distance) then - best = { unit = unit, score = score, distance = dist } - end - end - end - end - end - end - end - end - - return best -end - -function CTLD:_updateJTACSpots(entry, jtacUnit, targetUnit) - if not (entry and jtacUnit and targetUnit) then return end - local codeNumber = tonumber(entry.code) or 1688 - local targetPoint = targetUnit:getPoint() - targetPoint = _vec3(targetPoint.x, targetPoint.y + 2.0, targetPoint.z) - local origin = { x = 0, y = 2.0, z = 0 } - - if not entry.laserSpot or not entry.irSpot then - local ok, res = pcall(function() - local spots = {} - spots.ir = Spot.createInfraRed(jtacUnit, origin, targetPoint) - spots.laser = Spot.createLaser(jtacUnit, origin, targetPoint, codeNumber) - return spots - end) - if ok and res then - entry.irSpot = entry.irSpot or res.ir - entry.laserSpot = entry.laserSpot or res.laser - else - _logError(string.format('JTAC spot create failed for %s: %s', tostring(entry.groupName), tostring(res))) - end - else - pcall(function() - if entry.laserSpot and entry.laserSpot.setPoint then entry.laserSpot:setPoint(targetPoint) end - if entry.irSpot and entry.irSpot.setPoint then entry.irSpot:setPoint(targetPoint) end - end) - end - - local smokeCfg = self.Config.JTAC and self.Config.JTAC.Smoke or {} - local smokeAllowed = (entry.smokeEnabledOverride ~= nil) and (entry.smokeEnabledOverride == true) or (entry.smokeEnabledOverride == nil and smokeCfg.Enabled) - if smokeAllowed then - local now = timer.getTime() - if not entry.smokeNext or now >= entry.smokeNext then - local color = entry.smokeColor or smokeCfg.ColorBlue or trigger.smokeColor.White - local pos = targetUnit:getPoint() - local offset = tonumber(smokeCfg.OffsetMeters) or 0 - if offset > 0 then - local ang = math.random() * math.pi * 2 - pos.x = pos.x + math.cos(ang) * offset - pos.z = pos.z + math.sin(ang) * offset - end - pcall(function() - trigger.action.smoke({ x = pos.x, y = pos.y, z = pos.z }, color) - end) - entry.smokeNext = now + (smokeCfg.RefreshSeconds or 300) - end - end -end - -function CTLD:BuildCoalitionMenus(root) - -- Optional: implement coalition-level crate spawns at pickup zones - for key,_ in pairs(self.Config.CrateCatalog) do - MENU_COALITION_COMMAND:New(self.Side, 'Spawn '..key..' at nearest Pickup Zone', root, function() - -- Not group-context; skip here - _msgCoalition(self.Side, 'Group menus recommended for crate requests') - end) - end -end - -function CTLD:InitCoalitionAdminMenu() - if self.AdminMenu then return end - -- Ensure we have a coalition-level CTLD parent menu to nest Admin/Help under - local rootCaption = (self.Config and self.Config.UseGroupMenus) and 'CTLD Admin' or 'CTLD' - self.MenuRoot = self.MenuRoot or MENU_COALITION:New(self.Side, rootCaption) - local root = MENU_COALITION:New(self.Side, 'Admin/Help', self.MenuRoot) - -- Player Help submenu (moved to top of Admin/Help) - local helpMenu = MENU_COALITION:New(self.Side, 'Player Help', root) - -- Removed standalone "Repair - How To" in favor of consolidated SAM Sites help - MENU_COALITION_COMMAND:New(self.Side, 'Zones - Guide', helpMenu, function() - local lines = {} - table.insert(lines, 'CTLD Zones - Guide') - table.insert(lines, '') - table.insert(lines, 'Zone types:') - table.insert(lines, '- Pickup (Supply): Request crates and load troops here. Crate requests require proximity to an ACTIVE pickup zone (default within 10 km).') - table.insert(lines, '- Drop: Mission-defined delivery or rally areas. Some missions may require delivery or deployment at these zones (see briefing).') - table.insert(lines, '- FOB: Forward Operating Base areas. Some recipes (FOB Site) can be built here; if FOB restriction is enabled, FOB-only builds must be inside an FOB zone.') - table.insert(lines, '') - table.insert(lines, 'Colors and map marks:') - table.insert(lines, '- Pickup zone crate spawns are marked with smoke in the configured color. Admin/Help -> Draw CTLD Zones on Map draws zone circles and labels on F10.') - table.insert(lines, '- Use Admin/Help -> Clear CTLD Map Drawings to remove the drawings. Drawings are read-only if configured.') - table.insert(lines, '') - table.insert(lines, 'How to use zones:') - table.insert(lines, '- To request crates: move within the pickup zone distance and use CTLD -> Request Crate.') - table.insert(lines, '- To load troops: must be inside a Pickup zone if troop loading restriction is enabled.') - table.insert(lines, '- Navigation: CTLD -> Coach & Nav -> Vectors to Nearest Pickup Zone gives bearing and range.') - table.insert(lines, '- Activation: Zones can be active/inactive per mission logic; inactive pickup zones block crate requests.') - table.insert(lines, '') - table.insert(lines, string.format('- Build Radius: about %d m to collect nearby crates when building.', self.Config.BuildRadius or 60)) - table.insert(lines, string.format('- Pickup Zone Max Distance: about %d m to request crates (configurable).', self.Config.PickupZoneMaxDistance or 10000)) - _msgCoalition(self.Side, table.concat(lines, '\n'), 40) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Inventory - How It Works', helpMenu, function() - local inv = self.Config.Inventory or {} - local enabled = inv.Enabled ~= false - local showHint = inv.ShowStockInMenu == true - local fobPct = math.floor(((inv.FOBStockFactor or 0.25) * 100) + 0.5) - local lines = {} - table.insert(lines, 'CTLD Inventory - How It Works') - table.insert(lines, '') - table.insert(lines, 'Overview:') - table.insert(lines, '- Inventory is tracked per Supply (Pickup) Zone and per FOB. Requests consume stock at that location.') - table.insert(lines, string.format('- Inventory is %s.', enabled and 'ENABLED' or 'DISABLED')) - table.insert(lines, '') - table.insert(lines, 'Starting stock:') - table.insert(lines, '- Each configured Supply Zone is seeded from the catalog initialStock for every crate type at mission start.') - table.insert(lines, string.format('- When you build a FOB, it creates a small Supply Zone with stock seeded at ~%d%% of initialStock.', fobPct)) - table.insert(lines, '') - table.insert(lines, 'Requesting crates:') - table.insert(lines, '- You must be within range of an ACTIVE Supply Zone to request crates; stock is decremented on spawn.') - table.insert(lines, '- If out of stock for a type at that zone, requests are denied for that type until resupplied (mission logic).') - table.insert(lines, '') - table.insert(lines, 'UI hints:') - table.insert(lines, string.format('- Show stock in menu labels: %s.', showHint and 'ON' or 'OFF')) - table.insert(lines, '- Some missions may include an "In Stock Here" list showing only items available at the nearest zone.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 40) - end) - MENU_COALITION_COMMAND:New(self.Side, 'CTLD Basics (2-minute tour)', helpMenu, function() - local isMetric = true - local lines = {} - table.insert(lines, 'CTLD Basics - 2 minute tour') - table.insert(lines, '') - table.insert(lines, 'Loop: Request -> Deliver -> Build -> Fight') - table.insert(lines, '- Request crates at an ACTIVE Supply Zone (Pickup).') - table.insert(lines, '- Deliver crates to the build point (within Build Radius).') - table.insert(lines, '- Build units or sites with "Build Here" (confirm + cooldown).') - table.insert(lines, '- Optional: set Attack or Defend behavior when building.') - table.insert(lines, '') - table.insert(lines, 'Key concepts:') - table.insert(lines, '- Zones: Pickup (supply), Drop (mission targets), FOB (forward supply).') - table.insert(lines, '- Inventory: stock is tracked per zone; requests consume stock there.') - table.insert(lines, '- FOBs: building one creates a local supply point with seeded stock.') - table.insert(lines, '- Advanced: SAM site repair crates, AI attack orders, EWR/JTAC support.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 35) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Troop Transport & JTAC Use', helpMenu, function() - local lines = {} - table.insert(lines, 'Troop Transport & JTAC Use') - table.insert(lines, '') - table.insert(lines, 'Troops:') - table.insert(lines, '- Load inside an ACTIVE Supply Zone (if mission enforces it).') - table.insert(lines, '- Deploy with Defend (hold) or Attack (advance to targets/bases).') - table.insert(lines, '- Attack uses a search radius and moves at configured speed.') - table.insert(lines, '') - table.insert(lines, 'JTAC:') - table.insert(lines, '- Build JTAC units (MRAP/Tigr or drones) to support target marking.') - table.insert(lines, '- JTAC helps with target designation/SA; details depend on mission setup.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 35) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Crates 101: Requesting and Handling', helpMenu, function() - local lines = {} - table.insert(lines, 'Crates 101 - Requesting and Handling') - table.insert(lines, '') - table.insert(lines, '- Request crates near an ACTIVE Supply Zone; max distance is configurable.') - table.insert(lines, '- Menu labels show the total crates required for a recipe.') - table.insert(lines, '- Drop crates close together but avoid overlap; smoke marks spawns.') - table.insert(lines, '- Use Coach & Nav tools: vectors to nearest pickup zone, re-mark crate with smoke.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 35) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Hover Pickup & Slingloading', helpMenu, function() - local coachCfg = CTLD.HoverCoachConfig or {} - local aglMin = (coachCfg.thresholds and coachCfg.thresholds.aglMin) or 5 - local aglMax = (coachCfg.thresholds and coachCfg.thresholds.aglMax) or 20 - local capGS = (coachCfg.thresholds and coachCfg.thresholds.captureGS) or (4/3.6) - local hold = (coachCfg.thresholds and coachCfg.thresholds.stabilityHold) or 1.8 - local lines = {} - table.insert(lines, 'Hover Pickup & Slingloading') - table.insert(lines, '') - table.insert(lines, string.format('- Hover pickup: hold AGL %d-%d m, speed < %.1f m/s, for ~%.1f s to auto-load.', aglMin, aglMax, capGS, hold)) - table.insert(lines, '- Keep steady within ~15 m of the crate; Hover Coach gives cues if enabled.') - table.insert(lines, '- Slingloading tips: avoid rotor wash over stacks; approach from upwind; re-mark crate with smoke if needed.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 35) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Build System: Build Here and Advanced', helpMenu, function() - local br = self.Config.BuildRadius or 60 - local win = self.Config.BuildConfirmWindowSeconds or 10 - local cd = self.Config.BuildCooldownSeconds or 60 - local lines = {} - table.insert(lines, 'Build System - Build Here and Advanced') - table.insert(lines, '') - table.insert(lines, string.format('- Build Here collects crates within ~%d m. Double-press within %d s to confirm.', br, win)) - table.insert(lines, string.format('- Cooldown: about %d s per group after a successful build.', cd)) - table.insert(lines, '- Advanced Build lets you choose Defend (hold) or Attack (move).') - table.insert(lines, '- Static or unsuitable units will hold even if Attack is chosen.') - table.insert(lines, '- FOB-only recipes must be inside an FOB zone when restriction is enabled.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 40) - end) - MENU_COALITION_COMMAND:New(self.Side, 'FOBs: Forward Supply & Why They Matter', helpMenu, function() - local fobPct = math.floor(((self.Config.Inventory and self.Config.Inventory.FOBStockFactor or 0.25) * 100) + 0.5) - local lines = {} - table.insert(lines, 'FOBs - Forward Supply and Why They Matter') - table.insert(lines, '') - table.insert(lines, '- Build a FOB by assembling its crate recipe (see Recipe Info).') - table.insert(lines, string.format('- A new local Supply Zone is created and seeded at ~%d%% of initial stock.', fobPct)) - table.insert(lines, '- FOBs shorten logistics legs and increase throughput toward the front.') - table.insert(lines, '- If enabled, FOB-only builds must occur inside FOB zones.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 35) - end) - MENU_COALITION_COMMAND:New(self.Side, 'SAM Sites: Building, Repairing, and Augmenting', helpMenu, function() - local br = self.Config.BuildRadius or 60 - local lines = {} - table.insert(lines, 'SAM Sites - Building, Repairing, and Augmenting') - table.insert(lines, '') - table.insert(lines, 'Build:') - table.insert(lines, '- Assemble site recipes using the required component crates (see menu labels). Build Here will place the full site.') - table.insert(lines, '') - table.insert(lines, 'Repair/Augment (merged):') - table.insert(lines, '- Request the matching "Repair/Launcher +1" crate for your site type (HAWK, Patriot, KUB, BUK).') - table.insert(lines, string.format('- Drop repair crate(s) within ~%d m of the site, then use Build Here (confirm window applies).', br)) - table.insert(lines, '- The nearest matching site (within a local search) is respawned fully repaired; +1 launcher per crate, up to caps.') - table.insert(lines, '- Caps: HAWK 6, Patriot 6, KUB 3, BUK 6. Extra crates beyond the cap are not consumed.') - table.insert(lines, '- Must match coalition and site type; otherwise no changes are applied.') - table.insert(lines, '- Respawn is required to apply repairs/augmentation due to DCS limitations.') - table.insert(lines, '') - table.insert(lines, 'Placement tips:') - table.insert(lines, '- Space launchers to avoid masking; keep radars with good line-of-sight; avoid fratricide arcs.') - _msgCoalition(self.Side, table.concat(lines, '\n'), 45) - end) - - -- Debug logging controls - local debugMenu = MENU_COALITION:New(self.Side, 'Debug Logging', root) - MENU_COALITION_COMMAND:New(self.Side, 'Enable Verbose (LogLevel 4)', debugMenu, function() - self.Config.LogLevel = LOG_DEBUG - _logInfo(string.format('[%s] Verbose/Debug logging ENABLED via Admin menu', tostring(self.Side))) - _msgCoalition(self.Side, 'CTLD verbose logging ENABLED (LogLevel=4)', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Normal INFO (LogLevel 2)', debugMenu, function() - self.Config.LogLevel = LOG_INFO - _logInfo(string.format('[%s] Logging set to INFO level via Admin menu', tostring(self.Side))) - _msgCoalition(self.Side, 'CTLD logging set to INFO (LogLevel=2)', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Errors Only (LogLevel 1)', debugMenu, function() - self.Config.LogLevel = LOG_ERROR - _logInfo(string.format('[%s] Logging set to ERROR-only via Admin menu', tostring(self.Side))) - _msgCoalition(self.Side, 'CTLD logging: ERRORS only (LogLevel=1)', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Disable All (LogLevel 0)', debugMenu, function() - self.Config.LogLevel = LOG_NONE - _msgCoalition(self.Side, 'CTLD logging DISABLED (LogLevel=0)', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Show CTLD Status (crates/zones)', root, function() - local crates = 0 - for _ in pairs(CTLD._crates) do crates = crates + 1 end - local msg = string.format('CTLD Status:\nActive crates: %d\nPickup zones: %d\nDrop zones: %d\nFOB zones: %d\nBuild Confirm: %s (%ds window)\nBuild Cooldown: %s (%ds)' - , crates, #(self.PickupZones or {}), #(self.DropZones or {}), #(self.FOBZones or {}) - , self.Config.BuildConfirmEnabled and 'ON' or 'OFF', self.Config.BuildConfirmWindowSeconds or 0 - , self.Config.BuildCooldownEnabled and 'ON' or 'OFF', self.Config.BuildCooldownSeconds or 0) - _msgCoalition(self.Side, msg, 20) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Show Coalition Summary', root, function() - self:ShowCoalitionSummary() - end) - MENU_COALITION_COMMAND:New(self.Side, 'Draw CTLD Zones on Map', root, function() - self:DrawZonesOnMap() - _msgCoalition(self.Side, 'CTLD zones drawn on F10 map.', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Clear CTLD Map Drawings', root, function() - self:ClearMapDrawings() - _msgCoalition(self.Side, 'CTLD map drawings cleared.', 8) - end) - -- Player Help submenu (was below; removed there and added above) - self.AdminMenu = root -end --- #endregion Menus - --- ========================= --- Coalition Summary --- ========================= --- #region Coalition Summary -function CTLD:ShowCoalitionSummary() - -- Crate counts per type (this coalition) - local perType = {} - local total = 0 - for _,meta in pairs(CTLD._crates) do - if meta.side == self.Side then - perType[meta.key] = (perType[meta.key] or 0) + 1 - total = total + 1 - end - end - local lines = {} - table.insert(lines, string.format('CTLD Coalition Summary (%s)', (self.Side==coalition.side.BLUE and 'BLUE') or (self.Side==coalition.side.RED and 'RED') or 'NEUTRAL')) - -- Crate timeout information first (lifetime is in seconds; 0 disables cleanup) - local lifeSec = tonumber(self.Config.CrateLifetime or 0) or 0 - if lifeSec > 0 then - local mins = math.floor((lifeSec + 30) / 60) - table.insert(lines, string.format('Crate Timeout: %d mins (Crates will despawn to prevent clutter)', mins)) - else - table.insert(lines, 'Crate Timeout: Disabled') - end - table.insert(lines, string.format('Active crates: %d', total)) - if next(perType) then - table.insert(lines, 'Crates by type:') - -- stable order: sort keys alphabetically - local keys = {} - for k,_ in pairs(perType) do table.insert(keys, k) end - table.sort(keys) - for _,k in ipairs(keys) do - table.insert(lines, string.format(' %s: %d', k, perType[k])) - end - else - table.insert(lines, 'Crates by type: (none)') - end - - -- Nearby buildable recipes for each active player - table.insert(lines, '\nBuildable near players:') - local players = coalition.getPlayers(self.Side) or {} - if #players == 0 then - table.insert(lines, ' (no active players)') - else - for _,u in ipairs(players) do - local g = u:getGroup() - local gname = g and g:getName() or u:getName() or 'Group' - local pos = u:getPoint() - local here = { x = pos.x, z = pos.z } - local radius = self.Config.BuildRadius or 60 - local nearby = self:GetNearbyCrates(here, radius) - local counts = {} - for _,c in ipairs(nearby) do if c.meta.side == self.Side then counts[c.meta.key] = (counts[c.meta.key] or 0) + 1 end end - -- include carried crates if allowed - if self.Config.BuildRequiresGroundCrates ~= true then - local lc = CTLD._loadedCrates[gname] - if lc and lc.byKey then for k,v in pairs(lc.byKey) do counts[k] = (counts[k] or 0) + v end end - end - local insideFOB, _ = self:IsPointInFOBZones(here) - local buildable = {} - -- composite recipes first - for recipeKey,cat in pairs(self.Config.CrateCatalog) do - if type(cat.requires) == 'table' and cat.build then - if not (cat.isFOB and self.Config.RestrictFOBToZones and not insideFOB) then - local ok = true - for reqKey,qty in pairs(cat.requires) do if (counts[reqKey] or 0) < qty then ok = false; break end end - if ok then table.insert(buildable, cat.description or recipeKey) end - end - end - end - -- single-key - for key,cat in pairs(self.Config.CrateCatalog) do - if cat and cat.build and (not cat.requires) then - if not (cat.isFOB and self.Config.RestrictFOBToZones and not insideFOB) then - if (counts[key] or 0) >= (cat.required or 1) then table.insert(buildable, cat.description or key) end - end - end - end - if #buildable == 0 then - table.insert(lines, string.format(' %s: none', gname)) - else - -- limit to keep message short - local maxShow = 6 - local shown = {} - for i=1, math.min(#buildable, maxShow) do table.insert(shown, buildable[i]) end - local suffix = (#buildable > maxShow) and string.format(' (+%d more)', #buildable - maxShow) or '' - table.insert(lines, string.format(' %s: %s%s', gname, table.concat(shown, ', '), suffix)) - end - end - end - - -- Quick help card - table.insert(lines, '\nQuick Help:') - table.insert(lines, '- Request crates: CTLD → Request Crate (near Pickup Zones).') - table.insert(lines, '- Build: double-press "Build Here" within '..tostring(self.Config.BuildConfirmWindowSeconds or 10)..'s; cooldown '..tostring(self.Config.BuildCooldownSeconds or 60)..'s per group.') - table.insert(lines, '- Hover Coach: CTLD → Coach & Nav → Enable/Disable; vectors to crates/zones available.') - table.insert(lines, '- Manage crates: Drop One/All from CTLD menu; build consumes nearby crates.') - - _msgCoalition(self.Side, table.concat(lines, '\n'), 25) -end --- #endregion Coalition Summary - --- ========================= --- Crates --- ========================= --- #region Crates --- Note: Menu creation lives in the Menus region; this section handles crate request/spawn/nearby/cleanup only. -function CTLD:RequestCrateForGroup(group, crateKey, opts) - opts = opts or {} - local cat = self.Config.CrateCatalog[crateKey] - if not cat then _msgGroup(group, 'Unknown crate type: '..tostring(crateKey)) return end - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local function _distanceToZone(u, z) - if not (u and z and z.GetPointVec3) then return nil end - local up = u:GetPointVec3() - local zp = z:GetPointVec3() - local dx = (up.x - zp.x) - local dz = (up.z - zp.z) - return math.sqrt(dx*dx + dz*dz) - end - - local defaultZone, defaultDist = self:_nearestActivePickupZone(unit) - local zone = opts.zone or defaultZone - local dist = opts.zoneDist or defaultDist - if zone and (not dist) then - dist = _distanceToZone(unit, zone) - end - - local defs = self:_collectActivePickupDefs() - local hasPickupZones = (#defs > 0) - local maxd = (self.Config.PickupZoneMaxDistance or 10000) - - local zoneName = zone and zone:GetName() or (hasPickupZones and 'nearest zone' or 'NO PICKUP ZONES CONFIGURED') - _eventSend(self, group, nil, 'crate_spawn_requested', { type = tostring(crateKey), zone = zoneName }) - - if not hasPickupZones and self.Config.RequirePickupZoneForCrateRequest then - _eventSend(self, group, nil, 'no_pickup_zones', {}) - return - end - - local spawnPoint - if opts.spawnPoint then - spawnPoint = { x = opts.spawnPoint.x, z = opts.spawnPoint.z } - elseif zone and dist and dist <= maxd then - spawnPoint = self:_computeCrateSpawnPoint(zone, { - minSeparation = opts.minSeparationOverride, - additionalEdgeBuffer = opts.additionalEdgeBuffer, - tries = opts.separationTries, - skipSeparationCheck = opts.skipSeparationCheck, - ignoreCrates = opts.ignoreCrates, - }) - else - if self.Config.RequirePickupZoneForCrateRequest then - local isMetric = _getPlayerIsMetric(unit) - local v, u = _fmtRange(math.max(0, (dist or 0) - maxd), isMetric) - local brg = 0 - if zone then - local up = unit:GetPointVec3(); local zp = zone:GetPointVec3() - brg = _bearingDeg({x=up.x,z=up.z}, {x=zp.x,z=zp.z}) - end - _eventSend(self, group, nil, 'pickup_zone_required', { zone_dist = v, zone_dist_u = u, zone_brg = brg }) - return - else - local p = unit:GetPointVec3() - spawnPoint = { x = p.x + 10, z = p.z + 10 } - end - end - - if not spawnPoint and zone and dist and dist <= maxd then - local centerVec = zone:GetPointVec3() - if centerVec then - spawnPoint = { x = centerVec.x, z = centerVec.z } - end - end - - if not spawnPoint then - _msgGroup(group, 'Crate spawn failed: unable to resolve spawn point.') - return - end - - local zoneNameForStock = zone and zone:GetName() or nil - if self.Config.Inventory and self.Config.Inventory.Enabled then - if not zoneNameForStock then - _msgGroup(group, 'Crate requests must be at a Supply Zone for stock control.') - return - end - CTLD._stockByZone[zoneNameForStock] = CTLD._stockByZone[zoneNameForStock] or {} - local cur = tonumber(CTLD._stockByZone[zoneNameForStock][crateKey] or 0) or 0 - if cur <= 0 then - if self:_TryUseSalvageForCrate(group, crateKey, cat) then - _logVerbose(string.format('[Salvage] Used salvage to spawn %s', crateKey)) - else - _msgGroup(group, string.format('Out of stock at %s for %s', zoneNameForStock, self:_friendlyNameForKey(crateKey))) - return - end - else - CTLD._stockByZone[zoneNameForStock][crateKey] = cur - 1 - end - end - - local cname = string.format('CTLD_CRATE_%s_%d', crateKey, math.random(100000,999999)) - _spawnStaticCargo(self.Side, { x = spawnPoint.x, z = spawnPoint.z }, cat.dcsCargoType or 'uh1h_cargo', cname) - CTLD._crates[cname] = { - key = crateKey, - side = self.Side, - spawnTime = timer.getTime(), - point = { x = spawnPoint.x, z = spawnPoint.z }, - requester = group:GetName(), - } - - _addToSpatialGrid(cname, CTLD._crates[cname], 'crate') - - if zone and (opts.suppressSmoke ~= true) then - local zdef = (self._ZoneDefs and self._ZoneDefs.PickupZones) and self._ZoneDefs.PickupZones[zone:GetName()] or nil - local smokeColor = (zdef and zdef.smoke) or self.Config.PickupZoneSmokeColor - if smokeColor then - local sx, sz = spawnPoint.x, spawnPoint.z - local sy = 0 - if land and land.getHeight then - local ok, h = pcall(land.getHeight, { x = sx, y = sz }) - if ok and type(h) == 'number' then sy = h end - end - _spawnCrateSmoke({ x = sx, y = sy, z = sz }, smokeColor, self.Config.CrateSmoke, cname) - end - end - - do - local unitPos = unit:GetPointVec3() - local from = { x = unitPos.x, z = unitPos.z } - local to = { x = spawnPoint.x, z = spawnPoint.z } - local brg = _bearingDeg(from, to) - local isMetric = _getPlayerIsMetric(unit) - local rngMeters = math.sqrt(((to.x-from.x)^2)+((to.z-from.z)^2)) - local rngV, rngU = _fmtRange(rngMeters, isMetric) - local data = { - id = cname, - type = tostring(crateKey), - brg = brg, - rng = rngV, - rng_u = rngU, - } - _eventSend(self, group, nil, 'crate_spawned', data) - end - - return cname, spawnPoint, zone -end - --- Convenience: for composite recipes (def.requires), request all component crates in one go -function CTLD:RequestRecipeBundleForGroup(group, recipeKey) - local def = self.Config.CrateCatalog[recipeKey] - if not def or type(def.requires) ~= 'table' then - -- Fallback to single crate request - return self:RequestCrateForGroup(group, recipeKey) - end - local unit = group and group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - -- Require proximity to an active pickup zone if inventory is enabled or config requires it - local zone, dist = self:_nearestActivePickupZone(unit) - local maxd = (self.Config.PickupZoneMaxDistance or 10000) - if self.Config.RequirePickupZoneForCrateRequest and (not zone or not dist or dist > maxd) then - local isMetric = _getPlayerIsMetric(unit) - local v, u = _fmtRange(math.max(0, (dist or 0) - maxd), isMetric) - local brg = 0 - if zone then - local up = unit:GetPointVec3(); local zp = zone:GetPointVec3() - brg = _bearingDeg({x=up.x,z=up.z}, {x=zp.x,z=zp.z}) - end - _eventSend(self, group, nil, 'pickup_zone_required', { zone_dist = v, zone_dist_u = u, zone_brg = brg }) - return - end - if (self.Config.Inventory and self.Config.Inventory.Enabled) then - if not zone then - _msgGroup(group, 'Crate bundle requests must be at a Supply Zone for stock control.') - return - end - local zname = zone:GetName() - local stockTbl = CTLD._stockByZone[zname] or {} - -- Pre-check: ensure we can fulfill at least one bundle (check stock or salvage) - for reqKey, qty in pairs(def.requires) do - local have = tonumber(stockTbl[reqKey] or 0) or 0 - local need = tonumber(qty or 0) or 0 - if need > 0 and have < need then - -- Try salvage for the shortfall - local catEntry = self.Config.CrateCatalog[reqKey] - if not self:_CanUseSalvageForCrate(reqKey, catEntry, need - have) then - _msgGroup(group, string.format('Out of stock at %s for %s bundle: need %d x %s', zname, self:_friendlyNameForKey(recipeKey), need, self:_friendlyNameForKey(reqKey))) - return - end - end - end - end - -- Flatten bundle components into a deterministic order - local ordered = {} - local totalCount = 0 - local keys = {} - for reqKey,_ in pairs(def.requires) do table.insert(keys, reqKey) end - table.sort(keys, function(a, b) return tostring(a) < tostring(b) end) - for _,reqKey in ipairs(keys) do - local qty = tonumber(def.requires[reqKey] or 0) or 0 - for _ = 1, qty do - table.insert(ordered, reqKey) - totalCount = totalCount + 1 - end - end - - if totalCount == 0 then return end - - if totalCount == 1 then - self:RequestCrateForGroup(group, ordered[1], { zone = zone, zoneDist = dist }) - return - end - - local baseSeparation = math.max(0, self.Config.CrateSpawnMinSeparation or 7) - local spacing = self.Config.CrateClusterSpacing or baseSeparation - if spacing < baseSeparation then spacing = baseSeparation end - if spacing < 4 then spacing = 4 end - - local offsets, perRow, rows = self:_buildClusterOffsets(totalCount, spacing) - local clusterPad = math.max(((perRow - 1) * spacing) * 0.5, ((rows - 1) * spacing) * 0.5) - local anchor = zone and self:_computeCrateSpawnPoint(zone, { additionalEdgeBuffer = clusterPad }) or nil - - if not anchor then - for _,reqKey in ipairs(ordered) do - self:RequestCrateForGroup(group, reqKey, { zone = zone, zoneDist = dist }) - end - return - end - - local orient = math.random() * 2 * math.pi - local cosA = math.cos(orient) - local sinA = math.sin(orient) - local zoneCenterVec, zoneRadius = self:_getZoneCenterAndRadius(zone) - local zoneCenter = zoneCenterVec and { x = zoneCenterVec.x, z = zoneCenterVec.z } or nil - local safeRadius = nil - if zoneRadius then - safeRadius = math.max(0, zoneRadius - (self.Config.PickupZoneSpawnEdgeBuffer or 10)) - end - - local spawnPoints = {} - for idx = 1, totalCount do - local off = offsets[idx] or { x = 0, z = 0 } - local rx = off.x * cosA - off.z * sinA - local rz = off.x * sinA + off.z * cosA - local point = { x = anchor.x + rx, z = anchor.z + rz } - - if zoneCenter and safeRadius and safeRadius > 0 then - local dx = point.x - zoneCenter.x - local dz = point.z - zoneCenter.z - local distFromCenter = math.sqrt(dx * dx + dz * dz) - if distFromCenter > safeRadius and distFromCenter > 0 then - local scale = safeRadius / distFromCenter - point.x = zoneCenter.x + dx * scale - point.z = zoneCenter.z + dz * scale - end - end - - for name, meta in pairs(CTLD._crates) do - if meta.side == self.Side then - local dx = point.x - meta.point.x - local dz = point.z - meta.point.z - local distSq = dx * dx + dz * dz - if distSq < (baseSeparation * baseSeparation) then - local distNow = math.sqrt(distSq) - local desired = baseSeparation + 0.5 - if distNow < 0.1 then - point.x = point.x + desired - else - local push = desired - distNow - point.x = point.x + (dx / distNow) * push - point.z = point.z + (dz / distNow) * push - end - if zoneCenter and safeRadius and safeRadius > 0 then - local ndx = point.x - zoneCenter.x - local ndz = point.z - zoneCenter.z - local ndist = math.sqrt(ndx * ndx + ndz * ndz) - if ndist > safeRadius and ndist > 0 then - local scale = safeRadius / ndist - point.x = zoneCenter.x + ndx * scale - point.z = zoneCenter.z + ndz * scale - end - end - end - end - end - - spawnPoints[idx] = point - end - - local smokePlaced = false - for idx, reqKey in ipairs(ordered) do - local point = spawnPoints[idx] - self:RequestCrateForGroup(group, reqKey, { - zone = zone, - zoneDist = dist, - spawnPoint = point, - suppressSmoke = smokePlaced, - }) - smokePlaced = true - end -end - -function CTLD:GetNearbyCrates(point, radius) - local result = {} - for name,meta in pairs(CTLD._crates) do - local dx = (meta.point.x - point.x) - local dz = (meta.point.z - point.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= radius then - table.insert(result, { name = name, meta = meta }) - end - end - return result -end - -function CTLD:CleanupCrates() - local now = timer.getTime() - local life = self.Config.CrateLifetime - for name,meta in pairs(CTLD._crates) do - if now - (meta.spawnTime or now) > life then - local obj = StaticObject.getByName(name) - if obj then obj:destroy() end - _cleanupCrateSmoke(name) -- Clean up smoke refresh schedule - _removeFromSpatialGrid(name, meta.point, 'crate') -- Remove from spatial index - CTLD._crates[name] = nil - _logDebug('Cleaned up crate '..name) - -- Notify requester group if still around; else coalition - local gname = meta.requester - local group = gname and GROUP:FindByName(gname) or nil - if group and group:IsAlive() then - _eventSend(self, group, nil, 'crate_expired', { id = name }) - else - _eventSend(self, nil, self.Side, 'crate_expired', { id = name }) - end - end - end -end - -function CTLD:CleanupDeployedTroops() - -- Remove any deployed troop groups that are dead or no longer exist - for troopGroupName, troopMeta in pairs(CTLD._deployedTroops) do - if troopMeta.side == self.Side then - local troopGroup = GROUP:FindByName(troopGroupName) - if not troopGroup or not troopGroup:IsAlive() then - CTLD._deployedTroops[troopGroupName] = nil - _logDebug('Cleaned up deployed troop group: '..troopGroupName) - end - end - end -end --- #endregion Crates - --- ========================= --- Build logic --- ========================= --- #region Build logic -function CTLD:BuildAtGroup(group, opts) - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - if self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC trace: entering BuildAtGroup for group=%s', tostring(group:GetName()))) - end - -- Build cooldown/confirmation guardrails - local now = timer.getTime() - local gname = group:GetName() - if self.Config.BuildCooldownEnabled then - local last = CTLD._buildCooldown[gname] - if last and (now - last) < (self.Config.BuildCooldownSeconds or 60) then - local rem = math.max(0, math.ceil((self.Config.BuildCooldownSeconds or 60) - (now - last))) - _msgGroup(group, string.format('Build on cooldown. Try again in %ds.', rem)) - return - end - end - if self.Config.BuildConfirmEnabled then - local first = CTLD._buildConfirm[gname] - local win = self.Config.BuildConfirmWindowSeconds or 10 - if not first or (now - first) > win then - CTLD._buildConfirm[gname] = now - _msgGroup(group, string.format('Confirm build: select "Build Here" again within %ds to proceed.', win)) - return - else - -- within window; proceed and clear pending - CTLD._buildConfirm[gname] = nil - end - end - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - -- Compute a safe spawn point offset forward from the aircraft to prevent rotor/ground collisions with spawned units - local hdgRad, hdgDeg = _headingRadDeg(unit) - local buildOffset = math.max(0, tonumber(self.Config.BuildSpawnOffset or 0) or 0) - local spawnAt = (buildOffset > 0) and { x = here.x + math.sin(hdgRad) * buildOffset, z = here.z + math.cos(hdgRad) * buildOffset } or { x = here.x, z = here.z } - local radius = self.Config.BuildRadius - local nearby = self:GetNearbyCrates(here, radius) - -- filter crates to coalition side for this CTLD instance - local filtered = {} - for _,c in ipairs(nearby) do - if c.meta.side == self.Side then table.insert(filtered, c) end - end - nearby = filtered - if #nearby == 0 then - _eventSend(self, group, nil, 'build_insufficient_crates', { build = 'asset' }) - -- Nudge players to use Recipe Info - _msgGroup(group, 'Tip: Use CTLD → Recipe Info to see exact crate requirements for each build.') - return - end - - -- Count by key - local counts = {} - for _,c in ipairs(nearby) do - counts[c.meta.key] = (counts[c.meta.key] or 0) + 1 - end - - -- Include loaded crates carried by this group - local carried = CTLD._loadedCrates[gname] - if self.Config.BuildRequiresGroundCrates ~= true then - if carried and carried.byKey then - for k,v in pairs(carried.byKey) do - counts[k] = (counts[k] or 0) + v - end - end - end - - -- Helper to consume crates of a given key/qty - local function consumeCrates(key, qty) - local removed = 0 - -- Optionally consume from carried crates - if self.Config.BuildRequiresGroundCrates ~= true then - if carried and carried.byKey and (carried.byKey[key] or 0) > 0 then - local take = math.min(qty, carried.byKey[key]) - carried.byKey[key] = carried.byKey[key] - take - if carried.byKey[key] <= 0 then carried.byKey[key] = nil end - carried.total = math.max(0, (carried.total or 0) - take) - removed = removed + take - if take > 0 then ctld:_scheduleLoadedCrateMenuRefresh(group) end - end - end - for _,c in ipairs(nearby) do - if removed >= qty then break end - if c.meta.key == key then - local obj = StaticObject.getByName(c.name) - if obj then obj:destroy() end - _cleanupCrateSmoke(c.name) -- Clean up smoke refresh schedule - CTLD._crates[c.name] = nil - removed = removed + 1 - end - end - end - - local insideFOBZone, fz = self:IsPointInFOBZones(here) - local fobBlocked = false - -- Try composite recipes first (requires is a map of key->qty) - for recipeKey,cat in pairs(self.Config.CrateCatalog) do - if type(cat.requires) == 'table' and cat.build then - if cat.isFOB and self.Config.RestrictFOBToZones and not insideFOBZone then - fobBlocked = true - else - -- Build caps disabled: rely solely on inventory/catalog control - local ok = true - for reqKey,qty in pairs(cat.requires) do - if (counts[reqKey] or 0) < qty then ok = false; break end - end - if ok then - local gdata = cat.build({ x = spawnAt.x, z = spawnAt.z }, hdgDeg, cat.side or self.Side) - _eventSend(self, group, nil, 'build_started', { build = cat.description or recipeKey }) - local g = _coalitionAddGroup(cat.side or self.Side, cat.category or Group.Category.GROUND, gdata, self.Config) - if g then - if self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC trace: composite build spawned group=%s recipe=%s', tostring(g:getName()), tostring(recipeKey))) - end - -- Register JTAC if applicable (composite recipe) - self:_maybeRegisterJTAC(recipeKey, cat, g) - for reqKey,qty in pairs(cat.requires) do consumeCrates(reqKey, qty) end - -- No site cap counters when caps are disabled - _eventSend(self, nil, self.Side, 'build_success_coalition', { build = cat.description or recipeKey, player = _playerNameFromGroup(group) }) - -- If this was a FOB, register a new pickup zone with reduced stock - if cat.isFOB then - pcall(function() - self:_CreateFOBPickupZone({ x = spawnAt.x, z = spawnAt.z }, cat, hdg) - end) - end - -- Assign optional behavior for built vehicles/groups - local behavior = opts and opts.behavior or nil - if behavior == 'attack' and self.Config.AttackAI and self.Config.AttackAI.Enabled then - local t = self:_assignAttackBehavior(g:getName(), spawnAt, true) - local isMetric = _getPlayerIsMetric(group:GetUnit(1)) - if t and t.kind == 'base' then - local brg = _bearingDeg({ x = spawnAt.x, z = spawnAt.z }, { x = t.point.x, z = t.point.z }) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_base_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), base_name = t.name, brg = brg, rng = v, rng_u = u }) - elseif t and t.kind == 'enemy' then - local brg = _bearingDeg({ x = spawnAt.x, z = spawnAt.z }, { x = t.point.x, z = t.point.z }) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_enemy_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), enemy_type = t.etype or 'unit', brg = brg, rng = v, rng_u = u }) - else - local v, u = _fmtRange((self.Config.AttackAI and self.Config.AttackAI.VehicleSearchRadius) or 5000, isMetric) - _eventSend(self, nil, self.Side, 'attack_no_targets', { unit_name = g:getName(), player = _playerNameFromGroup(group), rng = v, rng_u = u }) - end - end - if self.Config.BuildCooldownEnabled then CTLD._buildCooldown[gname] = now end - return - else - _eventSend(self, group, nil, 'build_failed', { reason = 'DCS group spawn error' }) - return - end - end - -- continue_composite (Lua 5.1 compatible: no labels) - end - end - end - - -- Then single-key recipes - for key,count in pairs(counts) do - local cat = self.Config.CrateCatalog[key] - if cat and cat.build and (not cat.requires) and count >= (cat.required or 1) then - if cat.isFOB and self.Config.RestrictFOBToZones and not insideFOBZone then - fobBlocked = true - else - -- Build caps disabled: rely solely on inventory/catalog control - local gdata = cat.build({ x = spawnAt.x, z = spawnAt.z }, hdgDeg, cat.side or self.Side) - _eventSend(self, group, nil, 'build_started', { build = cat.description or key }) - local g = _coalitionAddGroup(cat.side or self.Side, cat.category or Group.Category.GROUND, gdata, self.Config) - if g then - if self.Config.JTAC and self.Config.JTAC.Verbose then - _logInfo(string.format('JTAC trace: single build spawned group=%s key=%s', tostring(g:getName()), tostring(key))) - end - -- Register JTAC if applicable (single-unit recipe) - self:_maybeRegisterJTAC(key, cat, g) - consumeCrates(key, cat.required or 1) - -- No single-unit cap counters when caps are disabled - _eventSend(self, nil, self.Side, 'build_success_coalition', { build = cat.description or key, player = _playerNameFromGroup(group) }) - -- Assign optional behavior for built vehicles/groups - local behavior = opts and opts.behavior or nil - if behavior == 'attack' and self.Config.AttackAI and self.Config.AttackAI.Enabled then - local t = self:_assignAttackBehavior(g:getName(), spawnAt, true) - local isMetric = _getPlayerIsMetric(group:GetUnit(1)) - if t and t.kind == 'base' then - local brg = _bearingDeg({ x = spawnAt.x, z = spawnAt.z }, { x = t.point.x, z = t.point.z }) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_base_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), base_name = t.name, brg = brg, rng = v, rng_u = u }) - elseif t and t.kind == 'enemy' then - local brg = _bearingDeg({ x = spawnAt.x, z = spawnAt.z }, { x = t.point.x, z = t.point.z }) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_enemy_announce', { unit_name = g:getName(), player = _playerNameFromGroup(group), enemy_type = t.etype or 'unit', brg = brg, rng = v, rng_u = u }) - else - local v, u = _fmtRange((self.Config.AttackAI and self.Config.AttackAI.VehicleSearchRadius) or 5000, isMetric) - _eventSend(self, nil, self.Side, 'attack_no_targets', { unit_name = g:getName(), player = _playerNameFromGroup(group), rng = v, rng_u = u }) - end - end - if self.Config.BuildCooldownEnabled then CTLD._buildCooldown[gname] = now end - return - else - _eventSend(self, group, nil, 'build_failed', { reason = 'DCS group spawn error' }) - return - end - end - end - -- continue_single (Lua 5.1 compatible: no labels) - end - - if fobBlocked then - _eventSend(self, group, nil, 'fob_restricted', {}) - return - end - - -- Helpful hint if building requires ground crates and player is carrying crates - if self.Config.BuildRequiresGroundCrates == true then - local carried = CTLD._loadedCrates[gname] - if carried and (carried.total or 0) > 0 then - _eventSend(self, group, nil, 'build_requires_ground', { total = carried.total }) - return - end - end - _eventSend(self, group, nil, 'build_insufficient_crates', { build = 'asset' }) - -- Provide a short breakdown of most likely recipes and what is missing - local suggestions = {} - local function pushSuggestion(name, missingStr, haveParts, totalParts) - table.insert(suggestions, { name = name, miss = missingStr, have = haveParts, total = totalParts }) - end - -- consider composite recipes with at least one matching component nearby - for rkey,cat in pairs(self.Config.CrateCatalog) do - if type(cat.requires) == 'table' then - local have, total, missingList = 0, 0, {} - for reqKey,qty in pairs(cat.requires) do - total = total + (qty or 0) - local haveHere = math.min(qty or 0, counts[reqKey] or 0) - have = have + haveHere - local need = math.max(0, (qty or 0) - (counts[reqKey] or 0)) - if need > 0 then - local fname = self:_friendlyNameForKey(reqKey) - table.insert(missingList, string.format('%dx %s', need, fname)) - end - end - if have > 0 and have < total then - local name = cat.description or cat.menu or rkey - pushSuggestion(name, table.concat(missingList, ', '), have, total) - end - else - -- single-key recipe: if some crates present but not enough - local need = (cat and (cat.required or 1)) or 1 - local have = counts[rkey] or 0 - if have > 0 and have < need then - local name = cat.description or cat.menu or rkey - pushSuggestion(name, string.format('%d more crate(s) of %s', need - have, self:_friendlyNameForKey(rkey)), have, need) - end - end - end - table.sort(suggestions, function(a,b) - local ra = (a.total > 0) and (a.have / a.total) or 0 - local rb = (b.total > 0) and (b.have / b.total) or 0 - if ra == rb then return (a.total - a.have) < (b.total - b.have) end - return ra > rb - end) - if #suggestions > 0 then - local maxShow = math.min(2, #suggestions) - for i=1,maxShow do - local s = suggestions[i] - _msgGroup(group, string.format('Missing for %s: %s', s.name, s.miss)) - end - else - _msgGroup(group, 'No matching recipe found with nearby crates. Check Recipe Info for requirements.') - end -end --- #endregion Build logic - --- ========================= --- Loaded crate management --- ========================= --- #region Loaded crate management - --- Update DCS internal cargo weight for a group -function CTLD:_updateCargoWeight(group) - _updateCargoWeight(group) -end - -function CTLD:_addLoadedCrate(group, crateKey) - local gname = group:GetName() - CTLD._loadedCrates[gname] = CTLD._loadedCrates[gname] or { total = 0, totalWeightKg = 0, byKey = {} } - local lc = CTLD._loadedCrates[gname] - lc.total = lc.total + 1 - lc.byKey[crateKey] = (lc.byKey[crateKey] or 0) + 1 - - -- Add weight from catalog - local cat = self.Config.CrateCatalog[crateKey] - local crateWeight = (cat and cat.weightKg) or 0 - lc.totalWeightKg = (lc.totalWeightKg or 0) + crateWeight - - -- Update DCS internal cargo weight - self:_updateCargoWeight(group) - - -- Refresh drop-by-type menu after loading - self:_scheduleLoadedCrateMenuRefresh(group) -end - -function CTLD:_clearLoadedCrateMenuCommands(gname) - self._loadedCrateMenus = self._loadedCrateMenus or {} - local state = self._loadedCrateMenus[gname] - if not state or not state.commands then return end - for _,cmd in ipairs(state.commands) do - if cmd and cmd.Remove then - pcall(function() cmd:Remove() end) - end - end - state.commands = {} -end - -function CTLD:_BuildOrRefreshLoadedCrateMenu(group, parentMenu) - if not group then return end - self._loadedCrateMenus = self._loadedCrateMenus or {} - local gname = group:GetName() - local state = self._loadedCrateMenus[gname] or { commands = {} } - state.parent = parentMenu - state.groupName = gname - self._loadedCrateMenus[gname] = state - - self:_clearLoadedCrateMenuCommands(gname) - - local carried = CTLD._loadedCrates[gname] - local byKey = (carried and carried.byKey) or {} - local keys = {} - for key,count in pairs(byKey) do - if count and count > 0 then table.insert(keys, key) end - end - - local ctld = self - if #keys == 0 then - local cmd = MENU_GROUP_COMMAND:New(group, 'No crates onboard', parentMenu, function() - _msgGroup(group, 'No crates loaded to drop individually.') - end) - table.insert(state.commands, cmd) - return - end - - table.sort(keys, function(a, b) - local fa = ctld:_friendlyNameForKey(a) or a - local fb = ctld:_friendlyNameForKey(b) or b - if fa == fb then return a < b end - return fa < fb - end) - - for _,key in ipairs(keys) do - local count = byKey[key] or 0 - local friendly = ctld:_friendlyNameForKey(key) or key - local title = string.format('Drop %s (%d)', friendly, count) - local cmd = MENU_GROUP_COMMAND:New(group, title, parentMenu, function() - ctld:DropLoadedCrates(group, 1, key) - end) - table.insert(state.commands, cmd) - end -end - -function CTLD:_scheduleLoadedCrateMenuRefresh(group) - if not group then return end - self._loadedCrateMenus = self._loadedCrateMenus or {} - local gname = group:GetName() - local state = self._loadedCrateMenus[gname] - if not state or not state.parent then return end - local ctld = self - local id = timer.scheduleFunction(function() - local g = GROUP:FindByName(gname) - if not g then return end - ctld:_BuildOrRefreshLoadedCrateMenu(g, state.parent) - return - end, {}, timer.getTime() + 0.1) - _trackOneShotTimer(id) -end - -function CTLD:DropLoadedCrates(group, howMany, crateKey) - local gname = group:GetName() - local lc = CTLD._loadedCrates[gname] - if not lc or (lc.total or 0) == 0 then _eventSend(self, group, nil, 'no_loaded_crates', {}) return end - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - -- Restrict dropping crates inside Pickup Zones if configured - if self.Config.ForbidDropsInsidePickupZones then - local activeOnly = (self.Config.ForbidChecksActivePickupOnly ~= false) - local inside = false - local ok, err = pcall(function() - inside = select(1, self:_isUnitInsidePickupZone(unit, activeOnly)) - end) - if ok and inside then - _eventSend(self, group, nil, 'drop_forbidden_in_pickup', {}) - return - end - end - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - -- Offset drop point forward of the aircraft to avoid rotor/airframe damage - local hdgRad, _ = _headingRadDeg(unit) - local fwd = math.max(0, tonumber(self.Config.DropCrateForwardOffset or 20) or 0) - local dropPt = (fwd > 0) and { x = here.x + math.sin(hdgRad) * fwd, z = here.z + math.cos(hdgRad) * fwd } or { x = here.x, z = here.z } - local initialTotal = lc.total or 0 - local requested = (howMany and howMany > 0) and howMany or initialTotal - - local dropPlan = {} - if crateKey then - local available = lc.byKey[crateKey] or 0 - if available <= 0 then - local friendly = self:_friendlyNameForKey(crateKey) or crateKey - _msgGroup(group, string.format('No %s crates loaded.', friendly)) - return - end - local qty = math.min(requested, available) - table.insert(dropPlan, { key = crateKey, count = qty }) - else - local keys = {} - for key,_ in pairs(lc.byKey) do table.insert(keys, key) end - table.sort(keys, function(a, b) - local fa = self:_friendlyNameForKey(a) or a - local fb = self:_friendlyNameForKey(b) or b - if fa == fb then return a < b end - return fa < fb - end) - local remaining = math.min(requested, initialTotal) - for _,key in ipairs(keys) do - if remaining <= 0 then break end - local available = lc.byKey[key] or 0 - if available > 0 then - local qty = math.min(available, remaining) - table.insert(dropPlan, { key = key, count = qty }) - remaining = remaining - qty - end - end - end - - local totalToDrop = 0 - for _,entry in ipairs(dropPlan) do totalToDrop = totalToDrop + (entry.count or 0) end - if totalToDrop <= 0 then - _msgGroup(group, 'No valid crates selected to drop.') - return - end - - _eventSend(self, group, nil, 'drop_initiated', { count = totalToDrop, key = crateKey }) - -- Warn about crate timeout when dropping - local lifeSec = tonumber(self.Config.CrateLifetime or 0) or 0 - if lifeSec > 0 then - local mins = math.floor((lifeSec + 30) / 60) - _msgGroup(group, string.format('Note: Crates will despawn after %d mins to prevent clutter.', mins)) - end - -- Drop following the prepared plan - for _,entry in ipairs(dropPlan) do - local k = entry.key - local dropNow = entry.count or 0 - if dropNow > 0 then - local cat = self.Config.CrateCatalog[k] - local crateWeight = (cat and cat.weightKg) or 0 - for i=1,dropNow do - local cname = string.format('CTLD_CRATE_%s_%d', k, math.random(100000,999999)) - _spawnStaticCargo(self.Side, dropPt, (cat and cat.dcsCargoType) or 'uh1h_cargo', cname) - CTLD._crates[cname] = { key = k, side = self.Side, spawnTime = timer.getTime(), point = { x = dropPt.x, z = dropPt.z } } - -- Add to spatial index - _addToSpatialGrid(cname, CTLD._crates[cname], 'crate') - lc.byKey[k] = lc.byKey[k] - 1 - if lc.byKey[k] <= 0 then lc.byKey[k] = nil end - lc.total = lc.total - 1 - lc.totalWeightKg = (lc.totalWeightKg or 0) - crateWeight - end - end - end - local actualDropped = initialTotal - (lc.total or 0) - _eventSend(self, group, nil, 'dropped_crates', { count = actualDropped, key = crateKey }) - - -- Update DCS internal cargo weight after dropping - self:_updateCargoWeight(group) - - -- Refresh drop-by-type menu after dropping - self:_scheduleLoadedCrateMenuRefresh(group) - - -- Reiterate timeout after drop completes (players may miss the initial warning) - if lifeSec > 0 then - local mins = math.floor((lifeSec + 30) / 60) - _msgGroup(group, string.format('Reminder: Dropped crates will despawn after %d mins to prevent clutter.', mins)) - end -end - --- Show inventory at the nearest pickup zone/FOB -function CTLD:ShowNearestZoneInventory(group) - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - -- Find nearest active pickup zone - local zone, dist = self:_nearestActivePickupZone(unit) - - if not zone then - _msgGroup(group, 'No active pickup zones found nearby. Move closer to a supply zone.') - return - end - - local zoneName = zone:GetName() - local isMetric = _getPlayerIsMetric(unit) - local rngV, rngU = _fmtRange(dist, isMetric) - - -- Get inventory for this zone - local stockTbl = CTLD._stockByZone[zoneName] or {} - - -- Build the inventory display - local lines = {} - table.insert(lines, string.format('Inventory at %s', zoneName)) - table.insert(lines, string.format('Distance: %.1f %s', rngV, rngU)) - table.insert(lines, '') - - -- Check if inventory system is enabled - local invEnabled = self.Config.Inventory and self.Config.Inventory.Enabled ~= false - if not invEnabled then - table.insert(lines, 'Inventory tracking is disabled - all items available.') - _msgGroup(group, table.concat(lines, '\n'), 20) - return - end - - -- Count total items and organize by category - local totalItems = 0 - local byCategory = {} - - for key, count in pairs(stockTbl) do - if count > 0 then - local def = self.Config.CrateCatalog[key] - if def and ((not def.side) or def.side == self.Side) then - local cat = (def.menuCategory or 'Other') - byCategory[cat] = byCategory[cat] or {} - table.insert(byCategory[cat], { - key = key, - name = def.menu or def.description or key, - count = count, - isRecipe = (type(def.requires) == 'table') - }) - totalItems = totalItems + count - end - end - end - - if totalItems == 0 then - table.insert(lines, 'No items in stock at this location.') - table.insert(lines, 'Request resupply or move to another zone.') - else - table.insert(lines, string.format('Total items in stock: %d', totalItems)) - table.insert(lines, '') - - -- Sort categories for consistent display - local categories = {} - for cat, _ in pairs(byCategory) do - table.insert(categories, cat) - end - table.sort(categories) - - -- Display items by category - for _, cat in ipairs(categories) do - table.insert(lines, string.format('-- %s --', cat)) - local items = byCategory[cat] - -- Sort items by name - table.sort(items, function(a, b) return a.name < b.name end) - for _, item in ipairs(items) do - if item.isRecipe then - -- For recipes, calculate available bundles - local def = self.Config.CrateCatalog[item.key] - local bundles = math.huge - if def and def.requires then - for reqKey, qty in pairs(def.requires) do - local have = tonumber(stockTbl[reqKey] or 0) or 0 - local need = tonumber(qty or 0) or 0 - if need > 0 then - bundles = math.min(bundles, math.floor(have / need)) - end - end - end - if bundles == math.huge then bundles = 0 end - table.insert(lines, string.format(' %s: %d bundle%s', item.name, bundles, (bundles == 1 and '' or 's'))) - else - table.insert(lines, string.format(' %s: %d', item.name, item.count)) - end - end - table.insert(lines, '') - end - end - - -- Display the inventory - _msgGroup(group, table.concat(lines, '\n'), 30) -end - --- #endregion Loaded crate management - --- ========================= --- Hover pickup scanner --- ========================= --- #region Hover pickup scanner -function CTLD:ScanHoverPickup() - local coachCfg = CTLD.HoverCoachConfig or { enabled = false } - if not coachCfg.enabled then return end - - -- iterate all groups that have menus (active transports) - for gname,_ in pairs(self.MenusByGroup or {}) do - local group = GROUP:FindByName(gname) - if group and group:IsAlive() then - local unit = group:GetUnit(1) - if unit and unit:IsAlive() then - -- Allowed type check - local typ = _getUnitType(unit) - if _isIn(self.Config.AllowedAircraft, typ) then - local uname = unit:GetName() - local now = timer.getTime() - local p3 = unit:GetPointVec3() - local ground = land and land.getHeight and land.getHeight({ x = p3.x, y = p3.z }) or 0 - local agl = math.max(0, p3.y - ground) - - -- Skip hover coaching if on the ground (let ground auto-load handle it) - local groundCfg = CTLD.GroundAutoLoadConfig or {} - local groundContactAGL = groundCfg.GroundContactAGL or 3.5 - if agl <= groundContactAGL then - -- On ground, clear hover state and skip hover logic - CTLD._hoverState[uname] = nil - -- Also, when firmly landed, suppress any completed ground-load state - -- so returning to this spot without crates won't keep retriggering. - if CTLD._groundLoadState and CTLD._groundLoadState[uname] and CTLD._groundLoadState[uname].completed then - CTLD._groundLoadState[uname] = nil - end - else - -- speeds (ground/vertical) - local last = CTLD._unitLast[uname] - local gs, vs = 0, 0 - if last and (now > (last.t or 0)) then - local dt = now - last.t - if dt > 0 then - local dx = (p3.x - last.x) - local dz = (p3.z - last.z) - gs = math.sqrt(dx*dx + dz*dz) / dt - if last.agl then vs = (agl - last.agl) / dt end - end - end - CTLD._unitLast[uname] = { x = p3.x, z = p3.z, t = now, agl = agl } - - -- Use spatial indexing to find nearby crates/troops efficiently - local maxd = coachCfg.autoPickupDistance or 25 - local nearby = _getNearbyFromSpatialGrid(p3.x, p3.z, maxd) - - local friendlyCrateCount = 0 - local friendlyTroopCount = 0 - local bestName, bestMeta, bestd - local bestType = 'crate' - - -- Search nearby crates from spatial grid - for name, meta in pairs(nearby.crates or {}) do - if meta.side == self.Side then - friendlyCrateCount = friendlyCrateCount + 1 - local dx = (meta.point.x - p3.x) - local dz = (meta.point.z - p3.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= maxd and ((not bestd) or d < bestd) then - bestName, bestMeta, bestd = name, meta, d - bestType = 'crate' - end - end - end - - -- Search nearby deployed troops from spatial grid - for troopGroupName, troopMeta in pairs(nearby.troops or {}) do - if troopMeta.side == self.Side then - friendlyTroopCount = friendlyTroopCount + 1 - local troopGroup = GROUP:FindByName(troopGroupName) - if troopGroup and troopGroup:IsAlive() then - local troopPos = troopGroup:GetCoordinate() - if troopPos then - local tp = troopPos:GetVec3() - local dx = (tp.x - p3.x) - local dz = (tp.z - p3.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= maxd and ((not bestd) or d < bestd) then - bestName, bestMeta, bestd = troopGroupName, troopMeta, d - bestType = 'troops' - end - end - else - -- Group doesn't exist or is dead, remove from tracking - _removeFromSpatialGrid(troopGroupName, troopMeta.point, 'troops') - CTLD._deployedTroops[troopGroupName] = nil - end - end - end - - if CTLD.Config and CTLD.Config.DebugHoverCrates and (friendlyCrateCount > 0 or friendlyTroopCount > 0) then - local debugLabel = bestName or 'none' - local debugType = bestType - local debugDist = bestd - if not bestName and friendlyCrateCount > 0 then - debugLabel = 'pending' - debugType = 'crate' - debugDist = math.huge - end - _debugCrateSight('HoverDebug', { - unit = uname, - now = now, - interval = CTLD.Config.DebugHoverCratesInterval, - step = CTLD.Config.DebugHoverCratesStep, - name = debugLabel, - distance = debugDist, - count = friendlyCrateCount, - troops = friendlyTroopCount, - radius = maxd, - typeHint = debugType, - note = string.format('coachGS<=%.1f', coachCfg.thresholds.captureGS or (4/3.6)), - }) - end - - local coachEnabled = coachCfg.enabled - if CTLD._coachOverride and CTLD._coachOverride[gname] ~= nil then - coachEnabled = CTLD._coachOverride[gname] - end - - -- If coach is on, provide phased guidance - if coachEnabled and bestName and bestMeta then - local thresholds = coachCfg.thresholds or {} - local isMetric = _getPlayerIsMetric(unit) - - -- Arrival phase - if bestd <= (thresholds.arrivalDist or 1000) then - _coachSend(self, group, uname, 'coach_arrival', {}, false) - end - - -- Close-in guidance - if bestd <= (thresholds.closeDist or 100) then - _coachSend(self, group, uname, 'coach_close', {}, false) - end - - -- Precision phase - if bestd <= (thresholds.precisionDist or 30) then - local hdg, _ = _headingRadDeg(unit) - local dx = (bestMeta.point.x - p3.x) - local dz = (bestMeta.point.z - p3.z) - local right, fwd = _projectToBodyFrame(dx, dz, hdg) - - -- Horizontal hint formatting - local function hintDir(val, posWord, negWord, toUnits) - local mag = math.abs(val) - local v, u = _fmtDistance(mag, isMetric) - if mag < 0.5 then return nil end - return string.format("%s %d %s", (val >= 0 and posWord or negWord), v, u) - end - local h = {} - local rHint = hintDir(right, 'Right', 'Left') - local fHint = hintDir(fwd, 'Forward', 'Back') - if rHint then table.insert(h, rHint) end - if fHint then table.insert(h, fHint) end - - -- Vertical hint against AGL window - local vHint - local aglMin = thresholds.aglMin or 5 - local aglMax = thresholds.aglMax or 20 - if agl < aglMin then - local dv, du = _fmtAGL(aglMin - agl, isMetric) - vHint = string.format("Up %d %s", dv, du) - elseif agl > aglMax then - local dv, du = _fmtAGL(agl - aglMax, isMetric) - vHint = string.format("Down %d %s", dv, du) - end - if vHint then table.insert(h, vHint) end - - local hints = table.concat(h, ", ") - local gsV, gsU = _fmtSpeed(gs, isMetric) - local data = { hints = (hints ~= '' and (hints..'.') or ''), gs = gsV, gs_u = gsU } - - _coachSend(self, group, uname, 'coach_hint', data, true) - - -- Error prompts (dominant one) - local maxGS = thresholds.maxGS or (8/3.6) - local aglMinT = aglMin - local aglMaxT = aglMax - if gs > maxGS then - local v, u = _fmtSpeed(gs, isMetric) - _coachSend(self, group, uname, 'coach_too_fast', { gs = v, gs_u = u }, false) - elseif agl > aglMaxT then - local v, u = _fmtAGL(agl, isMetric) - _coachSend(self, group, uname, 'coach_too_high', { agl = v, agl_u = u }, false) - elseif agl < aglMinT then - local v, u = _fmtAGL(agl, isMetric) - _coachSend(self, group, uname, 'coach_too_low', { agl = v, agl_u = u }, false) - end - end - end - - -- Auto-load logic using capture thresholds - local capGS = coachCfg.thresholds.captureGS or (4/3.6) - local aglMin = coachCfg.thresholds.aglMin or 5 - local aglMax = coachCfg.thresholds.aglMax or 20 - local speedOK = gs <= capGS - local heightOK = (agl >= aglMin and agl <= aglMax) - - if bestName and bestMeta and speedOK and heightOK then - local withinRadius = bestd <= (coachCfg.thresholds.captureHoriz or 2) - - if withinRadius then - local carried = CTLD._loadedCrates[gname] - local total = carried and carried.total or 0 - local currentWeight = carried and carried.totalWeightKg or 0 - - -- Get aircraft-specific capacity instead of global setting - local capacity = _getAircraftCapacity(unit) - local maxCrates = capacity.maxCrates - local maxTroops = capacity.maxTroops - local maxWeight = capacity.maxWeightKg or 0 - - -- Calculate weight and check capacity based on type - local itemWeight = 0 - local countOK = false - local weightOK = false - - if bestType == 'crate' then - -- Picking up a crate - itemWeight = (bestMeta and self.Config.CrateCatalog[bestMeta.key] and self.Config.CrateCatalog[bestMeta.key].weightKg) or 0 - local wouldBeWeight = currentWeight + itemWeight - countOK = (total < maxCrates) - weightOK = (maxWeight <= 0) or (wouldBeWeight <= maxWeight) - elseif bestType == 'troops' then - -- Picking up troops - check if we can ADD them to existing load - itemWeight = bestMeta.weightKg or 0 - local wouldBeWeight = currentWeight + itemWeight - local troopCount = bestMeta.count or 0 - - -- Check if we already have troops loaded - if so, check if we can add more - local currentTroops = CTLD._troopsLoaded[gname] - local currentTroopCount = currentTroops and currentTroops.count or 0 - local totalTroopCount = currentTroopCount + troopCount - - -- Check total capacity (allow mixing different troop types) - countOK = (totalTroopCount <= maxTroops) - weightOK = (maxWeight <= 0) or (wouldBeWeight <= maxWeight) - - -- Provide feedback if capacity exceeded - if not countOK then - local hs = CTLD._hoverState[uname] - if not hs or hs.messageShown ~= true then - _msgGroup(group, string.format('Troop capacity exceeded! Current: %d, Adding: %d, Max: %d', - currentTroopCount, troopCount, maxTroops)) - if not hs then - CTLD._hoverState[uname] = { messageShown = true } - else - hs.messageShown = true - end - end - end - end - - -- Check both count AND weight limits - if countOK and weightOK then - local hs = CTLD._hoverState[uname] - if not hs or hs.targetCrate ~= bestName or hs.targetType ~= bestType then - CTLD._hoverState[uname] = { targetCrate = bestName, targetType = bestType, startTime = now } - if coachEnabled then _coachSend(self, group, uname, 'coach_hold', {}, false) end - else - -- stability hold timer - local holdNeeded = coachCfg.thresholds.stabilityHold or 1.8 - if (now - hs.startTime) >= holdNeeded then - -- load it - if bestType == 'crate' then - -- Use shared loading function - local success = self:_loadCrateIntoAircraft(group, bestName, bestMeta) - if success then - if coachEnabled then - _coachSend(self, group, uname, 'coach_loaded', {}, false) - else - _msgGroup(group, string.format('Loaded %s crate', tostring(bestMeta.key))) - end - end - elseif bestType == 'troops' then - -- Pick up the troop group - local troopGroup = GROUP:FindByName(bestName) - if troopGroup then - troopGroup:Destroy() - end - _removeFromSpatialGrid(bestName, bestMeta.point, 'troops') -- Remove from spatial index - CTLD._deployedTroops[bestName] = nil - - -- ADD to existing troops if any, don't overwrite - local currentTroops = CTLD._troopsLoaded[gname] - if currentTroops then - -- Add to existing load (supports mixing types) - local troopTypes = currentTroops.troopTypes or { { typeKey = currentTroops.typeKey, count = currentTroops.count } } - table.insert(troopTypes, { typeKey = bestMeta.typeKey, count = bestMeta.count }) - - CTLD._troopsLoaded[gname] = { - count = currentTroops.count + bestMeta.count, - typeKey = 'Mixed', -- Indicate mixed types - troopTypes = troopTypes, -- Store individual type details - weightKg = currentTroops.weightKg + bestMeta.weightKg - } - self:_refreshLoadedTroopSummaryForGroup(gname) - _msgGroup(group, string.format('Loaded %d more troops (total: %d)', bestMeta.count, CTLD._troopsLoaded[gname].count)) - else - -- First load - CTLD._troopsLoaded[gname] = { - count = bestMeta.count, - typeKey = bestMeta.typeKey, - troopTypes = { { typeKey = bestMeta.typeKey, count = bestMeta.count } }, - weightKg = bestMeta.weightKg - } - self:_refreshLoadedTroopSummaryForGroup(gname) - if coachEnabled then - _msgGroup(group, string.format('Loaded %d troops', bestMeta.count)) - else - _msgGroup(group, string.format('Loaded %d troops', bestMeta.count)) - end - end - - -- Update cargo weight - self:_updateCargoWeight(group) - end - CTLD._hoverState[uname] = nil - end - end - else - -- Aircraft at capacity - notify player with weight/count info - local aircraftType = _getUnitType(unit) or 'aircraft' - if not weightOK then - -- Weight limit exceeded - _msgGroup(group, string.format('Weight capacity reached! Current: %dkg, Item: %dkg, Max: %dkg for %s', - math.floor(currentWeight), math.floor(itemWeight), math.floor(maxWeight), aircraftType)) - elseif bestType == 'crate' then - -- Count limit exceeded for crates - _eventSend(self, group, nil, 'crate_aircraft_capacity', { current = total, max = maxCrates, aircraft = aircraftType }) - elseif bestType == 'troops' then - -- Count limit exceeded for troops - _eventSend(self, group, nil, 'troop_aircraft_capacity', { count = bestMeta.count or 0, max = maxTroops, aircraft = aircraftType }) - end - CTLD._hoverState[uname] = nil - end - else - -- lost precision window - if coachEnabled then _coachSend(self, group, uname, 'coach_hover_lost', {}, false) end - CTLD._hoverState[uname] = nil - end - else - -- reset hover state when outside primary envelope - if CTLD._hoverState[uname] then - if coachEnabled then _coachSend(self, group, uname, 'coach_abort', {}, false) end - end - CTLD._hoverState[uname] = nil - end - end - end - end - end - end -end --- #endregion Hover pickup scanner - --- ========================= --- Ground Auto-Load Scanner --- ========================= --- #region Ground auto-load scanner -function CTLD:ScanGroundAutoLoad() - local groundCfg = CTLD.GroundAutoLoadConfig or { Enabled = false } - if not groundCfg.Enabled then return end - - local now = timer.getTime() - local progressMsgInterval = (self.GroundLoadComms and self.GroundLoadComms.ProgressInterval) or 5 - - -- Iterate all groups that have menus (active transports) - for gname, _ in pairs(self.MenusByGroup or {}) do - local group = GROUP:FindByName(gname) - if group and group:IsAlive() then - local unit = group:GetUnit(1) - if unit and unit:IsAlive() then - local typ = _getUnitType(unit) - if _isIn(self.Config.AllowedAircraft, typ) then - local uname = unit:GetName() - - -- Ensure ground-load state table exists - CTLD._groundLoadState = CTLD._groundLoadState or {} - - -- Check if already carrying crates (skip if at capacity) - local carried = CTLD._loadedCrates[gname] - local currentCount = carried and carried.total or 0 - local capacity = _getAircraftCapacity(unit) - - if currentCount < capacity.maxCrates then - -- Check basic requirements: on ground, low speed - local agl = _getUnitAGL(unit) - local gs = _getGroundSpeed(unit) - local onGround = (agl <= (groundCfg.GroundContactAGL or 3.5)) - local slowEnough = (gs <= (groundCfg.MaxGroundSpeed or 2.0)) - - -- If a previous ground auto-load completed while we remain effectively stationary - -- on the ground, avoid auto-starting again until the aircraft has moved or lifted off. - local state = CTLD._groundLoadState[uname] - local canProcess = true - if state and state.completed and onGround and slowEnough then - local p3 = unit:GetPointVec3() - local sx = state.completedPosition and state.completedPosition.x or state.startPosition and state.startPosition.x or p3.x - local sz = state.completedPosition and state.completedPosition.z or state.startPosition and state.startPosition.z or p3.z - local dx = (p3.x - sx) - local dz = (p3.z - sz) - local moved = math.sqrt(dx*dx + dz*dz) - -- Require a small reposition (e.g., taxi or liftoff) before new auto-load cycles - if moved < 20 then - canProcess = false - end - end - - if onGround and slowEnough and canProcess then - -- Check zone requirement - local inValidZone = false - if groundCfg.RequirePickupZone then - local inPickupZone = self:_isUnitInsidePickupZone(unit, true) - - if not inPickupZone and groundCfg.AllowInFOBZones then - -- Check FOB zones too - for _, fobZone in ipairs(self.FOBZones or {}) do - local fname = fobZone:GetName() - if self._ZoneActive.FOB[fname] ~= false then - local fobPoint = fobZone:GetPointVec3() - local unitPoint = unit:GetPointVec3() - local dx = (fobPoint.x - unitPoint.x) - local dz = (fobPoint.z - unitPoint.z) - local d = math.sqrt(dx*dx + dz*dz) - local fobRadius = self:_getZoneRadius(fobZone) - if d <= fobRadius then - inValidZone = true - break - end - end - end - else - inValidZone = inPickupZone - end - else - inValidZone = true -- no zone requirement - end - - if inValidZone then - -- Find nearby crates - local p3 = unit:GetPointVec3() - local searchRadius = groundCfg.SearchRadius or 50 - local nearby = _getNearbyFromSpatialGrid(p3.x, p3.z, searchRadius) - - local bestGroundCrate, bestGroundDist = nil, math.huge - local loadableCrates = {} - for name, meta in pairs(nearby.crates or {}) do - if meta.side == self.Side then - local dx = (meta.point.x - p3.x) - local dz = (meta.point.z - p3.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= searchRadius then - local entry = { name = name, meta = meta, dist = d } - table.insert(loadableCrates, entry) - if d < bestGroundDist then - bestGroundCrate, bestGroundDist = entry, d - end - end - end - end - - if CTLD.Config and CTLD.Config.DebugGroundCrates then - local shouldReport = true - local gst = CTLD._groundLoadState and CTLD._groundLoadState[uname] - if gst and gst.reportHold then - -- only emit periodic heartbeat during hold - local last = gst.reportLast or 0 - if (now - last) < (CTLD.Config.DebugGroundCratesInterval or 2.0) then - shouldReport = false - else - CTLD._groundLoadState[uname].reportLast = now - end - end - if shouldReport then - _debugCrateSight('GroundDebug', { - unit = uname, - now = now, - interval = CTLD.Config.DebugGroundCratesInterval, - step = CTLD.Config.DebugGroundCratesStep, - name = bestGroundCrate and bestGroundCrate.name or 'none', - distance = (bestGroundDist ~= math.huge) and bestGroundDist or nil, - count = #loadableCrates, - troops = 0, - radius = searchRadius, - typeHint = 'crate', - note = string.format('freeSlots=%d', math.max(0, capacity.maxCrates - currentCount)) - }) - end - end - - if #loadableCrates > 0 then - -- Sort by distance, load closest first (up to capacity) - table.sort(loadableCrates, function(a, b) return a.dist < b.dist end) - - -- Determine how many we can load - local canLoad = math.min(#loadableCrates, capacity.maxCrates - currentCount) - local cratesToLoad = {} - for i = 1, canLoad do - table.insert(cratesToLoad, loadableCrates[i]) - end - - if #cratesToLoad > 0 then - -- Ground load state machine - local state = CTLD._groundLoadState[uname] - if not state or not state.loading then - -- Start new load sequence - CTLD._groundLoadState[uname] = { - loading = true, - startTime = now, - cratesToLoad = cratesToLoad, - startPosition = { x = p3.x, z = p3.z }, - lastCheckTime = now, - } - local msgData = _prepareGroundLoadMessage(self, 'Start', { - seconds = groundCfg.LoadDelay, - count = #cratesToLoad, - }) - _coachSend(self, group, uname, 'ground_load_started', msgData, false) - else - -- Validate that crates in state still exist - local validCrates = {} - for _, crateInfo in ipairs(state.cratesToLoad or {}) do - -- Check if crate still exists in CTLD._crates - if CTLD._crates[crateInfo.name] then - table.insert(validCrates, crateInfo) - end - end - - -- If no valid crates remain, reset state - if #validCrates == 0 then - CTLD._groundLoadState[uname] = nil - else - -- Update state with only valid crates - state.cratesToLoad = validCrates - - -- Continue existing sequence - local elapsed = now - state.startTime - local remaining = (groundCfg.LoadDelay or 15) - elapsed - - -- Check if moved too much - local dx = (p3.x - state.startPosition.x) - local dz = (p3.z - state.startPosition.z) - local moved = math.sqrt(dx*dx + dz*dz) - if moved > 10 then -- moved more than 10m - _coachSend(self, group, uname, 'ground_load_aborted', {}, false) - CTLD._groundLoadState[uname] = nil - else - -- Progress message every 5 seconds - if (now - state.lastCheckTime) >= progressMsgInterval and remaining > 1 then - local msgData = _prepareGroundLoadMessage(self, 'Progress', { - remaining = math.max(0, math.ceil(remaining)), - }) - _coachSend(self, group, uname, 'ground_load_progress', msgData, false) - state.lastCheckTime = now - state.reportHold = true - end - - -- Check if time elapsed - if remaining <= 0 then - -- Load the crates! - local loadedCount = 0 - for _, crateInfo in ipairs(state.cratesToLoad) do - local success = self:_loadCrateIntoAircraft(group, crateInfo.name, crateInfo.meta) - if success then - loadedCount = loadedCount + 1 - end - end - - if loadedCount > 0 then - local msgData = _prepareGroundLoadMessage(self, 'Complete', { - count = loadedCount, - }) - _coachSend(self, group, uname, 'ground_load_complete', msgData, false) - -- Mark completion and remember where it happened so we don't - -- immediately restart another cycle while still parked. - CTLD._groundLoadState[uname] = { - completed = true, - completedTime = now, - completedPosition = { x = p3.x, z = p3.z }, - reportHold = false, - } - else - -- Nothing actually loaded; clear state fully. - CTLD._groundLoadState[uname] = nil - end - end - end - end -- end of validCrates > 0 - end -- end of state exists check - else - CTLD._groundLoadState[uname] = nil - end - else - CTLD._groundLoadState[uname] = nil - end - else - -- Not in a valid zone - local state = CTLD._groundLoadState[uname] - if state and state.sentZoneWarning ~= true then - -- Send zone requirement message (once) - local nearestZone, nearestDist = self:_nearestActivePickupZone(unit) - if nearestZone and nearestDist then - local isMetric = _getPlayerIsMetric(unit) - local brg = _bearingTo(unit, nearestZone) - local distV, distU = _fmtDistance(nearestDist, isMetric) - _coachSend(self, group, uname, 'ground_load_no_zone', { - zone_dist = distV, - zone_dist_u = distU, - zone_brg = brg - }, false) - end - if not state then - CTLD._groundLoadState[uname] = { sentZoneWarning = true } - else - state.sentZoneWarning = true - end - end - end - else - -- Not on ground or moving too fast, reset state - local state = CTLD._groundLoadState[uname] - if state and state.loading then - -- Was loading but now lifted off or moved - _coachSend(self, group, uname, 'ground_load_aborted', {}, false) - end - CTLD._groundLoadState[uname] = nil - end - else - -- At capacity, no need to check - CTLD._groundLoadState[uname] = nil - end - end - end - end - end -end - --- Helper: Load a crate into an aircraft (shared by hover and ground load) -function CTLD:_loadCrateIntoAircraft(group, crateName, crateMeta) - if not group or not crateName or not crateMeta then return false end - - local gname = group:GetName() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return false end - - -- Destroy the static object first - local obj = StaticObject.getByName(crateName) - if obj then obj:destroy() end - - -- Clean up crate smoke refresh schedule - _cleanupCrateSmoke(crateName) - - -- Remove from spatial grid and tracking - _removeFromSpatialGrid(crateName, crateMeta.point, 'crate') - CTLD._crates[crateName] = nil - - -- Add to loaded crates using existing method (maintains consistency with rest of code) - self:_addLoadedCrate(group, crateMeta.key) - - -- Update inventory if enabled - if self.Config.Inventory and self.Config.Inventory.Enabled and crateMeta.spawnZone then - pcall(function() self:_updateInventoryOnPickup(crateMeta.spawnZone, crateMeta.key) end) - end - - _logDebug(string.format('[Load] Loaded crate %s (%s) into %s', crateName, crateMeta.key, gname)) - return true -end --- #endregion Ground auto-load scanner - --- ========================= --- Troops --- ========================= --- #region Troops -function CTLD:_lookupCrateLabel(crateKey) - if not crateKey then return 'Unknown Crate' end - local cat = self.Config and self.Config.CrateCatalog or {} - local def = cat[crateKey] - if def then - return def.menu or def.description or def.name or def.displayName or crateKey - end - return crateKey -end - -function CTLD:_lookupTroopLabel(typeKey) - if not typeKey or typeKey == '' then return 'Troops' end - local cfg = self.Config and self.Config.Troops and self.Config.Troops.TroopTypes - local def = cfg and cfg[typeKey] - if def and def.label and def.label ~= '' then - return def.label - end - return typeKey -end - -function CTLD:_refreshLoadedTroopSummaryForGroup(groupName) - if not groupName or groupName == '' then return end - local load = CTLD._troopsLoaded[groupName] - if not load or (load.count or 0) == 0 then - CTLD._loadedTroopTypes[groupName] = nil - return - end - - local entries = {} - if load.troopTypes and #load.troopTypes > 0 then - entries = load.troopTypes - else - entries = { { typeKey = load.typeKey, count = load.count } } - end - - local summary = { total = 0, byType = {}, labels = {} } - for _, entry in ipairs(entries) do - local typeKey = entry.typeKey or load.typeKey or 'Troops' - local count = entry.count or 0 - if count > 0 then - summary.byType[typeKey] = (summary.byType[typeKey] or 0) + count - summary.labels[typeKey] = self:_lookupTroopLabel(typeKey) - summary.total = summary.total + count - end - end - - if summary.total > 0 then - CTLD._loadedTroopTypes[groupName] = summary - else - CTLD._loadedTroopTypes[groupName] = nil - end -end - -function CTLD:LoadTroops(group, opts) - local gname = group:GetName() - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - -- Check for MEDEVAC crew pickup first - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - local medevacPickedUp = self:CheckMEDEVACPickup(group) - if medevacPickedUp then - return -- MEDEVAC crew was picked up, don't continue with normal troop loading - end - end - - -- Ground requirement check for troop loading (realistic behavior) - if self.Config.RequireGroundForTroopLoad then - local unitType = _getUnitType(unit) - local capacities = self.Config.AircraftCapacities or {} - local specific = capacities[unitType] - - -- Check per-aircraft override first, then fall back to global config - local requireGround = (specific and specific.requireGround ~= nil) and specific.requireGround or true - - if requireGround then - -- Must be on the ground - if _isUnitInAir(unit) then - local isMetric = _getPlayerIsMetric(unit) - local maxSpeed = (specific and specific.maxGroundSpeed) or self.Config.MaxGroundSpeedForLoading or 2.0 - local speedVal, speedUnit = _fmtSpeed(maxSpeed, isMetric) - _eventSend(self, group, nil, 'troop_load_must_land', { max_speed = speedVal, speed_u = speedUnit }) - return - end - - -- Check ground speed (must not be taxiing too fast) - local groundSpeed = _getGroundSpeed(unit) - local maxSpeed = (specific and specific.maxGroundSpeed) or self.Config.MaxGroundSpeedForLoading or 2.0 - - if groundSpeed > maxSpeed then - local isMetric = _getPlayerIsMetric(unit) - local currentVal, currentUnit = _fmtSpeed(groundSpeed, isMetric) - local maxVal, maxUnit = _fmtSpeed(maxSpeed, isMetric) - _eventSend(self, group, nil, 'troop_load_too_fast', { - current_speed = currentVal, - max_speed = maxVal, - speed_u = maxUnit - }) - return - end - end - end - - -- Check for nearby deployed troops first (allow pickup regardless of zone restrictions) - local p3 = unit:GetPointVec3() - local maxPickupDistance = 25 -- meters for ground-based troop pickup (matches hover pickup distance) - local nearby = _getNearbyFromSpatialGrid(p3.x, p3.z, maxPickupDistance) - - local nearbyTroopGroup = nil - local nearbyTroopMeta = nil - local nearbyTroopDist = nil - - -- Search for nearby deployed troops - for troopGroupName, troopMeta in pairs(nearby.troops) do - if troopMeta.side == self.Side then - local troopGroup = GROUP:FindByName(troopGroupName) - if troopGroup and troopGroup:IsAlive() then - local troopPos = troopGroup:GetCoordinate() - if troopPos then - local tp = troopPos:GetVec3() - local dx = (tp.x - p3.x) - local dz = (tp.z - p3.z) - local d = math.sqrt(dx*dx + dz*dz) - if d <= maxPickupDistance and ((not nearbyTroopDist) or d < nearbyTroopDist) then - nearbyTroopGroup = troopGroup - nearbyTroopMeta = troopMeta - nearbyTroopDist = d - end - end - end - end - end - - -- If we found nearby deployed troops, pick them up (bypass zone requirement) - if nearbyTroopGroup and nearbyTroopMeta then - -- Load the deployed troops - local troopCount = nearbyTroopMeta.count or 0 - local typeKey = nearbyTroopMeta.typeKey or 'AS' - local troopWeight = nearbyTroopMeta.weightKg or 0 - - -- Check aircraft capacity - local capacity = _getAircraftCapacity(unit) - local maxTroops = capacity.maxTroops - local maxWeight = capacity.maxWeightKg or 0 - - local currentTroops = CTLD._troopsLoaded[gname] - local currentTroopCount = currentTroops and currentTroops.count or 0 - local totalTroopCount = currentTroopCount + troopCount - - local carried = CTLD._loadedCrates[gname] - local currentWeight = carried and carried.totalWeightKg or 0 - local wouldBeWeight = currentWeight + troopWeight - - -- Check capacity - if totalTroopCount > maxTroops then - local aircraftType = _getUnitType(unit) or 'aircraft' - _msgGroup(group, string.format('Troop capacity exceeded! Current: %d, Adding: %d, Max: %d for %s', - currentTroopCount, troopCount, maxTroops, aircraftType)) - return - end - - if maxWeight > 0 and wouldBeWeight > maxWeight then - local aircraftType = _getUnitType(unit) or 'aircraft' - _msgGroup(group, string.format('Weight capacity exceeded! Current: %dkg, Troops: %dkg, Max: %dkg for %s', - math.floor(currentWeight), math.floor(troopWeight), math.floor(maxWeight), aircraftType)) - return - end - - -- Load the troops and remove from deployed tracking - if currentTroops then - local troopTypes = currentTroops.troopTypes or { { typeKey = currentTroops.typeKey, count = currentTroops.count } } - table.insert(troopTypes, { typeKey = typeKey, count = troopCount }) - - CTLD._troopsLoaded[gname] = { - count = totalTroopCount, - typeKey = 'Mixed', - troopTypes = troopTypes, - weightKg = currentTroops.weightKg + troopWeight, - } - else - CTLD._troopsLoaded[gname] = { - count = troopCount, - typeKey = typeKey, - troopTypes = { { typeKey = typeKey, count = troopCount } }, - weightKg = troopWeight, - } - end - - -- Remove from deployed tracking - local troopGroupName = nearbyTroopGroup:GetName() - _removeFromSpatialGrid(troopGroupName, nearbyTroopMeta.point, 'troops') - CTLD._deployedTroops[troopGroupName] = nil - - -- Destroy the troop group - nearbyTroopGroup:Destroy() - - self:_refreshLoadedTroopSummaryForGroup(gname) - _eventSend(self, group, nil, 'troops_loaded', { count = totalTroopCount }) - _msgGroup(group, string.format('Picked up %d deployed troops (total onboard: %d)', troopCount, totalTroopCount)) - - return -- Successfully picked up deployed troops, exit function - end - - -- No nearby deployed troops found, enforce pickup zone requirement for spawning new troops - if self.Config.RequirePickupZoneForTroopLoad then - local hasPickupZones = (self.PickupZones and #self.PickupZones > 0) or (self.Config.Zones and self.Config.Zones.PickupZones and #self.Config.Zones.PickupZones > 0) - if not hasPickupZones then - _eventSend(self, group, nil, 'no_pickup_zones', {}) - return - end - local zone, dist = self:_nearestActivePickupZone(unit) - if not zone or not dist then - -- No active pickup zone resolvable; provide helpful vectors to nearest configured zone if any - local list = {} - if self.Config and self.Config.Zones and self.Config.Zones.PickupZones then - for _, z in ipairs(self.Config.Zones.PickupZones) do table.insert(list, z) end - elseif self.PickupZones and #self.PickupZones > 0 then - for _, mz in ipairs(self.PickupZones) do if mz and mz.GetName then table.insert(list, { name = mz:GetName() }) end end - end - local fbZone, fbDist = _nearestZonePoint(unit, list) - if fbZone and fbDist then - local isMetric = _getPlayerIsMetric(unit) - local rZone = self:_getZoneRadius(fbZone) or 0 - local delta = math.max(0, fbDist - rZone) - local v, u = _fmtRange(delta, isMetric) - local up = unit:GetPointVec3(); local zp = fbZone:GetPointVec3() - local brg = _bearingDeg({ x = up.x, z = up.z }, { x = zp.x, z = zp.z }) - _eventSend(self, group, nil, 'troop_pickup_zone_required', { zone_dist = v, zone_dist_u = u, zone_brg = brg }) - else - _eventSend(self, group, nil, 'no_pickup_zones', {}) - end - return - end - local inside = false - if zone then - local rZone = self:_getZoneRadius(zone) or 0 - if dist and rZone and dist <= rZone then inside = true end - end - if not inside then - local isMetric = _getPlayerIsMetric(unit) - local rZone = (self:_getZoneRadius(zone) or 0) - local delta = (dist and rZone) and math.max(0, dist - rZone) or 0 - local v, u = _fmtRange(delta, isMetric) - -- Bearing from player to zone center - local up = unit:GetPointVec3() - local zp = zone and zone:GetPointVec3() or nil - local brg = 0 - if zp then - brg = _bearingDeg({ x = up.x, z = up.z }, { x = zp.x, z = zp.z }) - end - _eventSend(self, group, nil, 'troop_pickup_zone_required', { zone_dist = v, zone_dist_u = u, zone_brg = brg }) - return - end - end - - -- Determine troop type and composition - local requestedType = (opts and (opts.typeKey or opts.type)) - or (self.Config.Troops and self.Config.Troops.DefaultType) - or 'AS' - local unitsList, label = self:_resolveTroopUnits(requestedType) - local troopDef = (self.Config.Troops and self.Config.Troops.TroopTypes and self.Config.Troops.TroopTypes[requestedType]) or nil - - -- Check if we already have troops (allow mixing different types now) - local currentTroops = CTLD._troopsLoaded[gname] - - -- Check aircraft capacity for troops - local capacity = _getAircraftCapacity(unit) - local maxTroops = capacity.maxTroops - local maxWeight = capacity.maxWeightKg or 0 - local troopCount = #unitsList - - -- Calculate troop weight from catalog - local troopWeight = 0 - if troopDef and troopDef.weightKg then - troopWeight = troopDef.weightKg - elseif troopCount > 0 then - -- Fallback: estimate 100kg per soldier if no weight defined - troopWeight = troopCount * 100 - end - - -- Check current cargo weight and troop count - local carried = CTLD._loadedCrates[gname] - local currentWeight = carried and carried.totalWeightKg or 0 - local currentTroopCount = currentTroops and currentTroops.count or 0 - local totalTroopCount = currentTroopCount + troopCount - local wouldBeWeight = currentWeight + troopWeight - - -- Check total troop count limit - if totalTroopCount > maxTroops then - -- Aircraft cannot carry this many troops total - local aircraftType = _getUnitType(unit) or 'aircraft' - _msgGroup(group, string.format('Troop capacity exceeded! Current: %d, Adding: %d, Max: %d for %s', - currentTroopCount, troopCount, maxTroops, aircraftType)) - return - end - - -- Check weight limit (if enabled) - if maxWeight > 0 and wouldBeWeight > maxWeight then - -- Weight capacity exceeded - local aircraftType = _getUnitType(unit) or 'aircraft' - _msgGroup(group, string.format('Weight capacity exceeded! Current: %dkg, Troops: %dkg, Max: %dkg for %s', - math.floor(currentWeight), math.floor(troopWeight), math.floor(maxWeight), aircraftType)) - return - end - - -- ADD to existing troops or create new entry - if currentTroops then - -- Add to existing load (supports mixing types) - local troopTypes = currentTroops.troopTypes or { { typeKey = currentTroops.typeKey, count = currentTroops.count } } - table.insert(troopTypes, { typeKey = requestedType, count = troopCount }) - - CTLD._troopsLoaded[gname] = { - count = totalTroopCount, - typeKey = 'Mixed', -- Indicate mixed types - troopTypes = troopTypes, -- Store individual type details - weightKg = currentTroops.weightKg + troopWeight, - } - self:_refreshLoadedTroopSummaryForGroup(gname) - _eventSend(self, group, nil, 'troops_loaded', { count = totalTroopCount }) - _msgGroup(group, string.format('Loaded %d more troops (total: %d)', troopCount, totalTroopCount)) - else - CTLD._troopsLoaded[gname] = { - count = troopCount, - typeKey = requestedType, - troopTypes = { { typeKey = requestedType, count = troopCount } }, - weightKg = troopWeight, - } - self:_refreshLoadedTroopSummaryForGroup(gname) - _eventSend(self, group, nil, 'troops_loaded', { count = troopCount }) - end - - -- Update DCS internal cargo weight - self:_updateCargoWeight(group) -end - -function CTLD:UnloadTroops(group, opts) - local gname = group:GetName() - local load = CTLD._troopsLoaded[gname] - if not load or (load.count or 0) == 0 then _eventSend(self, group, nil, 'no_troops', {}) return end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - -- Check for MEDEVAC crew delivery to MASH first - if CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled then - local medevacStatus = self:CheckMEDEVACDelivery(group, load) - if medevacStatus == 'delivered' then - -- Crew delivered to MASH, clear troops and return - CTLD._troopsLoaded[gname] = nil - CTLD._loadedTroopTypes[gname] = nil - - -- Update DCS internal cargo weight after delivery - self:_updateCargoWeight(group) - - return - elseif medevacStatus == 'pending' then - return - end - end - - -- Determine if unit is in the air and check for fast-rope capability - local isInAir = _isUnitInAir(unit) - local canFastRope = false - local isFastRope = false - - if isInAir then - -- Unit is airborne - check if fast-rope is enabled and if altitude is safe - if self.Config.EnableFastRope then - local p3 = unit:GetPointVec3() - local ground = land and land.getHeight and land.getHeight({x = p3.x, y = p3.z}) or 0 - local agl = p3.y - ground - local maxFastRopeAGL = self.Config.FastRopeMaxHeight or 20 - local minFastRopeAGL = self.Config.FastRopeMinHeight or 5 - - if agl > maxFastRopeAGL then - -- Too high for fast-rope - local isMetric = _getPlayerIsMetric(unit) - local aglDisplay = _fmtAGL(agl, isMetric) - _eventSend(self, group, nil, 'troop_unload_altitude_too_high', { - max_agl = math.floor(maxFastRopeAGL), - current_agl = math.floor(agl) - }) - return - elseif agl < minFastRopeAGL then - -- Too low for safe fast-rope - _eventSend(self, group, nil, 'troop_unload_altitude_too_low', { - min_agl = math.floor(minFastRopeAGL), - current_agl = math.floor(agl) - }) - return - else - -- Within safe fast-rope window - canFastRope = true - isFastRope = true - end - else - -- Fast-rope disabled - must land - _msgGroup(group, "Must land to deploy troops. Fast-rope is disabled.", 10) - return - end - end - - -- Restrict deploying troops inside Pickup Zones if configured - if self.Config.ForbidTroopDeployInsidePickupZones then - local activeOnly = (self.Config.ForbidChecksActivePickupOnly ~= false) - local inside = false - local ok, _ = pcall(function() - inside = select(1, self:_isUnitInsidePickupZone(unit, activeOnly)) - end) - if ok and inside then - _eventSend(self, group, nil, 'troop_deploy_forbidden_in_pickup', {}) - return - end - end - - local p = unit:GetPointVec3() - local here = { x = p.x, z = p.z } - local hdgRad, _ = _headingRadDeg(unit) - -- Offset troop spawn forward to avoid spawning under/near rotors - local troopOffset = math.max(0, tonumber(self.Config.TroopSpawnOffset or 0) or 0) - local center = (troopOffset > 0) and { x = here.x + math.sin(hdgRad) * troopOffset, z = here.z + math.cos(hdgRad) * troopOffset } or { x = here.x, z = here.z } - - -- Build the unit composition - handle mixed troop types - local units = {} - local spacing = 1.8 - local unitIndex = 0 - - if load.troopTypes then - -- Mixed types - spawn each type's units - for _, troopTypeData in ipairs(load.troopTypes) do - local comp, _ = self:_resolveTroopUnits(troopTypeData.typeKey) - for i=1, #comp do - unitIndex = unitIndex + 1 - local dx = (unitIndex-1) * spacing - local dz = ((unitIndex % 2) == 0) and 2.0 or -2.0 - table.insert(units, { - type = tostring(comp[i] or 'Infantry AK'), - name = string.format('CTLD-TROOP-%d', math.random(100000,999999)), - x = center.x + dx, y = center.z + dz, heading = hdgRad - }) - end - end - else - -- Single type (legacy support) - local comp, _ = self:_resolveTroopUnits(load.typeKey) - for i=1, #comp do - unitIndex = unitIndex + 1 - local dx = (unitIndex-1) * spacing - local dz = ((unitIndex % 2) == 0) and 2.0 or -2.0 - table.insert(units, { - type = tostring(comp[i] or 'Infantry AK'), - name = string.format('CTLD-TROOP-%d', math.random(100000,999999)), - x = center.x + dx, y = center.z + dz, heading = hdgRad - }) - end - end - - local groupData = { - visible=false, lateActivation=false, tasks={}, task='Ground Nothing', - units=units, route={}, name=string.format('CTLD_TROOPS_%d', math.random(100000,999999)) - } - local spawned = _coalitionAddGroup(self.Side, Group.Category.GROUND, groupData, self.Config) - if spawned then - -- Track deployed troop groups for later pickup - local troopGroupName = spawned:getName() - CTLD._deployedTroops[troopGroupName] = { - typeKey = load.typeKey, - count = load.count, - side = self.Side, - spawnTime = timer.getTime(), - point = { x = center.x, z = center.z }, - weightKg = load.weightKg or 0, - behavior = opts and opts.behavior or 'defend' - } - -- Add to spatial index for efficient hover pickup - _addToSpatialGrid(troopGroupName, CTLD._deployedTroops[troopGroupName], 'troops') - - CTLD._troopsLoaded[gname] = nil - CTLD._loadedTroopTypes[gname] = nil - - -- Update DCS internal cargo weight after unloading troops - self:_updateCargoWeight(group) - - -- Send appropriate message based on deployment method - if isFastRope then - local aircraftType = _getUnitType(unit) or 'aircraft' - _eventSend(self, nil, self.Side, 'troops_fast_roped_coalition', { - count = #units, - player = _playerNameFromGroup(group), - aircraft = aircraftType - }) - else - _eventSend(self, nil, self.Side, 'troops_unloaded_coalition', { count = #units, player = _playerNameFromGroup(group) }) - end - - -- Assign optional behavior - local behavior = opts and opts.behavior or nil - if behavior == 'attack' and self.Config.AttackAI and self.Config.AttackAI.Enabled then - local t = self:_assignAttackBehavior(spawned:getName(), center, false) - -- Announce intentions globally - local isMetric = _getPlayerIsMetric(group:GetUnit(1)) - if t and t.kind == 'base' then - local brg = _bearingDeg({ x = center.x, z = center.z }, { x = t.point.x, z = t.point.z }) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_base_announce', { unit_name = spawned:getName(), player = _playerNameFromGroup(group), base_name = t.name, brg = brg, rng = v, rng_u = u }) - elseif t and t.kind == 'enemy' then - local brg = _bearingDeg({ x = center.x, z = center.z }, { x = t.point.x, z = t.point.z }) - local v, u = _fmtRange(t.dist or 0, isMetric) - _eventSend(self, nil, self.Side, 'attack_enemy_announce', { unit_name = spawned:getName(), player = _playerNameFromGroup(group), enemy_type = t.etype or 'unit', brg = brg, rng = v, rng_u = u }) - else - local v, u = _fmtRange((self.Config.AttackAI and self.Config.AttackAI.TroopSearchRadius) or 3000, isMetric) - _eventSend(self, nil, self.Side, 'attack_no_targets', { unit_name = spawned:getName(), player = _playerNameFromGroup(group), rng = v, rng_u = u }) - end - end - else - _eventSend(self, group, nil, 'troops_deploy_failed', { reason = 'DCS group spawn error' }) - end -end --- #endregion Troops - --- Internal: resolve troop composition list for a given type key and coalition -function CTLD:_resolveTroopUnits(typeKey) - local tcfg = (self.Config.Troops and self.Config.Troops.TroopTypes) or {} - local def = tcfg[typeKey or 'AS'] or {} - - -- Log warning if troop types are missing - if not def or not def.size then - _logError(string.format('WARNING: Troop type "%s" not found or incomplete. TroopTypes table has %d entries.', - typeKey or 'AS', - (tcfg and type(tcfg) == 'table') and #tcfg or 0)) - end - - local size = tonumber(def.size or 0) or 0 - if size <= 0 then size = 6 end - local pool - if self.Side == coalition.side.BLUE then - pool = def.unitsBlue or def.units - elseif self.Side == coalition.side.RED then - pool = def.unitsRed or def.units - else - pool = def.units - end - if not pool or #pool == 0 then pool = { 'Infantry AK' } end - - -- Debug: Log what units will spawn - local unitList = {} - for i=1,math.min(size, 3) do - table.insert(unitList, pool[((i-1) % #pool) + 1]) - end - _logDebug(string.format('Spawning %d troops for type "%s": %s%s', - size, - typeKey or 'AS', - table.concat(unitList, ', '), - size > 3 and '...' or '')) - - local list = {} - for i=1,size do list[i] = pool[((i-1) % #pool) + 1] end - local label = def.label or typeKey or 'Troops' - return list, label -end - --- ========================= --- Public helpers --- ========================= --- ========================= --- Auto-build FOB in zones --- ========================= --- #region Auto-build FOB in zones -function CTLD:AutoBuildFOBCheck() - if not (self.FOBZones and #self.FOBZones > 0) then return end - -- Find any FOB recipe definitions - local fobDefs = {} - for key,def in pairs(self.Config.CrateCatalog) do if def.isFOB and def.build then fobDefs[key] = def end end - if next(fobDefs) == nil then return end - - for _,zone in ipairs(self.FOBZones) do - local center = zone:GetPointVec3() - local radius = self:_getZoneRadius(zone) - local nearby = self:GetNearbyCrates({ x = center.x, z = center.z }, radius) - -- filter to this coalition side - local filtered = {} - for _,c in ipairs(nearby) do if c.meta.side == self.Side then table.insert(filtered, c) end end - nearby = filtered - - if #nearby > 0 then - local counts = {} - for _,c in ipairs(nearby) do counts[c.meta.key] = (counts[c.meta.key] or 0) + 1 end - - local function consumeCrates(key, qty) - local removed = 0 - for _,c in ipairs(nearby) do - if removed >= qty then break end - if c.meta.key == key then - local obj = StaticObject.getByName(c.name) - if obj then obj:destroy() end - _cleanupCrateSmoke(c.name) -- Clean up smoke refresh schedule - CTLD._crates[c.name] = nil - removed = removed + 1 - end - end - end - - local built = false - - -- Prefer composite recipes - for recipeKey,cat in pairs(fobDefs) do - if type(cat.requires) == 'table' then - local ok = true - for reqKey,qty in pairs(cat.requires) do if (counts[reqKey] or 0) < qty then ok = false; break end end - if ok then - local gdata = cat.build({ x = center.x, z = center.z }, 0, cat.side or self.Side) - local g = _coalitionAddGroup(cat.side or self.Side, cat.category or Group.Category.GROUND, gdata, self.Config) - if g then - for reqKey,qty in pairs(cat.requires) do consumeCrates(reqKey, qty) end - _msgCoalition(self.Side, string.format('FOB auto-built at %s', zone:GetName())) - built = true - break -- move to next zone; avoid multiple builds per tick - end - end - end - end - - -- Then single-key FOB recipes - if not built then - for key,cat in pairs(fobDefs) do - if not cat.requires and (counts[key] or 0) >= (cat.required or 1) then - local gdata = cat.build({ x = center.x, z = center.z }, 0, cat.side or self.Side) - local g = _coalitionAddGroup(cat.side or self.Side, cat.category or Group.Category.GROUND, gdata, self.Config) - if g then - consumeCrates(key, cat.required or 1) - _msgCoalition(self.Side, string.format('FOB auto-built at %s', zone:GetName())) - built = true - break - end - end - end - end - -- next zone iteration continues automatically - end - end -end --- #endregion Auto-build FOB in zones - --- ========================= --- Public helpers --- ========================= --- #region Public helpers -function CTLD:RegisterCrate(key, def) - self.Config.CrateCatalog[key] = def -end - -function CTLD:MergeCatalog(tbl) - for k,v in pairs(tbl or {}) do self.Config.CrateCatalog[k] = v end -end - --- ========================= --- Inventory helpers --- ========================= --- #region Inventory helpers -function CTLD:InitInventory() - if not (self.Config.Inventory and self.Config.Inventory.Enabled) then return end - -- Seed stock for each configured pickup zone (by name only) - for _,z in ipairs(self.PickupZones or {}) do - local name = z:GetName() - self:_SeedZoneStock(name, 1.0) - end -end - -function CTLD:_SeedZoneStock(zoneName, factor) - if not zoneName then return end - CTLD._stockByZone[zoneName] = CTLD._stockByZone[zoneName] or {} - local f = factor or 1.0 - for key,def in pairs(self.Config.CrateCatalog or {}) do - local n = tonumber(def.initialStock or 0) or 0 - n = math.max(0, math.floor(n * f + 0.0001)) - -- Only seed if not already present (avoid overwriting saved/progress state) - if CTLD._stockByZone[zoneName][key] == nil then - CTLD._stockByZone[zoneName][key] = n - end - end -end - -function CTLD:_CreateFOBPickupZone(point, cat, hdg) - -- Create a small pickup zone at the FOB to act as a supply point - local name = string.format('FOB_PZ_%d', math.random(100000,999999)) - local v2 = (VECTOR2 and VECTOR2.New) and VECTOR2:New(point.x, point.z) or { x = point.x, y = point.z } - local r = 150 - local z = ZONE_RADIUS:New(name, v2, r) - table.insert(self.PickupZones, z) - self._ZoneDefs.PickupZones[name] = { name = name, radius = r, active = true } - self._ZoneActive.Pickup[name] = true - table.insert(self.Config.Zones.PickupZones, { name = name, radius = r, active = true }) - -- Seed FOB stock at fraction of initial pickup stock - local f = (self.Config.Inventory and self.Config.Inventory.FOBStockFactor) or 0.25 - self:_SeedZoneStock(name, f) - _msgCoalition(self.Side, string.format('FOB supply established: %s (stock seeded at %d%%)', name, math.floor(f*100+0.5))) - -- Auto-refresh map drawings so the new FOB pickup zone is visible immediately - if self.Config.MapDraw and self.Config.MapDraw.Enabled then - local ok, err = pcall(function() self:DrawZonesOnMap() end) - if not ok then - _logError(string.format('DrawZonesOnMap failed after FOB creation: %s', tostring(err))) - end - end -end --- #endregion Inventory helpers - --- ========================= --- MEDEVAC System --- ========================= --- #region MEDEVAC - --- Initialize MEDEVAC system (called from CTLD:New) -function CTLD:InitMEDEVAC() - if not (CTLD.MEDEVAC and CTLD.MEDEVAC.Enabled) then return end - - -- Initialize salvage pools - if CTLD.MEDEVAC.Salvage and CTLD.MEDEVAC.Salvage.Enabled then - CTLD._salvagePoints[self.Side] = CTLD._salvagePoints[self.Side] or 0 - end - - -- Setup event handler for unit deaths - local handler = EVENTHANDLER:New() - handler:HandleEvent(EVENTS.Dead) - local selfref = self - - function handler:OnEventDead(eventData) - -- First check if this is an invulnerable MEDEVAC crew member that needs respawning - local unit = eventData.IniUnit - if unit then - local unitName = unit:GetName() - if unitName then - for crewGroupName, crewData in pairs(CTLD._medevacCrews) do - if unitName:find(crewGroupName, 1, true) then - local now = timer.getTime() - if crewData.invulnerable and now < crewData.invulnerableUntil then - _logVerbose(string.format('[MEDEVAC] Invulnerable crew member %s killed, respawning...', unitName)) - -- Respawn this crew member - local id = timer.scheduleFunction(function() - local grp = Group.getByName(crewGroupName) - if grp and grp:isExist() then - local cfg = CTLD.MEDEVAC - local crewUnitType = cfg.CrewUnitTypes[crewData.side] or ((crewData.side == coalition.side.BLUE) and 'Soldier M4' or 'Paratrooper RPG-16') - -- Use the stored country ID from the original spawn - local countryId = crewData.countryId or ((crewData.side == coalition.side.BLUE) and (country.id.USA or 2) or 18) - - -- Random position near spawn point - local angle = math.random() * 2 * math.pi - local radius = 3 + math.random() * 5 - local spawnX = crewData.position.x + math.cos(angle) * radius - local spawnZ = crewData.position.z + math.sin(angle) * radius - - local newUnitData = { - type = crewUnitType, - name = unitName..'_respawn', - x = spawnX, - y = spawnZ, - heading = math.random() * 2 * math.pi - } - - coalition.addGroup(crewData.side, Group.Category.GROUND, { - visible = false, - lateActivation = false, - tasks = {}, - task = 'Ground Nothing', - route = {}, - units = {newUnitData}, - name = unitName..'_respawn_grp', - country = countryId - }) - - _logVerbose(string.format('[MEDEVAC] Respawned invulnerable crew member %s', unitName)) - end - end, nil, timer.getTime() + 1) - _trackOneShotTimer(id) - return -- Don't process as normal death - end - end - end - end - end - - -- Normal death processing for vehicle spawning MEDEVAC crews - if not unit then - _logDebug('[MEDEVAC] OnEventDead: No unit in eventData') - return - end - - -- Get the underlying DCS unit to safely extract data - local dcsUnit = unit.DCSUnit or unit - if not dcsUnit then - _logDebug('[MEDEVAC] OnEventDead: No DCS unit') - return - end - - -- Extract coalition from event data if available, otherwise from unit - local unitCoalition = eventData.IniCoalition - if not unitCoalition and unit and unit.GetCoalition then - local success, result = pcall(function() return unit:GetCoalition() end) - if success then - unitCoalition = result - end - end - - if not unitCoalition then - _logDebug('[MEDEVAC] OnEventDead: Could not determine coalition') - return - end - - if unitCoalition ~= selfref.Side then - _logDebug(string.format('[MEDEVAC] OnEventDead: Wrong coalition (unit: %s, CTLD: %s)', tostring(unitCoalition), tostring(selfref.Side))) - return - end - - -- Extract category from event data if available - local unitCategory = eventData.IniCategory or (unit.GetCategory and unit:GetCategory()) - if not unitCategory then - _logDebug('[MEDEVAC] OnEventDead: Could not determine category') - return - end - - if unitCategory ~= Unit.Category.GROUND_UNIT then - _logDebug(string.format('[MEDEVAC] OnEventDead: Not a ground unit (category: %s)', tostring(unitCategory))) - return - end - - -- Extract unit type name - local unitType = eventData.IniTypeName or (unit.GetTypeName and unit:GetTypeName()) - if not unitType then - _logDebug('[MEDEVAC] OnEventDead: Could not determine unit type') - return - end - - _logVerbose(string.format('[MEDEVAC] OnEventDead: Ground unit destroyed - %s', unitType)) - - -- Check if this unit type is eligible for MEDEVAC - local catalogEntry = selfref:_FindCatalogEntryByUnitType(unitType) - - if catalogEntry and catalogEntry.MEDEVAC == true then - _logVerbose(string.format('[MEDEVAC] OnEventDead: %s is MEDEVAC eligible, spawning crew', unitType)) - -- Pass eventData instead of unit to get position/heading safely - selfref:_SpawnMEDEVACCrew(eventData, catalogEntry) - else - if catalogEntry then - _logDebug(string.format('[MEDEVAC] OnEventDead: %s found in catalog but MEDEVAC=%s', unitType, tostring(catalogEntry.MEDEVAC))) - else - _logDebug(string.format('[MEDEVAC] OnEventDead: %s not found in catalog', unitType)) - end - end - - -- Sling-Load Salvage: Check if we should spawn a salvage crate for the OPPOSING coalition - if selfref.Config.SlingLoadSalvage and selfref.Config.SlingLoadSalvage.Enabled then - -- Get unit position - local unitPos = nil - if eventData.initiator and eventData.initiator.getPoint then - local success, point = pcall(function() return eventData.initiator:getPoint() end) - if success and point then - unitPos = point - end - end - - if unitPos then - -- Determine enemy coalition (who can collect this salvage) - local enemySide = (selfref.Side == coalition.side.BLUE) and coalition.side.RED or coalition.side.BLUE - selfref:_SpawnSlingLoadSalvageCrate(unitPos, unitType, enemySide, eventData) - else - _logDebug('[SlingLoadSalvage] Could not get unit position for salvage spawn') - end - end - end - - self.MEDEVACHandler = handler - - -- Add hit event handler to prevent damage to invulnerable crews - local hitHandler = EVENTHANDLER:New() - hitHandler:HandleEvent(EVENTS.Hit) - - function hitHandler:OnEventHit(eventData) - local unit = eventData.TgtUnit - if not unit then return end - - local unitName = unit:GetName() - if not unitName then return end - - -- Check if this unit belongs to an invulnerable MEDEVAC crew - for crewGroupName, crewData in pairs(CTLD._medevacCrews) do - if unitName:find(crewGroupName, 1, true) then - -- This unit is part of a MEDEVAC crew, check invulnerability - local now = timer.getTime() - if crewData.invulnerable and now < crewData.invulnerableUntil then - _logVerbose(string.format('[MEDEVAC] Unit %s is invulnerable, preventing damage', unitName)) - -- Can't directly prevent damage in DCS, but log it - -- Infantry is fragile anyway, so invulnerability is more of a "hope they survive" thing - return - end - end - end - end - - self.MEDEVACHitHandler = hitHandler - - -- Start crew timeout checker (runs every 30 seconds) - self.MEDEVACSched = SCHEDULER:New(nil, function() - local ok, err = pcall(function() selfref:_CheckMEDEVACTimeouts() end) - if not ok then _logError('MEDEVAC timeout scheduler error: '..tostring(err)) end - end, {}, 30, 30) - - -- Sling-load salvage is handled by adaptive background loop - if self.Config.SlingLoadSalvage and self.Config.SlingLoadSalvage.Enabled then - _logInfo('Sling-Load Salvage system initialized for coalition '..tostring(self.Side)) - end - - -- Initialize MASH zones from config - self:_InitMASHZones() - - _logInfo('MEDEVAC system initialized for coalition '..tostring(self.Side)) -end - --- Find catalog entry that spawns a given unit type -function CTLD:_FindCatalogEntryByUnitType(unitType) - local catalog = self.Config.CrateCatalog or {} - local catalogSize = 0 - for _ in pairs(catalog) do catalogSize = catalogSize + 1 end - - _logDebug(string.format('[MEDEVAC] Searching catalog for unit type: %s (catalog has %d entries)', unitType, catalogSize)) - - for key, def in pairs(catalog) do - -- Check if this catalog entry builds the unit type - if def.build then - -- Check global lookup table that maps build functions to unit types - if type(def.build) == 'function' and _CTLD_BUILD_UNIT_TYPES and _CTLD_BUILD_UNIT_TYPES[def.build] then - local buildUnitType = _CTLD_BUILD_UNIT_TYPES[def.build] - _logDebug(string.format('[MEDEVAC] Catalog entry %s has unitType=%s (from global lookup)', key, tostring(buildUnitType))) - if buildUnitType == unitType then - _logDebug(string.format('[MEDEVAC] Found catalog entry for %s via global lookup: key=%s', unitType, key)) - return def - end - end - - -- Fallback: Try to extract unit type from build function string (legacy compatibility) - local buildStr = tostring(def.build) - if buildStr:find(unitType, 1, true) then - _logDebug(string.format('[MEDEVAC] Found catalog entry for %s via string search: key=%s', unitType, key)) - return def - end - else - _logDebug(string.format('[MEDEVAC] Catalog entry %s has no build function', key)) - end - - -- Also check if catalog entry has a unitType field directly - if def.unitType and def.unitType == unitType then - _logDebug(string.format('[MEDEVAC] Found catalog entry for %s via def.unitType field: key=%s', unitType, key)) - return def - end - end - - _logDebug(string.format('[MEDEVAC] No catalog entry found for unit type: %s', unitType)) - return nil -end - --- Spawn MEDEVAC crew when vehicle destroyed -function CTLD:_SpawnMEDEVACCrew(eventData, catalogEntry) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - - -- Probability check: does the crew survive to request rescue? - -- Use coalition-specific survival chance - local survivalChance = 0.02 -- default fallback - if cfg.CrewSurvivalChance then - if type(cfg.CrewSurvivalChance) == 'table' then - -- Per-coalition config - survivalChance = cfg.CrewSurvivalChance[self.Side] or 0.02 - else - -- Legacy single value config (backward compatibility) - survivalChance = cfg.CrewSurvivalChance - end - end - - local roll = math.random() - if roll > survivalChance then - -- Crew did not survive - _logVerbose(string.format('[MEDEVAC] Crew did not survive (roll: %.4f > %.4f)', roll, survivalChance)) - return - end - _logVerbose(string.format('[MEDEVAC] Crew survived! (roll: %.4f <= %.4f) - will spawn in 5 minutes after battle clears', roll, survivalChance)) - - -- Extract data from eventData instead of calling methods on dead unit - local unit = eventData.IniUnit - local unitType = eventData.IniTypeName or (unit and unit.GetTypeName and unit:GetTypeName()) - local unitName = eventData.IniUnitName or (unit and unit.GetName and unit:GetName()) or 'Unknown' - - -- Get position - the unit is dead, so we need to get position from the DCS initiator object - local pos = nil - - -- Try the raw DCS initiator object (this should have the last known position) - if eventData.initiator then - _logVerbose('[MEDEVAC] Trying DCS initiator object') - local dcsUnit = eventData.initiator - if dcsUnit and dcsUnit.getPoint then - local success, point = pcall(function() return dcsUnit:getPoint() end) - if success and point then - pos = point - _logVerbose(string.format('[MEDEVAC] Got position from DCS initiator:getPoint(): %.0f, %.0f, %.0f', pos.x, pos.y, pos.z)) - end - end - if not pos and dcsUnit and dcsUnit.getPosition then - local success, position = pcall(function() return dcsUnit:getPosition() end) - if success and position and position.p then - pos = position.p - _logVerbose(string.format('[MEDEVAC] Got position from DCS initiator:getPosition().p: %.0f, %.0f, %.0f', pos.x, pos.y, pos.z)) - end - end - end - - -- Try IniDCSUnit - if not pos and eventData.IniDCSUnit then - _logVerbose('[MEDEVAC] Trying IniDCSUnit') - local dcsUnit = eventData.IniDCSUnit - if dcsUnit and dcsUnit.getPoint then - local success, point = pcall(function() return dcsUnit:getPoint() end) - if success and point then - pos = point - _logVerbose(string.format('[MEDEVAC] Got position from IniDCSUnit:getPoint(): %.0f, %.0f, %.0f', pos.x, pos.y, pos.z)) - end - end - end - - if not pos or not unitType then - _logVerbose(string.format('[MEDEVAC] Cannot spawn crew - missing position (pos=%s) or unit type (type=%s)', tostring(pos), tostring(unitType))) - return - end - - -- Get heading if possible - local heading = 0 - if unit and unit.GetHeading then - local success, result = pcall(function() return unit:GetHeading() end) - if success and result then - heading = result - end - end - - -- Determine crew size - local crewSize = catalogEntry.crewSize or cfg.CrewDefaultSize or 2 - - -- Determine salvage value - local salvageValue = catalogEntry.salvageValue - if not salvageValue then - salvageValue = catalogEntry.required or cfg.Salvage.DefaultValue or 1 - end - - -- Find nearest enemy to spawn crew toward them - local spawnPoint = { x = pos.x, z = pos.z } - local enemySide = (self.Side == coalition.side.BLUE) and coalition.side.RED or coalition.side.BLUE - local nearestEnemy = self:_findNearestEnemyGround({ x = pos.x, z = pos.z }, 2000) -- 2km search - - if nearestEnemy and nearestEnemy.point then - -- Calculate direction toward enemy - local dx = nearestEnemy.point.x - pos.x - local dz = nearestEnemy.point.z - pos.z - local dist = math.sqrt(dx*dx + dz*dz) - if dist > 0 then - local dirX = dx / dist - local dirZ = dz / dist - local offset = cfg.CrewSpawnOffset or 15 - spawnPoint.x = pos.x + dirX * offset - spawnPoint.z = pos.z + dirZ * offset - end - else - -- No enemy found, spawn at random offset - local angle = math.random() * 2 * math.pi - local offset = cfg.CrewSpawnOffset or 15 - spawnPoint.x = pos.x + math.cos(angle) * offset - spawnPoint.z = pos.z + math.sin(angle) * offset - end - - -- Prepare spawn data but delay actual spawning by 5 minutes (300 seconds) - local spawnDelay = cfg.CrewSpawnDelay or 300 -- 5 minutes default - local selfref = self - - _logVerbose(string.format('[MEDEVAC] Crew will spawn in %d seconds after battle clears', spawnDelay)) - - local spawnTimerId = timer.scheduleFunction(function() - -- Now spawn the crew after battle has cleared - local crewGroupName = string.format('MEDEVAC_Crew_%s_%d', unitType, math.random(100000, 999999)) - local crewUnitType = catalogEntry.crewType or cfg.CrewUnitTypes[selfref.Side] or ((selfref.Side == coalition.side.BLUE) and 'Soldier M4' or 'Infantry AK') - - _logVerbose(string.format('[MEDEVAC] Coalition: %s, CrewUnitType selected: %s, catalogEntry.crewType=%s, cfg.CrewUnitTypes[side]=%s', - (selfref.Side == coalition.side.BLUE and 'BLUE' or 'RED'), - crewUnitType, - tostring(catalogEntry.crewType), - tostring(cfg.CrewUnitTypes and cfg.CrewUnitTypes[selfref.Side]) - )) - - -- Determine if crew gets a MANPADS - -- Use coalition-specific MANPADS spawn chance - local manPadChance = 0.1 -- default fallback - if cfg.ManPadSpawnChance then - if type(cfg.ManPadSpawnChance) == 'table' then - -- Per-coalition config - manPadChance = cfg.ManPadSpawnChance[selfref.Side] or 0.1 - else - -- Legacy single value config (backward compatibility) - manPadChance = cfg.ManPadSpawnChance - end - end - local spawnManPad = math.random() <= manPadChance - local manPadIndex = nil - if spawnManPad and crewSize > 1 then - manPadIndex = math.random(1, crewSize) -- Random crew member gets the MANPADS - _logVerbose(string.format('[MEDEVAC] Crew will include MANPADS (unit %d of %d)', manPadIndex, crewSize)) - end - - -- Get country ID from the destroyed unit instead of trying to map coalition to country - -- This is the same approach used by the Medevac_KHASHURI.lua script - local countryId = nil - if eventData.initiator and eventData.initiator.getCountry then - local success, result = pcall(function() return eventData.initiator:getCountry() end) - if success and result then - countryId = result - _logVerbose(string.format('[MEDEVAC] Got country ID %d from destroyed unit', countryId)) - end - end - - -- Fallback if we couldn't get it from the unit - if not countryId then - _logVerbose('[MEDEVAC] WARNING: Could not get country from dead unit, using fallback') - if selfref.Side == coalition.side.BLUE then - countryId = country.id.USA or 2 - else - countryId = country.id.CJTF_RED or 18 -- Use CJTF RED as fallback - end - end - - _logVerbose(string.format('[MEDEVAC] Spawning crew now - coalition=%s, countryId=%d, crewUnitType=%s', - (selfref.Side == coalition.side.BLUE and 'BLUE' or 'RED'), - countryId, - crewUnitType)) - - local groupData = { - visible = false, - lateActivation = false, - tasks = {}, - task = 'Ground Nothing', - route = {}, - units = {}, - name = crewGroupName - -- Country ID passed directly to coalition.addGroup(), not in groupData - } - - for i = 1, crewSize do - -- Randomize position within a small radius (3-8 meters) for natural scattered appearance - local angle = math.random() * 2 * math.pi - local radius = 3 + math.random() * 5 -- 3-8 meters from center - local offsetX = math.cos(angle) * radius - local offsetZ = math.sin(angle) * radius - - -- Determine unit type (MANPADS or regular crew) - local unitType = crewUnitType - if i == manPadIndex then - unitType = cfg.ManPadUnitTypes[selfref.Side] or crewUnitType - _logVerbose(string.format('[MEDEVAC] Unit %d assigned MANPADS type: %s', i, unitType)) - end - - table.insert(groupData.units, { - type = unitType, - name = string.format('%s_U%d', crewGroupName, i), - x = spawnPoint.x + offsetX, - y = spawnPoint.z + offsetZ, - heading = math.random() * 2 * math.pi -- Random heading for each unit - }) - end - - _logVerbose(string.format('[MEDEVAC] About to call coalition.addGroup with country=%d (coalition=%s)', - countryId, - (selfref.Side == coalition.side.BLUE and 'BLUE' or 'RED'))) - - -- CRITICAL: First parameter is COUNTRY ID, not coalition ID! - -- This matches Medevac_KHASHURI.lua line 500: coalition.addGroup(_deadUnit:getCountry(), ...) - local crewGroup = coalition.addGroup(countryId, Group.Category.GROUND, groupData) - - if not crewGroup then - _logVerbose('[MEDEVAC] Failed to spawn crew') - return - end - - -- Double-check what coalition the spawned group actually belongs to - local spawnedCoalition = crewGroup:getCoalition() - _logVerbose(string.format('[MEDEVAC] Crew group %s spawned successfully - actual coalition: %s (%d)', - crewGroupName, - (spawnedCoalition == coalition.side.BLUE and 'BLUE' or spawnedCoalition == coalition.side.RED and 'RED' or 'NEUTRAL'), - spawnedCoalition)) - - -- Set crew to hold position and defend themselves - local crewController = crewGroup:getController() - if crewController then - crewController:setOption(AI.Option.Ground.id.ROE, AI.Option.Ground.val.ROE.RETURN_FIRE) - crewController:setOption(AI.Option.Ground.id.ALARM_STATE, AI.Option.Ground.val.ALARM_STATE.RED) - - -- Make crew immortal and/or invisible during announcement delay to prevent early death - if cfg.CrewImmortalDuringDelay then - local setImmortal = { - id = 'SetImmortal', - params = { value = true } - } - Controller.setCommand(crewController, setImmortal) - _logVerbose('[MEDEVAC] Crew set to immortal during announcement delay') - end - - if cfg.CrewInvisibleDuringDelay then - local setInvisible = { - id = 'SetInvisible', - params = { value = true } - } - Controller.setCommand(crewController, setInvisible) - _logVerbose('[MEDEVAC] Crew set to invisible to AI during announcement delay') - end - end - - -- Track crew immediately (but don't make mission available yet) - -- Smoke will be popped AFTER the announcement delay when they actually call for help - local crewData = { - vehicleType = unitType, - side = selfref.Side, - countryId = countryId, -- Store country ID for respawning - spawnTime = timer.getTime(), - position = spawnPoint, - salvageValue = salvageValue, - originalHeading = heading, - requestTime = nil, -- Will be set after announcement delay - warningsSent = {}, - invulnerable = false, - invulnerableUntil = 0, - greetingSent = false - } - CTLD._medevacCrews[crewGroupName] = crewData - - -- Wait before announcing mission (verify crew survival) - local announceDelay = cfg.CrewAnnouncementDelay or 60 - _logVerbose(string.format('[MEDEVAC] Will announce mission in %d seconds if crew survives', announceDelay)) - - local announceTimerId = timer.scheduleFunction(function() - -- Check if crew still exists - local g = Group.getByName(crewGroupName) - if not g or not g:isExist() then - _logVerbose(string.format('[MEDEVAC] Crew %s died before announcement, mission cancelled', crewGroupName)) - CTLD._medevacCrews[crewGroupName] = nil - return - end - - -- Crew survived! Now announce to players and make mission available - _logVerbose(string.format('[MEDEVAC] Crew %s survived, announcing mission', crewGroupName)) - - -- Make crew visible again (remove invisibility) and optionally remove immortality - local crewController = g:getController() - if crewController then - -- Always make crew visible when they announce - if cfg.CrewInvisibleDuringDelay then - local setVisible = { - id = 'SetInvisible', - params = { value = false } - } - Controller.setCommand(crewController, setVisible) - _logVerbose('[MEDEVAC] Crew is now visible to AI') - end - - -- Remove immortality unless config says to keep it - if cfg.CrewImmortalDuringDelay and not cfg.CrewImmortalAfterAnnounce then - local setMortal = { - id = 'SetImmortal', - params = { value = false } - } - Controller.setCommand(crewController, setMortal) - _logVerbose('[MEDEVAC] Crew immortality removed, now vulnerable') - elseif cfg.CrewImmortalAfterAnnounce then - _logVerbose('[MEDEVAC] Crew remains immortal after announcement (per config)') - end - end - - -- Pop smoke now that they're calling for help - if cfg.PopSmokeOnSpawn then - local smokeColor = (cfg.SmokeColor and cfg.SmokeColor[selfref.Side]) or trigger.smokeColor.Red - _spawnMEDEVACSmoke(spawnPoint, smokeColor, cfg) - _logVerbose(string.format('[MEDEVAC] Crew popped smoke after announcement (color: %d)', smokeColor)) - end - - local grid = selfref:_GetMGRSString(spawnPoint) - - -- Pick random request message - local requestMessages = cfg.RequestAirLiftMessages or { - "Stranded Crew: This is {vehicle} crew at {grid}. Need pickup ASAP! We have {salvage} salvage to collect." - } - local messageTemplate = requestMessages[math.random(1, #requestMessages)] - - -- Replace placeholders - local message = messageTemplate - message = message:gsub("{vehicle}", unitType) - message = message:gsub("{grid}", grid) - message = message:gsub("{crew_size}", tostring(crewSize)) - message = message:gsub("{salvage}", tostring(salvageValue)) - - _msgCoalition(selfref.Side, message, 25) - - -- Now crew is requesting pickup - CTLD._medevacCrews[crewGroupName].requestTime = timer.getTime() - - -- Create map marker - if cfg.MapMarkers and cfg.MapMarkers.Enabled then - local markerID = selfref:_CreateMEDEVACMarker(spawnPoint, unitType, crewSize, salvageValue, crewGroupName) - CTLD._medevacCrews[crewGroupName].markerID = markerID - end - - end, nil, timer.getTime() + announceDelay) - _trackOneShotTimer(announceTimerId) - - end, nil, timer.getTime() + spawnDelay) - _trackOneShotTimer(spawnTimerId) - -end - --- Create map marker for MEDEVAC crew -function CTLD:_CreateMEDEVACMarker(position, vehicleType, crewSize, salvageValue, crewGroupName) - local cfg = CTLD.MEDEVAC.MapMarkers - if not cfg or not cfg.Enabled then return nil end - - local grid = self:_GetMGRSString(position) - local text = string.format('%s: %s Crew (%d) - Salvage: %d - %s', - cfg.IconText or '🔴 MEDEVAC', - vehicleType, - crewSize, - salvageValue, - grid - ) - - local markerID = _nextMarkupId() - trigger.action.markToCoalition(markerID, text, {x = position.x, y = 0, z = position.z}, self.Side, true) - - return markerID -end - --- Get MGRS grid string for position -function CTLD:_GetMGRSString(position) - if not position then - return 'N/A' - end - local lat, lon = coord.LOtoLL({x = position.x, y = 0, z = position.z}) - local mgrs = coord.LLtoMGRS(lat, lon) - if mgrs and mgrs.UTMZone and mgrs.MGRSDigraph then - -- Ensure Easting and Northing are numbers - local easting = tonumber(mgrs.Easting) or 0 - local northing = tonumber(mgrs.Northing) or 0 - return string.format('%s%s %05d %05d', mgrs.UTMZone, mgrs.MGRSDigraph, easting, northing) - end - return string.format('%.0f, %.0f', position.x, position.z) -end - --- Check for MEDEVAC crew timeouts and send warnings -function CTLD:_CheckMEDEVACTimeouts() - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - - local now = timer.getTime() - local toRemove = {} - - for crewGroupName, data in pairs(CTLD._medevacCrews) do - if data.side == self.Side then - local requestTime = data.requestTime - if requestTime then -- Only check after crew has requested pickup - local elapsed = now - requestTime - if type(data.warningsSent) ~= 'table' then - data.warningsSent = {} - end - local remaining = (cfg.CrewTimeout or 3600) - elapsed - - -- Check for approaching rescue helos (pop smoke and send greeting with cooldown) - if cfg.PopSmokeOnApproach then - local approachDist = cfg.PopSmokeOnApproachDistance or 5000 - local crewPos = data.position - local smokeCooldown = cfg.SmokeCooldown or 900 -- Default 15 minutes (900 seconds) - local lastSmoke = data.lastSmokeTime or 0 - local canPopSmoke = (now - lastSmoke) >= smokeCooldown - - if canPopSmoke then - -- Check all units of this coalition for nearby transport helos - local coalitionUnits = coalition.getGroups(self.Side, Group.Category.AIRPLANE) - local heloGroups = coalition.getGroups(self.Side, Group.Category.HELICOPTER) - - if heloGroups then - for _, grp in ipairs(heloGroups) do - if grp and grp:isExist() then - local units = grp:getUnits() - if units then - for _, unit in ipairs(units) do - if unit and unit:isExist() and unit:isActive() then - -- Check if this is a transport helo (in AllowedAircraft list) - local unitType = unit:getTypeName() - local isTransport = false - if self.Config.AllowedAircraft then - for _, allowed in ipairs(self.Config.AllowedAircraft) do - if unitType == allowed then - isTransport = true - break - end - end - end - - if isTransport then - local unitPos = unit:getPoint() - if unitPos and crewPos then - local dx = unitPos.x - crewPos.x - local dz = unitPos.z - crewPos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist <= approachDist then - -- Rescue helo detected! Pop smoke and send greeting - local smokeColor = (cfg.SmokeColor and cfg.SmokeColor[self.Side]) or trigger.smokeColor.Red - _spawnMEDEVACSmoke(crewPos, smokeColor, cfg) - - -- Pick random greeting message - local greetings = cfg.GreetingMessages or {"We see you! Over here!"} - local greeting = greetings[math.random(1, #greetings)] - - _msgCoalition(self.Side, string.format('[MEDEVAC] %s crew: "%s"', data.vehicleType, greeting), 10) - - -- Set cooldown timer instead of permanent flag - data.lastSmokeTime = now - local cooldownMins = smokeCooldown / 60 - _logVerbose(string.format('[MEDEVAC] Crew %s detected helo at %.0fm, popped smoke (cooldown: %.0f mins)', - crewGroupName, dist, cooldownMins)) - break - end - end - end - end - end - end - end - if data.lastSmokeTime == now then break end -- Just popped smoke, exit loop - end - end -- if heloGroups then - end -- if canPopSmoke then - end -- if cfg.PopSmokeOnApproach then - - -- Send warnings - if cfg.Warnings then - for _, warning in ipairs(cfg.Warnings) do - local warnTime = warning.time - if remaining <= warnTime and not data.warningsSent[warnTime] then - local grid = self:_GetMGRSString(data.position) - _msgCoalition(self.Side, _fmtTemplate(warning.message, { - crew = data.vehicleType..' crew', - grid = grid - }), 15) - data.warningsSent[warnTime] = true - end - end - end - - -- Check timeout - if remaining <= 0 then - table.insert(toRemove, crewGroupName) - end - end - end - end - - -- Remove timed-out crews - for _, crewGroupName in ipairs(toRemove) do - self:_RemoveMEDEVACCrew(crewGroupName, 'timeout') - end -end - --- Remove MEDEVAC crew (timeout or death) -function CTLD:_RemoveMEDEVACCrew(crewGroupName, reason) - local data = CTLD._medevacCrews[crewGroupName] - if not data then return end - - -- Remove map marker - if data.markerID then - pcall(function() trigger.action.removeMark(data.markerID) end) - end - - -- Destroy crew group - local g = Group.getByName(crewGroupName) - if g and g:isExist() then - g:destroy() - end - - -- Send message - if reason == 'timeout' then - local grid = self:_GetMGRSString(data.position) - _msgCoalition(self.Side, _fmtTemplate(CTLD.Messages.medevac_crew_timeout, { - vehicle = data.vehicleType, - grid = grid - }), 15) - - -- Track statistics - if CTLD.MEDEVAC and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CTLD._medevacStats[self.Side].timedOut = (CTLD._medevacStats[self.Side].timedOut or 0) + 1 - end - elseif reason == 'killed' then - -- Track statistics - if CTLD.MEDEVAC and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CTLD._medevacStats[self.Side].killed = (CTLD._medevacStats[self.Side].killed or 0) + 1 - end - end - - -- Remove from tracking - CTLD._medevacCrews[crewGroupName] = nil - - if data.rescueGroup and CTLD._medevacEnrouteStates then - CTLD._medevacEnrouteStates[data.rescueGroup] = nil - end - - _logVerbose(string.format('[MEDEVAC] Removed crew %s (reason: %s)', crewGroupName, reason or 'unknown')) -end - --- Check if crew was picked up (called from troop loading system) -function CTLD:CheckMEDEVACPickup(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local pos = unit:GetPointVec3() - local searchRadius = 100 -- meters to search for nearby crew - - for crewGroupName, data in pairs(CTLD._medevacCrews) do - if data.side == self.Side and data.requestTime then - local crewPos = data.position - local dx = pos.x - crewPos.x - local dz = pos.z - crewPos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist <= searchRadius then - -- Check if crew group still exists and is being loaded - local crewGroup = Group.getByName(crewGroupName) - if crewGroup and crewGroup:isExist() then - -- Crew was picked up! Handle respawn - self:_HandleMEDEVACPickup(group, crewGroupName, data) - return true - end - end - end - end - - return false -end - --- Auto-pickup: Send MEDEVAC crews to landed helicopter within range -function CTLD:AutoPickupMEDEVACCrew(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - if not cfg.AutoPickup or not cfg.AutoPickup.Enabled then return end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - -- Only work with landed helicopters - if _isUnitInAir(unit) then return end - - local autoCfg = cfg.AutoPickup - local requireGround = (autoCfg.RequireGroundContact ~= false) - if requireGround then - local agl = _getUnitAGL(unit) - if agl > (autoCfg.GroundContactAGL or 3) then - return -- still hovering/high skid - wait for full touchdown - end - local gs = _getGroundSpeed(unit) - if gs > (autoCfg.MaxLandingSpeed or 2) then - return -- helicopter is sliding/taxiing - hold crews until stable - end - end - - local pos = unit:GetPointVec3() - if not pos then return end - local maxDist = autoCfg.MaxDistance or 200 - local groupName = group:GetName() - - -- Skip if helicopter already has an active load hold - if CTLD._medevacLoadStates and CTLD._medevacLoadStates[groupName] then - return - end - - -- Find nearby MEDEVAC crews within pickup range - for crewGroupName, data in pairs(CTLD._medevacCrews) do - if data.side == self.Side and data.requestTime and not data.pickedUp then - local crewPos = data.position - local dx = pos.x - crewPos.x - local dz = pos.z - crewPos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist <= maxDist then - local crewGroup = Group.getByName(crewGroupName) - if crewGroup and crewGroup:isExist() then - -- Crew is close enough - start load hold - local loadCfg = cfg.AutoPickup or {} - local delay = loadCfg.LoadDelay or 15 - local now = timer.getTime() - - -- Check if already in a load hold - local existingState = CTLD._medevacLoadStates[groupName] - if not existingState then - -- Start new load hold - CTLD._medevacLoadStates[groupName] = { - startTime = now, - delay = delay, - crewGroupName = crewGroupName, - crewData = data, - holdAnnounced = true, - nextReminder = now + math.max(1.5, delay / 3), - lastQualified = now, - } - - _msgGroup(group, string.format("MEDEVAC crew from %s is boarding. Hold position for %d seconds...", - data.vehicleType or 'unknown vehicle', delay), 10) - _logVerbose(string.format('[MEDEVAC][AutoLoad] Hold started for %s (delay=%.1fs, crew=%s, dist=%.0fm)', - groupName, delay, crewGroupName, dist)) - end - end - end - end - end -end --- Auto-unload: Send MEDEVAC crews to landed helicopter within MASH zone --- Scan all active transport groups for auto-pickup and auto-unload opportunities -function CTLD:ScanMEDEVACAutoActions() - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - - -- Progress any ongoing load and unload holds before new scans - self:_UpdateMedevacLoadStates() - self:_UpdateMedevacUnloadStates() - - -- Scan all active transport groups - for gname, _ in pairs(self.MenusByGroup or {}) do - local group = GROUP:FindByName(gname) - if group and group:IsAlive() then - local unit = group:GetUnit(1) - if unit and unit:IsAlive() then - local isAirborne = _isUnitInAir(unit) - - local autoUnloadCfg = cfg.AutoUnload or {} - local aglLimit = autoUnloadCfg.GroundContactAGL or 2 - local agl = _getUnitAGL(unit) - if agl == nil then agl = aglLimit end - local hasGroundContact = (not isAirborne) - or (agl <= aglLimit) - - if not isAirborne then - -- Helicopter is landed according to DCS state - if cfg.AutoPickup and cfg.AutoPickup.Enabled then - self:AutoPickupMEDEVACCrew(group) - end - end - - if cfg.AutoUnload and cfg.AutoUnload.Enabled and hasGroundContact then - -- Reduce log spam: only attempt auto-unload when there are rescued crews onboard - local crews = self:_CollectRescuedCrewsForGroup(group:GetName()) - if crews and #crews > 0 then - self:AutoUnloadMEDEVACCrew(group) - end - end - - self:_TickMedevacEnrouteMessage(group, unit, isAirborne) - else - CTLD._medevacEnrouteStates[gname] = nil - end - else - CTLD._medevacEnrouteStates[gname] = nil - end - end - - -- Finalize unload checks after handling current landings - self:_UpdateMedevacUnloadStates() - - local enrouteStates = CTLD._medevacEnrouteStates - if enrouteStates then - for gname, _ in pairs(enrouteStates) do - if not (self.MenusByGroup and self.MenusByGroup[gname]) then - local group = GROUP:FindByName(gname) - if not group or not group:IsAlive() then - enrouteStates[gname] = nil - end - end - end - end -end - --- Auto-unload: Automatically unload MEDEVAC crews when landed in MASH zone -function CTLD:AutoUnloadMEDEVACCrew(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - if not cfg.AutoUnload or not cfg.AutoUnload.Enabled then return end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local gname = group:GetName() or 'UNKNOWN' - - -- Early silent exit (reduces log spam): only proceed if there are rescued crews onboard - local earlyCrews = self:_CollectRescuedCrewsForGroup(gname) - if not earlyCrews or #earlyCrews == 0 then return end - - local autoCfg = cfg.AutoUnload or {} - local aglLimit = autoCfg.GroundContactAGL or 2.0 - local gsLimit = autoCfg.MaxLandingSpeed or 2.0 - local settleLimit = autoCfg.SettledAGL or (aglLimit + 2.0) - - local agl = _getUnitAGL(unit) - if agl == nil then agl = 0 end - local gs = _getGroundSpeed(unit) - if gs == nil then gs = 0 end - local inAir = _isUnitInAir(unit) - - -- Treat the helicopter as landed when weight-on-wheels flips or when the skid height is within tolerance. - local hasGroundContact = (not inAir) or (agl <= aglLimit) - if not hasGroundContact then - _logDebug(string.format('[MEDEVAC][AutoUnload] %s skipped: no ground contact (agl=%.2f, limit=%.2f, inAir=%s)', gname, agl, aglLimit, tostring(inAir))) - return - end - - if inAir and agl > aglLimit then - _logDebug(string.format('[MEDEVAC][AutoUnload] %s skipped: AGL %.2f above limit %.2f while still airborne', gname, agl, aglLimit)) - return - end - - if gs > gsLimit then - _logDebug(string.format('[MEDEVAC][AutoUnload] %s skipped: ground speed %.2f above limit %.2f', gname, gs, gsLimit)) - return - end - - if settleLimit and settleLimit > 0 and agl > settleLimit then - _logDebug(string.format('[MEDEVAC][AutoUnload] %s skipped: AGL %.2f above settled limit %.2f', gname, agl, settleLimit)) - return - end - - local crews = self:_CollectRescuedCrewsForGroup(group:GetName()) - if #crews == 0 then return end - - -- Check if inside MASH zone - local pos = unit:GetPointVec3() - local inMASH, mashZone = self:_IsPositionInMASHZone({ x = pos.x, z = pos.z }) - if not inMASH then - _logDebug(string.format('[MEDEVAC][AutoUnload] %s skipped: not inside MASH zone (crews=%d)', gname, #crews)) - return - end - - _logVerbose(string.format('[MEDEVAC][AutoUnload] %s qualified for unload in MASH %s (crews=%d, agl=%.2f, gs=%.2f)', - gname, - tostring((mashZone and (mashZone.name or mashZone.unitName)) or 'UNKNOWN'), - #crews, - agl, - gs)) - - -- Begin or maintain the unload hold state - self:_EnsureMedevacUnloadState(group, mashZone, crews, { trigger = 'auto' }) -end - --- Gather all MEDEVAC crews currently onboard the specified rescue group -function CTLD:_CollectRescuedCrewsForGroup(groupName) - local crews = {} - if not groupName then return crews end - - for crewGroupName, data in pairs(CTLD._medevacCrews or {}) do - if data.side == self.Side and data.pickedUp and data.rescueGroup == groupName then - crews[#crews + 1] = { name = crewGroupName, data = data } - end - end - - return crews -end - --- Periodically deliver enroute status chatter while MEDEVAC patients are onboard -function CTLD:_TickMedevacEnrouteMessage(group, unit, isAirborne, forceSend) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - - local enrouteCfg = cfg.EnrouteMessages or {} - if enrouteCfg.Enabled == false then return end - - if not group or not unit or not unit:IsAlive() then - if group then - local gname = group:GetName() - if gname and gname ~= '' then - CTLD._medevacEnrouteStates[gname] = nil - end - end - return - end - - local gname = group:GetName() - if not gname or gname == '' then return end - - local crews = self:_CollectRescuedCrewsForGroup(gname) - if not crews or #crews == 0 then - CTLD._medevacEnrouteStates[gname] = nil - return - end - - if not isAirborne and not forceSend then - return - end - - local interval = enrouteCfg.Interval or 180 - if interval <= 0 then interval = 180 end - - CTLD._medevacEnrouteStates = CTLD._medevacEnrouteStates or {} - local now = timer.getTime() - local state = CTLD._medevacEnrouteStates[gname] - - if not state then - state = { nextSend = now + interval, lastIndex = nil } - CTLD._medevacEnrouteStates[gname] = state - end - - if not forceSend and now < (state.nextSend or 0) then - return - end - - local vector = self:_ComputeNearestMASHVector(unit) - if not vector then return end - - local messages = cfg.EnrouteToMashMessages or {} - if #messages == 0 then return end - - local idx = math.random(1, #messages) - if state.lastIndex and #messages > 1 and idx == state.lastIndex then - idx = (idx % #messages) + 1 - end - state.lastIndex = idx - state.nextSend = now + interval - - local text = _fmtTemplate(messages[idx], { - mash = vector.name, - brg = vector.bearing, - rng = vector.rangeValue, - rng_u = vector.rangeUnit - }) - - _msgGroup(group, text, math.min(self.Config.MessageDuration or 15, 18)) -end - --- Ensure an unload hold state exists for the group and announce if newly started -function CTLD:_EnsureMedevacUnloadState(group, mashZone, crews, opts) - CTLD._medevacUnloadStates = CTLD._medevacUnloadStates or {} - - if not group or not group:IsAlive() then return nil end - - local gname = group:GetName() - local now = timer.getTime() - local cfg = self.MEDEVAC or {} - local cfgAuto = cfg.AutoUnload or {} - local delay = cfgAuto.UnloadDelay or 2 - if delay < 0 then delay = 0 end - - local state = CTLD._medevacUnloadStates[gname] - if not state then - state = { - groupName = gname, - side = self.Side, - startTime = now, - delay = delay, - holdAnnounced = false, - mashZoneName = mashZone and (mashZone.name or mashZone.unitName) or nil, - triggeredBy = opts and opts.trigger or 'auto', - } - CTLD._medevacUnloadStates[gname] = state - self:_AnnounceMedevacUnloadHold(group, state) - _logVerbose(string.format('[MEDEVAC][AutoUnload] Hold started for %s (delay=%0.1fs, trigger=%s, mash=%s, crews=%d)', - gname, - state.delay, - tostring(state.triggeredBy), - tostring(state.mashZoneName or 'UNKNOWN'), - crews and #crews or 0)) - else - state.delay = delay - state.triggeredBy = opts and opts.trigger or state.triggeredBy - if mashZone then - state.mashZoneName = mashZone.name or mashZone.unitName or state.mashZoneName - end - _logDebug(string.format('[MEDEVAC][AutoUnload] Hold refreshed for %s (trigger=%s, crews=%d)', - gname, - tostring(state.triggeredBy), - crews and #crews or 0)) - end - - state.lastQualified = now - state.pendingCrewCount = crews and #crews or state.pendingCrewCount - - return state -end - --- Notify the pilot that unloading is in progress and set up reminder cadence -function CTLD:_AnnounceMedevacUnloadHold(group, state) - if not group or not state or state.holdAnnounced then return end - - state.holdAnnounced = true - local delay = math.ceil(state.delay or 0) - if delay < 1 then delay = 1 end - - _msgGroup(group, _fmtTemplate(CTLD.Messages.medevac_unload_hold, { - seconds = delay - }), math.min(delay + 2, 12)) - - local unloadMsgs = (self.MEDEVAC and self.MEDEVAC.UnloadingMessages) or {} - if #unloadMsgs > 0 then - local msg = unloadMsgs[math.random(1, #unloadMsgs)] - _msgGroup(group, msg, math.min(delay, 10)) - end - - local now = timer.getTime() - local spacing = state.delay or 2 - spacing = math.max(1.5, math.min(4, spacing / 2)) - state.nextReminder = now + spacing -end - --- Send a reminder from the unloading message pool while waiting out the hold -function CTLD:_SendMedevacUnloadReminder(group) - if not group then return end - local unloadMsgs = (self.MEDEVAC and self.MEDEVAC.UnloadingMessages) or {} - if #unloadMsgs == 0 then return end - - local msg = unloadMsgs[math.random(1, #unloadMsgs)] - _msgGroup(group, msg, 6) -end - --- Inform the pilot that the unload was cancelled and the hold must restart -function CTLD:_NotifyMedevacUnloadAbort(group, state, reasonKey) - if not group or not state or state.abortNotified or not state.holdAnnounced then return end - - local reasonText - if reasonKey == 'air' then - reasonText = 'wheels up too soon' - elseif reasonKey == 'zone' then - reasonText = 'left the MASH zone' - elseif reasonKey == 'agl' then - reasonText = 'climbed above unload height' - elseif reasonKey == 'crew' then - reasonText = 'no MEDEVAC patients onboard' - else - reasonText = 'hold interrupted' - end - - local delay = math.ceil(state.delay or 0) - if delay < 1 then delay = 1 end - - _msgGroup(group, _fmtTemplate(CTLD.Messages.medevac_unload_aborted, { - reason = reasonText, - seconds = delay - }), 10) - - state.abortNotified = true -end - --- Finalize the unload, deliver all crews, and celebrate success -function CTLD:_CompleteMedevacUnload(group, crews) - if not group or not group:IsAlive() then return end - if not crews or #crews == 0 then return end - - for _, crew in ipairs(crews) do - self:_DeliverMEDEVACCrewToMASH(group, crew.name, crew.data) - end - - local successMsgs = (self.MEDEVAC and self.MEDEVAC.UnloadCompleteMessages) or {} - if #successMsgs > 0 then - local msg = successMsgs[math.random(1, #successMsgs)] - _msgGroup(group, msg, 10) - end - - _logVerbose(string.format('[MEDEVAC] Auto unload complete for %s (%d crew group(s) delivered)', group:GetName(), #crews)) -end - --- Send loading reminder message to pilot -function CTLD:_SendMedevacLoadReminder(group) - if not group then return end - local loadingMsgs = (self.MEDEVAC and self.MEDEVAC.LoadingMessages) or {} - if #loadingMsgs == 0 then return end - - local msg = loadingMsgs[math.random(1, #loadingMsgs)] - _msgGroup(group, msg, 6) -end - --- Inform the pilot that the loading was cancelled and the hold must restart -function CTLD:_NotifyMedevacLoadAbort(group, state, reasonKey) - if not group or not state or state.abortNotified or not state.holdAnnounced then return end - - local reasonText - if reasonKey == 'air' then - reasonText = 'wheels up too soon' - elseif reasonKey == 'agl' then - reasonText = 'climbed above loading height' - elseif reasonKey == 'crew' then - reasonText = 'crew lost contact' - else - reasonText = 'hold interrupted' - end - - local delay = math.ceil(state.delay or 0) - if delay < 1 then delay = 1 end - - _msgGroup(group, string.format("MEDEVAC boarding aborted: %s. Land and hold for %d seconds to restart.", - reasonText, delay), 10) - - state.abortNotified = true -end - --- Complete the load, pick up crew, and show success message -function CTLD:_CompleteMedevacLoad(group, crewGroupName, crewData) - if not group or not group:IsAlive() then return end - if not crewGroupName or not crewData then return end - - -- Destroy the crew unit - local crewGroup = Group.getByName(crewGroupName) - if crewGroup and crewGroup:isExist() then - crewGroup:destroy() - end - - -- Handle the actual pickup (respawn vehicle, etc.) - self:_HandleMEDEVACPickup(group, crewGroupName, crewData) - - -- Show completion message - local successMsgs = (self.MEDEVAC and self.MEDEVAC.LoadMessages) or {} - if #successMsgs > 0 then - local msg = successMsgs[math.random(1, #successMsgs)] - _msgGroup(group, msg, 10) - end - - _logVerbose(string.format('[MEDEVAC] Auto load complete for %s (crew %s)', group:GetName(), crewGroupName)) -end - --- Maintain load hold states, handling completion or interruption -function CTLD:_UpdateMedevacLoadStates() - local states = CTLD._medevacLoadStates - if not states or not next(states) then return end - - local now = timer.getTime() - local cfg = self.MEDEVAC or {} - local cfgAuto = cfg.AutoPickup or {} - local aglLimit = cfgAuto.GroundContactAGL or 3 - local settleLimit = cfgAuto.SettledAGL or 6 - local gsLimit = cfgAuto.MaxLandingSpeed or 2 - local airGrace = cfgAuto.AirAbortGrace or 2 - - for gname, state in pairs(states) do - local group = GROUP:FindByName(gname) - if not group or not group:IsAlive() then - states[gname] = nil - _logDebug(string.format('[MEDEVAC][AutoLoad] %s removed: group not alive', gname)) - else - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then - states[gname] = nil - _logDebug(string.format('[MEDEVAC][AutoLoad] %s removed: unit not alive', gname)) - else - local removeState = false - local agl = _getUnitAGL(unit) - local gs = _getGroundSpeed(unit) - - -- Check if crew still exists - local crewGroup = Group.getByName(state.crewGroupName) - if not crewGroup or not crewGroup:isExist() then - _logVerbose(string.format('[MEDEVAC][AutoLoad] Hold abort for %s: crew %s no longer exists', gname, state.crewGroupName)) - removeState = true - else - -- Check distance to crew - local crewUnit = crewGroup:getUnit(1) - if crewUnit then - local crewPos = crewUnit:getPoint() - local heliPos = unit:GetPointVec3() - local dx = heliPos.x - crewPos.x - local dz = heliPos.z - crewPos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist > 40 then - self:_NotifyMedevacLoadAbort(group, state, 'crew') - _logVerbose(string.format('[MEDEVAC][AutoLoad] Hold abort for %s: moved too far from crew (%.1fm)', gname, dist)) - removeState = true - end - end - - if not removeState then - -- Check landing status (similar to unload logic) - local landed = not _isUnitInAir(unit) - if landed then - if settleLimit and settleLimit > 0 and agl > settleLimit then - landed = false - state.highAglSince = state.highAglSince or now - _logDebug(string.format('[MEDEVAC][AutoLoad] %s hold paused: AGL %.2f above settled limit %.2f', gname, agl, settleLimit)) - else - state.highAglSince = nil - end - else - state.highAglSince = nil - if agl <= aglLimit and gs <= gsLimit then - landed = true - end - end - - if landed then - state.airborneSince = nil - state.lastQualified = now - - -- Send reminders while holding - if state.nextReminder and now >= state.nextReminder then - self:_SendMedevacLoadReminder(group) - local spacing = state.delay or 2 - spacing = math.max(1.5, math.min(4, spacing / 2)) - state.nextReminder = now + spacing - end - - -- Complete load after delay - if (now - state.startTime) >= state.delay then - self:_CompleteMedevacLoad(group, state.crewGroupName, state.crewData) - _logVerbose(string.format('[MEDEVAC][AutoLoad] Hold complete for %s', gname)) - removeState = true - end - else - state.airborneSince = state.airborneSince or now - if (now - state.airborneSince) >= airGrace then - self:_NotifyMedevacLoadAbort(group, state, 'air') - _logVerbose(string.format('[MEDEVAC][AutoLoad] Hold abort for %s: airborne for %.1fs (grace=%.1f)', - gname, - now - state.airborneSince, - airGrace)) - removeState = true - end - end - end - end - - if removeState then - states[gname] = nil - end - end - end - end -end - --- Maintain unload hold states, handling completion or interruption -function CTLD:_UpdateMedevacUnloadStates() - local states = CTLD._medevacUnloadStates - if not states or not next(states) then return end - - local now = timer.getTime() - local cfg = self.MEDEVAC or {} - local cfgAuto = cfg.AutoUnload or {} - local aglLimit = cfgAuto.GroundContactAGL or 2 - local gsLimit = cfgAuto.MaxLandingSpeed or 2 - local airGrace = cfgAuto.AirAbortGrace or 2 - - for gname, state in pairs(states) do - -- Multiple CTLD instances share the global unload state table; skip entries owned by the other coalition. - if not state.side or state.side == self.Side then - local group = GROUP:FindByName(gname) - local removeState = false - - if not group or not group:IsAlive() then - removeState = true - else - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then - removeState = true - else - local crews = self:_CollectRescuedCrewsForGroup(gname) - if #crews == 0 then - self:_NotifyMedevacUnloadAbort(group, state, 'crew') - _logVerbose(string.format('[MEDEVAC][AutoUnload] Hold abort for %s: crew list empty', gname)) - removeState = true - else - local agl = _getUnitAGL(unit) - if agl == nil then agl = 0 end - local gs = _getGroundSpeed(unit) - if gs == nil then gs = 0 end - local settleLimit = cfgAuto.SettledAGL or (aglLimit + 2.0) - - local landed = not _isUnitInAir(unit) - if landed then - if settleLimit and settleLimit > 0 and agl > settleLimit then - landed = false - state.highAglSince = state.highAglSince or now - _logDebug(string.format('[MEDEVAC][AutoUnload] %s hold paused: AGL %.2f above settled limit %.2f', gname, agl, settleLimit)) - else - state.highAglSince = nil - end - else - state.highAglSince = nil - if agl <= aglLimit and gs <= gsLimit then - landed = true - end - end - - if landed then - state.airborneSince = nil - state.lastQualified = now - local pos = unit:GetPointVec3() - local inMASH, mashZone = self:_IsPositionInMASHZone({ x = pos.x, z = pos.z }) - if not inMASH then - self:_NotifyMedevacUnloadAbort(group, state, 'zone') - _logVerbose(string.format('[MEDEVAC][AutoUnload] Hold abort for %s: left MASH zone', gname)) - removeState = true - else - state.mashZoneName = mashZone and (mashZone.name or mashZone.unitName or state.mashZoneName) - - -- Send reminders while holding - if state.nextReminder and now >= state.nextReminder then - self:_SendMedevacUnloadReminder(group) - local spacing = state.delay or 2 - spacing = math.max(1.5, math.min(4, spacing / 2)) - state.nextReminder = now + spacing - end - - -- Complete unload after delay - if (now - state.startTime) >= state.delay then - self:_CompleteMedevacUnload(group, crews) - _logVerbose(string.format('[MEDEVAC][AutoUnload] Hold complete for %s (crews delivered=%d)', gname, #crews)) - removeState = true - end - end - else - state.airborneSince = state.airborneSince or now - if (now - state.airborneSince) >= airGrace then - self:_NotifyMedevacUnloadAbort(group, state, 'air') - _logVerbose(string.format('[MEDEVAC][AutoUnload] Hold abort for %s: airborne for %.1fs (grace=%.1f)', - gname, - now - state.airborneSince, - airGrace)) - removeState = true - end - end - end - end - end - - if removeState then - states[gname] = nil - end - end - end -end - --- Handle MEDEVAC crew pickup - respawn vehicle -function CTLD:_HandleMEDEVACPickup(rescueGroup, crewGroupName, crewData) - local cfg = CTLD.MEDEVAC - - -- Remove map marker - if crewData.markerID then - pcall(function() trigger.action.removeMark(crewData.markerID) end) - end - - -- Show initial load message (random from LoadMessages) - local loadMsgs = cfg.LoadMessages or {} - if #loadMsgs > 0 then - local randomLoadMsg = loadMsgs[math.random(1, #loadMsgs)] - _msgGroup(rescueGroup, randomLoadMsg, 5) - end - - -- Show loading progress messages during a brief delay (simulate boarding time) - local loadingDuration = 8 -- seconds for crew to board - local loadingMsgInterval = 2 -- show message every 2 seconds - local loadingMsgs = cfg.LoadingMessages or {} - local gname = rescueGroup:GetName() - - if #loadingMsgs > 0 then - local messageCount = math.floor(loadingDuration / loadingMsgInterval) - for i = 1, messageCount do - local msgId = timer.scheduleFunction(function() - local g = GROUP:FindByName(gname) - if g and g:IsAlive() then - local randomLoadingMsg = loadingMsgs[math.random(1, #loadingMsgs)] - _msgGroup(g, randomLoadingMsg, loadingMsgInterval - 0.5) - end - end, nil, timer.getTime() + (i * loadingMsgInterval)) - _trackOneShotTimer(msgId) - end - end - - -- Schedule final completion after loading duration - local completionId = timer.scheduleFunction(function() - local g = GROUP:FindByName(gname) - if g and g:IsAlive() then - -- Show completion message - _msgGroup(g, _fmtTemplate(CTLD.Messages.medevac_crew_loaded, { - vehicle = crewData.vehicleType, - crew_size = crewData.crewSize - }), 10) - - local unit = g:GetUnit(1) - if unit and unit:IsAlive() then - self:_TickMedevacEnrouteMessage(g, unit, _isUnitInAir(unit), true) - end - end - - -- Track statistics - if CTLD.MEDEVAC and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CTLD._medevacStats[self.Side].rescued = (CTLD._medevacStats[self.Side].rescued or 0) + 1 - end - - -- Respawn vehicle if enabled - if cfg.RespawnOnPickup then - local respawnId = timer.scheduleFunction(function() - self:_RespawnMEDEVACVehicle(crewData) - end, nil, timer.getTime() + 2) -- 2 second delay for realism - _trackOneShotTimer(respawnId) - end - - -- Mark crew as picked up (for MASH delivery tracking) - crewData.pickedUp = true - crewData.rescueGroup = gname - - _logVerbose(string.format('[MEDEVAC] Crew %s picked up by %s', crewGroupName, gname)) - end, nil, timer.getTime() + loadingDuration) - _trackOneShotTimer(completionId) -end - --- Respawn the vehicle at original death location -function CTLD:_RespawnMEDEVACVehicle(crewData) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.RespawnOnPickup then return end - - -- Calculate respawn position (offset from original death) - local offset = cfg.RespawnOffset or 15 - local angle = math.random() * 2 * math.pi - local respawnPos = { - x = crewData.position.x + math.cos(angle) * offset, - z = crewData.position.z + math.sin(angle) * offset - } - - local heading = cfg.RespawnSameHeading and (crewData.originalHeading or 0) or 0 - - -- Find catalog entry to get build function - local catalogEntry = nil - local catalogKey = nil - for key, def in pairs(self.Config.CrateCatalog or {}) do - if def and def.MEDEVAC then - local matches = false - - if def.unitType and def.unitType == crewData.vehicleType then - matches = true - end - - if (not matches) and type(def.unitTypes) == 'table' then - for _, unitType in ipairs(def.unitTypes) do - if unitType == crewData.vehicleType then - matches = true - break - end - end - end - - if not matches then - local ok, unitTypes = pcall(function() - return self:_collectEntryUnitTypes(def) - end) - if ok and type(unitTypes) == 'table' then - for _, unitType in ipairs(unitTypes) do - if unitType == crewData.vehicleType then - matches = true - break - end - end - end - end - - if matches then - catalogEntry = def - catalogKey = key - break - end - end - end - - if not catalogEntry or not catalogEntry.build then - _logVerbose('[MEDEVAC] No catalog entry found for respawn: '..crewData.vehicleType) - return - end - - -- Spawn vehicle using catalog build function - local groupData = catalogEntry.build(respawnPos, math.deg(heading)) - if not groupData then - _logVerbose('[MEDEVAC] Failed to generate group data for: '..crewData.vehicleType) - return - end - - if crewData.countryId then - groupData.country = crewData.countryId - end - - local category = catalogEntry.category or Group.Category.GROUND - - local newGroup = coalition.addGroup(self.Side, category, groupData) - - if newGroup then - if catalogKey then - _logVerbose(string.format('[MEDEVAC] Respawn using catalog entry %s for %s', tostring(catalogKey), crewData.vehicleType)) - end - _msgCoalition(self.Side, _fmtTemplate(CTLD.Messages.medevac_vehicle_respawned, { - vehicle = crewData.vehicleType - }), 10) - - -- Track statistics - if CTLD.MEDEVAC and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CTLD._medevacStats[self.Side].vehiclesRespawned = (CTLD._medevacStats[self.Side].vehiclesRespawned or 0) + 1 - end - - _logVerbose(string.format('[MEDEVAC] Respawned %s at %.0f, %.0f', crewData.vehicleType, respawnPos.x, respawnPos.z)) - else - _logVerbose('[MEDEVAC] Failed to respawn vehicle: '..crewData.vehicleType) - end -end - --- Check if troops being unloaded are MEDEVAC crew and if inside MASH zone -function CTLD:CheckMEDEVACDelivery(group, troopData) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return false end - if not cfg.Salvage or not cfg.Salvage.Enabled then return false end - if not group or not group:IsAlive() then return false end - - local gname = group:GetName() - local crews = self:_CollectRescuedCrewsForGroup(gname) - if #crews == 0 then return false end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return false end - - if _isUnitInAir(unit) then - local delay = (cfg.AutoUnload and cfg.AutoUnload.UnloadDelay) or 2 - delay = math.max(1, math.ceil(delay or 0)) - _msgGroup(group, _fmtTemplate(CTLD.Messages.medevac_unload_hold, { - seconds = delay - }), 10) - return 'pending' - end - - local pos = unit:GetPointVec3() - local inMASH, mashZone = self:_IsPositionInMASHZone({ x = pos.x, z = pos.z }) - if not inMASH then return false end - - self:_EnsureMedevacUnloadState(group, mashZone, crews, { trigger = 'manual' }) - self:_UpdateMedevacUnloadStates() - - local remaining = self:_CollectRescuedCrewsForGroup(gname) - if #remaining == 0 then - return 'delivered' - end - - return 'pending' -end - --- Deliver MEDEVAC crew to MASH - award salvage points -function CTLD:_DeliverMEDEVACCrewToMASH(group, crewGroupName, crewData) - local cfg = CTLD.MEDEVAC.Salvage - if not cfg or not cfg.Enabled then return end - - -- Award salvage points - CTLD._salvagePoints[self.Side] = (CTLD._salvagePoints[self.Side] or 0) + crewData.salvageValue - - -- Message to coalition (shown after brief delay to let unload message be seen) - local msgId = timer.scheduleFunction(function() - _msgCoalition(self.Side, _fmtTemplate(CTLD.Messages.medevac_crew_delivered_mash, { - player = _playerNameFromGroup(group), - vehicle = crewData.vehicleType, - salvage = crewData.salvageValue, - total = CTLD._salvagePoints[self.Side] - }), 15) - end, nil, timer.getTime() + 3) - _trackOneShotTimer(msgId) - - -- Track statistics - if CTLD.MEDEVAC and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CTLD._medevacStats[self.Side].delivered = (CTLD._medevacStats[self.Side].delivered or 0) + 1 - CTLD._medevacStats[self.Side].salvageEarned = (CTLD._medevacStats[self.Side].salvageEarned or 0) + crewData.salvageValue - end - - -- Remove map marker - if crewData.markerID then - pcall(function() trigger.action.removeMark(crewData.markerID) end) - end - - -- Destroy crew group to prevent clutter - local crewGroup = Group.getByName(crewGroupName) - if crewGroup and crewGroup:isExist() then - crewGroup:destroy() - end - - -- Remove crew from tracking - CTLD._medevacCrews[crewGroupName] = nil - - if group and group:IsAlive() then - local gname = group:GetName() - if gname and gname ~= '' then - CTLD._medevacEnrouteStates = CTLD._medevacEnrouteStates or {} - CTLD._medevacEnrouteStates[gname] = nil - end - end - - _logVerbose(string.format('[MEDEVAC] Delivered %s crew to MASH - awarded %d salvage (total: %d)', - crewData.vehicleType, crewData.salvageValue, CTLD._salvagePoints[self.Side])) -end - --- Try to use salvage to spawn a crate when out of stock -function CTLD:_TryUseSalvageForCrate(group, crateKey, catalogEntry) - local cfg = CTLD.MEDEVAC and CTLD.MEDEVAC.Salvage - if not cfg or not cfg.Enabled then return false end - if not cfg.AutoApply then return false end - - -- Check if item has salvage value - local salvageCost = (catalogEntry and catalogEntry.salvageValue) or 0 - if salvageCost <= 0 then return false end - - -- Check if we have enough salvage - local available = CTLD._salvagePoints[self.Side] or 0 - if available < salvageCost then - -- Send insufficient salvage message - local deficit = salvageCost - available - _msgGroup(group, _fmtTemplate(CTLD.Messages.medevac_salvage_insufficient, { - need = salvageCost, - deficit = deficit - })) - return false - end - - -- Consume salvage - CTLD._salvagePoints[self.Side] = available - salvageCost - - -- Track statistics - if CTLD.MEDEVAC and CTLD.MEDEVAC.Statistics and CTLD.MEDEVAC.Statistics.Enabled then - CTLD._medevacStats[self.Side].salvageUsed = (CTLD._medevacStats[self.Side].salvageUsed or 0) + salvageCost - end - - -- Send success message - _msgGroup(group, _fmtTemplate(CTLD.Messages.medevac_salvage_used, { - item = self:_friendlyNameForKey(crateKey), - salvage = salvageCost, - remaining = CTLD._salvagePoints[self.Side] - })) - - _logVerbose(string.format('[Salvage] Used %d salvage for %s (remaining: %d)', - salvageCost, crateKey, CTLD._salvagePoints[self.Side])) - - return true -end - --- Check if salvage can cover a crate request (for bundle pre-checks) -function CTLD:_CanUseSalvageForCrate(crateKey, catalogEntry, quantity) - local cfg = CTLD.MEDEVAC and CTLD.MEDEVAC.Salvage - if not cfg or not cfg.Enabled then return false end - if not cfg.AutoApply then return false end - - quantity = quantity or 1 - local salvageCost = ((catalogEntry and catalogEntry.salvageValue) or 0) * quantity - if salvageCost <= 0 then return false end - - local available = CTLD._salvagePoints[self.Side] or 0 - return available >= salvageCost -end - --- Resolve the 2D position of a MASH zone, handling fixed and mobile variants -function CTLD:_ResolveMASHPosition(mashData, mashKey) - if not mashData then return nil end - - if mashData.position and mashData.position.x and mashData.position.z then - return { x = mashData.position.x, z = mashData.position.z } - end - - local zone = mashData.zone - if zone then - if zone.GetPointVec3 then - local ok, vec3 = pcall(function() return zone:GetPointVec3() end) - if ok and vec3 then - return { x = vec3.x, z = vec3.z } - end - end - if zone.GetPointVec2 then - local ok, vec2 = pcall(function() return zone:GetPointVec2() end) - if ok and vec2 then - return { x = vec2.x, z = vec2.y } - end - end - if zone.GetCoordinate then - local ok, coord = pcall(function() return zone:GetCoordinate() end) - if ok and coord then - local vec3 = coord.GetVec3 and coord:GetVec3() - if vec3 then - return { x = vec3.x, z = vec3.z } - end - end - end - end - - if mashKey and trigger and trigger.misc and trigger.misc.getZone then - local ok, zoneInfo = pcall(function() return trigger.misc.getZone(mashKey) end) - if ok and zoneInfo and zoneInfo.point then - return { x = zoneInfo.point.x, z = zoneInfo.point.z } - end - end - - return nil -end - --- Find the nearest friendly MASH zone to a given point (x/z expected) -function CTLD:_FindNearestMASHForPoint(point) - if not point then return nil end - - local nearestName, nearestData, nearestPos - local nearestDist = math.huge - - for name, data in pairs(CTLD._mashZones or {}) do - if data.side == self.Side then - local pos = self:_ResolveMASHPosition(data, name) - if pos then - local dx = pos.x - point.x - local dz = pos.z - point.z - local dist = math.sqrt(dx * dx + dz * dz) - if dist < nearestDist then - nearestDist = dist - nearestName = name - nearestData = data - nearestPos = pos - end - end - end - end - - if not nearestData or not nearestPos then - return nil - end - - local displayName = nearestData.displayName or nearestData.catalogKey - if not displayName then - local zone = nearestData.zone - if zone and zone.GetName then - local ok, zname = pcall(function() return zone:GetName() end) - if ok and zname then - displayName = zname - end - end - end - displayName = displayName or nearestName or 'MASH' - - return { - name = displayName, - position = nearestPos, - distance = nearestDist, - data = nearestData, - } -end - --- Build directional info toward the nearest MASH for a specific unit -function CTLD:_ComputeNearestMASHVector(unit) - if not unit or not unit:IsAlive() then return nil end - local pos = unit:GetPointVec3() - if not pos then return nil end - - local info = self:_FindNearestMASHForPoint({ x = pos.x, z = pos.z }) - if not info or not info.position then return nil end - - local bearing = _bearingDeg({ x = pos.x, z = pos.z }, info.position) - local isMetric = _getPlayerIsMetric(unit) - local rangeValue, rangeUnit = _fmtRange(info.distance, isMetric) - - if rangeUnit == 'm' and rangeValue >= 1000 then - rangeValue = _round(rangeValue / 1000, 1) - rangeUnit = 'km' - end - - local valueText - if math.abs(rangeValue - math.floor(rangeValue)) < 0.05 then - valueText = string.format('%d', math.floor(rangeValue + 0.5)) - else - valueText = string.format('%.1f', rangeValue) - end - - return { - name = info.name, - bearing = bearing, - rangeValue = valueText, - rangeUnit = rangeUnit, - } -end - --- Check if position is inside any MASH zone -function CTLD:_IsPositionInMASHZone(position) - for zoneName, mashData in pairs(CTLD._mashZones) do - if mashData.side == self.Side then - local zonePos = self:_ResolveMASHPosition(mashData, zoneName) - if zonePos then - local radius = mashData.radius or CTLD.MEDEVAC.MASHZoneRadius or 500 - local dx = position.x - zonePos.x - local dz = position.z - zonePos.z - local dist = math.sqrt(dx*dx + dz*dz) - - if dist <= radius then - return true, mashData - end - end - end - end - return false, nil -end - --- Initialize MASH zones from config -function CTLD:_InitMASHZones() - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then return end - - _logDebug('_InitMASHZones called for coalition '..tostring(self.Side)) - _logDebug('self.MASHZones count: '..tostring(#(self.MASHZones or {}))) - _logDebug('self.Config.Zones.MASHZones count: '..tostring(#(self.Config.Zones and self.Config.Zones.MASHZones or {}))) - - -- Fixed MASH zones are now initialized via InitZones() in the standard Zones structure - -- This function now focuses on setting up mobile MASH tracking and announcements - - if not CTLD._mashZones then CTLD._mashZones = {} end - - -- Register fixed MASH zones in the global _mashZones table for delivery detection - -- (mobile MASH zones will be added dynamically when built) - for _, mz in ipairs(self.MASHZones or {}) do - local name = mz:GetName() - local zdef = self._ZoneDefs.MASHZones[name] - CTLD._mashZones[name] = { - zone = mz, - side = self.Side, - isMobile = false, - radius = (zdef and zdef.radius) or cfg.MASHZoneRadius or 500, - freq = (zdef and zdef.freq) or nil - } - _logVerbose('[MEDEVAC] Registered fixed MASH zone: '..name) - end -end - --- ========================= --- MEDEVAC Menu Functions --- ========================= - --- List all active MEDEVAC requests -function CTLD:ListActiveMEDEVACRequests(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - local count = 0 - local lines = {} - table.insert(lines, '=== Active MEDEVAC Requests ===') - table.insert(lines, '') - - for crewGroupName, data in pairs(CTLD._medevacCrews or {}) do - if data.side == self.Side and data.requestTime then - count = count + 1 - local grid = self:_GetMGRSString(data.position) - local elapsed = timer.getTime() - data.requestTime - local remaining = (cfg.CrewTimeout or 3600) - elapsed - local remainMin = math.floor(remaining / 60) - - table.insert(lines, string.format('%d. %s crew', count, data.vehicleType)) - table.insert(lines, string.format(' Grid: %s', grid)) - table.insert(lines, string.format(' Crew Size: %d', data.crewSize or 2)) - table.insert(lines, string.format(' Salvage: %d points', data.salvageValue or 1)) - table.insert(lines, string.format(' Time Remaining: %d minutes', remainMin)) - table.insert(lines, '') - end - end - - if count == 0 then - table.insert(lines, 'No active MEDEVAC requests.') - table.insert(lines, '') - table.insert(lines, 'MEDEVAC missions appear when friendly vehicles') - table.insert(lines, 'are destroyed and crew survives to call for rescue.') - end - - _msgGroup(group, table.concat(lines, '\n'), 30) -end - --- Show nearest MEDEVAC location -function CTLD:NearestMEDEVACLocation(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - local unit = group:GetUnit(1) - if not unit then return end - - local pos = unit:GetCoordinate() - if not pos then return end - - local nearest = nil - local nearestDist = math.huge - - for crewGroupName, data in pairs(CTLD._medevacCrews or {}) do - if data.side == self.Side and data.requestTime then - local dist = math.sqrt((data.position.x - pos.x)^2 + (data.position.z - pos.z)^2) - if dist < nearestDist then - nearestDist = dist - nearest = data - end - end - end - - if not nearest then - _msgGroup(group, 'No active MEDEVAC requests.') - return - end - - local grid = self:_GetMGRSString(nearest.position) - local distKm = nearestDist / 1000 - local distNm = nearestDist / 1852 - local elapsed = timer.getTime() - nearest.requestTime - local remaining = (cfg.CrewTimeout or 3600) - elapsed - local remainMin = math.floor(remaining / 60) - - local lines = {} - table.insert(lines, '=== Nearest MEDEVAC ===') - table.insert(lines, '') - table.insert(lines, string.format('%s crew at %s', nearest.vehicleType, grid)) - table.insert(lines, string.format('Distance: %.1f km / %.1f nm', distKm, distNm)) - table.insert(lines, string.format('Crew Size: %d', nearest.crewSize or 2)) - table.insert(lines, string.format('Salvage Value: %d points', nearest.salvageValue or 1)) - table.insert(lines, string.format('Time Remaining: %d minutes', remainMin)) - - _msgGroup(group, table.concat(lines, '\n'), 20) -end - --- Show coalition salvage points -function CTLD:ShowSalvagePoints(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - local salvage = CTLD._salvagePoints[self.Side] or 0 - - local lines = {} - table.insert(lines, '=== Coalition Salvage Points ===') - table.insert(lines, '') - table.insert(lines, string.format('Current Balance: %d points', salvage)) - table.insert(lines, '') - table.insert(lines, 'Earn salvage by:') - table.insert(lines, '- Rescuing MEDEVAC crews and delivering them to a MASH zone') - table.insert(lines, '') - table.insert(lines, 'Use salvage to:') - table.insert(lines, '- Build items that are out of stock (automatic)') - table.insert(lines, '- Cost = item\'s required crate count') - - _msgGroup(group, table.concat(lines, '\n'), 20) -end - -function CTLD:ShowOnboardManifest(group) - if not group then return end - - local gname = group:GetName() - if not gname or gname == '' then return end - - self:_refreshLoadedTroopSummaryForGroup(gname) - - local lines = { '=== Onboard Manifest ===', '' } - local hasCargo = false - - local crateData = CTLD._loadedCrates[gname] - if crateData and crateData.byKey then - local keys = {} - for crateKey, count in pairs(crateData.byKey) do - if (count or 0) > 0 then - table.insert(keys, crateKey) - end - end - table.sort(keys, function(a, b) - return self:_lookupCrateLabel(a) < self:_lookupCrateLabel(b) - end) - for _, crateKey in ipairs(keys) do - local count = crateData.byKey[crateKey] or 0 - if count > 0 then - table.insert(lines, string.format('Crate: %s x %d', self:_lookupCrateLabel(crateKey), count)) - hasCargo = true - end - end - end - - local troopSummary = CTLD._loadedTroopTypes[gname] - if troopSummary and troopSummary.total and troopSummary.total > 0 then - local typeKeys = {} - for typeKey, _ in pairs(troopSummary.byType) do - if (troopSummary.byType[typeKey] or 0) > 0 then - table.insert(typeKeys, typeKey) - end - end - table.sort(typeKeys, function(a, b) - local la = troopSummary.labels and troopSummary.labels[a] or self:_lookupTroopLabel(a) - local lb = troopSummary.labels and troopSummary.labels[b] or self:_lookupTroopLabel(b) - return la < lb - end) - for _, typeKey in ipairs(typeKeys) do - local count = troopSummary.byType[typeKey] or 0 - if count > 0 then - local label = troopSummary.labels and troopSummary.labels[typeKey] or self:_lookupTroopLabel(typeKey) - table.insert(lines, string.format('Troop: %s x %d', label, count)) - hasCargo = true - end - end - end - - local crews = self:_CollectRescuedCrewsForGroup(gname) - if crews and #crews > 0 then - local crewTotals = {} - for _, crew in ipairs(crews) do - local data = crew.data or {} - local label = data.vehicleType or 'Wounded crew' - local size = data.crewSize or 0 - if size <= 0 then size = 1 end - crewTotals[label] = (crewTotals[label] or 0) + size - end - local labels = {} - for label, _ in pairs(crewTotals) do - table.insert(labels, label) - end - table.sort(labels) - for _, label in ipairs(labels) do - table.insert(lines, string.format('Wounded: %s x %d', label, crewTotals[label])) - end - hasCargo = true - end - - if not hasCargo then - table.insert(lines, 'Nothing onboard.') - end - - local salvage = CTLD._salvagePoints and (CTLD._salvagePoints[self.Side] or 0) or 0 - table.insert(lines, '') - table.insert(lines, string.format('Salvage: %d pts', salvage)) - - _msgGroup(group, table.concat(lines, '\n'), math.min(self.Config.MessageDuration or 20, 25)) -end - --- Vectors to nearest MEDEVAC (shows top 3 with time remaining) -function CTLD:VectorsToNearestMEDEVAC(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - local unit = group:GetUnit(1) - if not unit then return end - - local pos = unit:GetCoordinate() - if not pos then return end - - local heading = unit:GetHeading() or 0 - local isMetric = _getPlayerIsMetric(unit) - - -- Collect all active MEDEVAC requests with distance - local requests = {} - for crewGroupName, data in pairs(CTLD._medevacCrews or {}) do - if data.side == self.Side and data.requestTime and not data.pickedUp then - local dist = math.sqrt((data.position.x - pos.x)^2 + (data.position.z - pos.z)^2) - table.insert(requests, { - data = data, - distance = dist - }) - end - end - - if #requests == 0 then - _msgGroup(group, 'No active MEDEVAC requests.') - return - end - - -- Sort by distance (closest first) - table.sort(requests, function(a, b) return a.distance < b.distance end) - - -- Show top 3 (or fewer if less than 3 exist) - local lines = {} - table.insert(lines, 'MEDEVAC VECTORS (nearest 3):') - table.insert(lines, '') - - local maxShow = math.min(3, #requests) - for i = 1, maxShow do - local req = requests[i] - local data = req.data - local dist = req.distance - - local dx = data.position.x - pos.x - local dz = data.position.z - pos.z - local bearing = math.deg(math.atan2(dz, dx)) - if bearing < 0 then bearing = bearing + 360 end - - local relativeBrg = bearing - heading - if relativeBrg < 0 then relativeBrg = relativeBrg + 360 end - if relativeBrg > 180 then relativeBrg = relativeBrg - 360 end - - -- Calculate time remaining - local timeoutAt = data.spawnTime + (cfg.CrewTimeout or 3600) - local timeRemainSec = math.max(0, timeoutAt - timer.getTime()) - local timeRemainMin = math.floor(timeRemainSec / 60) - - -- Format distance - local distV, distU = _fmtRange(dist, isMetric) - - -- Build message for this crew - table.insert(lines, string.format('#%d: %s crew', i, data.vehicleType)) - table.insert(lines, string.format(' BRG %03d° (%+.0f° rel) | RNG %s %s', - math.floor(bearing + 0.5), relativeBrg, distV, distU)) - table.insert(lines, string.format(' Time left: %d min | Salvage: %d pts', - timeRemainMin, data.salvageValue or 1)) - - if i < maxShow then - table.insert(lines, '') - end - end - - _msgGroup(group, table.concat(lines, '\n'), 20) -end - --- List MASH locations -function CTLD:ListMASHLocations(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - local unit = group:GetUnit(1) - local playerPos = unit and unit:GetCoordinate() - local playerVec3 = nil - if playerPos then - if playerPos.GetVec3 then - local ok, vec = pcall(function() return playerPos:GetVec3() end) - if ok then playerVec3 = vec end - elseif playerPos.x and playerPos.z then - playerVec3 = playerPos - end - end - - local count = 0 - local lines = {} - table.insert(lines, '=== MASH Locations ===') - table.insert(lines, '') - - for name, data in pairs(CTLD._mashZones or {}) do - if data.side == self.Side then - count = count + 1 - - -- Get position from zone object - local position = nil - if data.position then - position = data.position - elseif data.zone and data.zone.GetCoordinate then - local coord = data.zone:GetCoordinate() - if coord then - position = {x = coord.x, z = coord.z} - end - end - - local grid = position and self:_GetMGRSString(position) or 'Unknown' - local typeStr = data.isMobile and 'Mobile' or 'Fixed' - local radius = tonumber(data.radius) or 500 - - local label = data.displayName or name - table.insert(lines, string.format('%d. MASH %s (%s)', count, label, typeStr)) - table.insert(lines, string.format(' Grid: %s', grid)) - table.insert(lines, string.format(' Radius: %d m', radius)) - - if playerVec3 and position then - local dist = math.sqrt((position.x - playerVec3.x)^2 + (position.z - playerVec3.z)^2) - local distKm = dist / 1000 - table.insert(lines, string.format(' Distance: %.1f km', distKm)) - end - - if data.freq then - local freq = tonumber(data.freq) - if freq then - table.insert(lines, string.format(' Beacon: %.2f MHz', freq)) - else - table.insert(lines, string.format(' Beacon: %s', tostring(data.freq))) - end - end - - table.insert(lines, '') - end - end - - if count == 0 then - table.insert(lines, 'No MASH zones configured.') - table.insert(lines, '') - table.insert(lines, 'MASH zones are where you deliver rescued') - table.insert(lines, 'MEDEVAC crews to earn salvage points.') - else - table.insert(lines, 'Deliver rescued crews to any MASH to earn salvage.') - end - - _msgGroup(group, table.concat(lines, '\n'), 30) -end - --- Pop smoke at all active MEDEVAC sites -function CTLD:PopSmokeAtMEDEVACSites(group) - _logVerbose('[MEDEVAC] PopSmokeAtMEDEVACSites called') - - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _logVerbose('[MEDEVAC] MEDEVAC system not enabled') - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - if not CTLD._medevacCrews then - _logVerbose('[MEDEVAC] No _medevacCrews table') - _msgGroup(group, 'No active MEDEVAC requests to mark with smoke.') - return - end - - local count = 0 - _logVerbose(string.format('[MEDEVAC] Checking %d crew entries', CTLD._medevacCrews and table.getn(CTLD._medevacCrews) or 0)) - - for crewGroupName, data in pairs(CTLD._medevacCrews) do - if data and data.side == self.Side and data.requestTime and data.position then - count = count + 1 - _logVerbose(string.format('[MEDEVAC] Popping smoke for crew %s', crewGroupName)) - - local smokeColor = (cfg.SmokeColor and cfg.SmokeColor[self.Side]) or trigger.smokeColor.Red - _spawnMEDEVACSmoke(data.position, smokeColor, cfg) - end - end - - _logVerbose(string.format('[MEDEVAC] Popped smoke at %d locations', count)) - - if count == 0 then - _msgGroup(group, 'No active MEDEVAC requests to mark with smoke.') - else - _msgGroup(group, string.format('Smoke popped at %d MEDEVAC location(s).', count), 10) - end -end - --- Pop smoke at MASH zones (delivery locations) -function CTLD:PopSmokeAtMASHZones(group) - _logVerbose('[MEDEVAC] PopSmokeAtMASHZones called') - - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _logVerbose('[MEDEVAC] MEDEVAC system not enabled') - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - if not CTLD._mashZones then - _msgGroup(group, 'No MASH zones configured.') - return - end - - local count = 0 - local smokeColor = trigger.smokeColor.Orange - - for name, data in pairs(CTLD._mashZones) do - if data and data.side == self.Side then - -- Get position from zone object - local position = nil - if data.position then - position = data.position - elseif data.zone and data.zone.GetCoordinate then - local coord = data.zone:GetCoordinate() - if coord then - position = {x = coord.x, z = coord.z} - end - end - - if position then - count = count + 1 - _spawnMEDEVACSmoke(position, smokeColor, cfg) - _logVerbose(string.format('[MEDEVAC] Popped smoke at MASH zone: %s', name)) - end - end - end - - if count == 0 then - _msgGroup(group, 'No MASH zones found for your coalition.') - else - _msgGroup(group, string.format('Smoke popped at %d MASH zone(s).', count), 10) - end -end - --- Clear all MEDEVAC missions (admin function) -function CTLD:ClearAllMEDEVACMissions(group) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _msgGroup(group, 'MEDEVAC system is not enabled.') - return - end - - local count = 0 - - for crewGroupName, data in pairs(CTLD._medevacCrews or {}) do - if data.side == self.Side then - count = count + 1 - self:_RemoveMEDEVACCrew(crewGroupName, 'admin_clear') - end - end - - _msgGroup(group, string.format('Cleared %d MEDEVAC mission(s).', count), 10) - _logVerbose(string.format('[MEDEVAC] Admin cleared %d MEDEVAC missions for coalition %s', count, self.Side)) -end - --- #endregion MEDEVAC - --- #region Mobile MASH - --- Create a Mobile MASH zone and start announcements -function CTLD:_CreateMobileMASH(group, position, catalogDef) - local cfg = CTLD.MEDEVAC - if not cfg or not cfg.Enabled then - _logDebug('[MobileMASH] Config missing or MEDEVAC disabled; aborting mobile deployment') - return - end - if not cfg.MobileMASH or not cfg.MobileMASH.Enabled then - _logDebug('[MobileMASH] MobileMASH feature disabled in config; aborting') - return - end - - if not position or not position.x or not position.z then - _logError('[MobileMASH] Missing build position; aborting Mobile MASH deployment') - return - end - - local groupNamePreview = 'unknown' - if group then - local okPreview, namePreview = pcall(function() return group:getName() end) - if okPreview and namePreview and namePreview ~= '' then groupNamePreview = namePreview end - end - _logVerbose(string.format('[MobileMASH] Build requested for group %s at (%.1f, %.1f)', groupNamePreview, position.x or 0, position.z or 0)) - - local function safeGetName(g) - if not g then return nil end - if g.getName then - local ok, name = pcall(function() return g:getName() end) - if ok and name and name ~= '' then return name end - end - if g.GetName then - local ok, name = pcall(function() return g:GetName() end) - if ok and name and name ~= '' then return name end - end - return nil - end - - local side = catalogDef.side or self.Side - if not side then - _logError('[MobileMASH] Unable to determine coalition side; aborting Mobile MASH deployment') - return - end - _logDebug(string.format('[MobileMASH] Using coalition side %s (%s)', tostring(side), tostring(catalogDef.side or self.Side))) - - CTLD._mobileMASHCounter = CTLD._mobileMASHCounter or { [coalition.side.BLUE] = 0, [coalition.side.RED] = 0 } - CTLD._mobileMASHCounter[side] = (CTLD._mobileMASHCounter[side] or 0) + 1 - local index = CTLD._mobileMASHCounter[side] - _logDebug(string.format('[MobileMASH] Assigned deployment index %d for side %s', index, tostring(side))) - - local mashId = string.format('MOBILE_MASH_%d_%d', side, index) - local displayName - if cfg.MobileMASH.AutoIncrementName == false then - displayName = catalogDef.description or mashId - else - displayName = string.format('Mobile MASH %d', index) - end - _logDebug(string.format('[MobileMASH] mashId=%s displayName=%s recipeDesc=%s', mashId, tostring(displayName), tostring(catalogDef.description))) - - local initialPos = { x = position.x, z = position.z } - local radius = cfg.MobileMASH.ZoneRadius or 500 - local beaconFreq = cfg.MobileMASH.BeaconFrequency or '30.0 FM' - local mashGroupName = safeGetName(group) - _logDebug(string.format('[MobileMASH] Initial position (%.1f, %.1f) radius %.1f freq %s groupName=%s', initialPos.x or 0, initialPos.z or 0, radius, tostring(beaconFreq), tostring(mashGroupName))) - - local function buildZoneObject(name, r, pos) - if ZONE_RADIUS and VECTOR2 and VECTOR2.New then - local ok, zoneObj = pcall(function() - local v2 = VECTOR2:New(pos.x, pos.z) - return ZONE_RADIUS:New(name, v2, r) - end) - if ok and zoneObj then - _logDebug('[MobileMASH] Created ZONE_RADIUS object for mobile MASH') - return zoneObj - end - if not ok then - _logDebug(string.format('[MobileMASH] ZONE_RADIUS creation failed: %s', tostring(zoneObj))) - end - end - local posCopy = { x = pos.x, z = pos.z } - _logDebug('[MobileMASH] Falling back to table-based zone representation') - local zoneObj = {} - function zoneObj:GetName() - return name - end - function zoneObj:GetPointVec3() - return { x = posCopy.x, y = 0, z = posCopy.z } - end - function zoneObj:GetRadius() - return r - end - function zoneObj:SetPointVec3(vec3) - if vec3 and vec3.x and vec3.z then - posCopy.x = vec3.x - posCopy.z = vec3.z - end - end - function zoneObj:SetVec2(vec2) - if vec2 and vec2.x and vec2.y then - posCopy.x = vec2.x - posCopy.z = vec2.y - end - end - return zoneObj - end - - local rawGroupHandle = group - - local function finalizeMobileMASH() - _logVerbose(string.format('[MobileMASH] Finalizing Mobile MASH %s', mashId)) - local mashGroupMoose = nil - if GROUP and GROUP.FindByName and not mashGroupName then - local ok, found = pcall(function() - -- coalition.addGroup sometimes renames groups; scan by coalition - if rawGroupHandle and rawGroupHandle.getName then - return GROUP:FindByName(rawGroupHandle:getName()) - end - return nil - end) - if ok and found then - mashGroupMoose = found - mashGroupName = mashGroupName or safeGetName(found) - end - elseif GROUP and GROUP.FindByName and mashGroupName then - local ok, found = pcall(function() return GROUP:FindByName(mashGroupName) end) - if ok and found then mashGroupMoose = found end - end - - local function resolveRawGroup() - if rawGroupHandle and rawGroupHandle.isExist and rawGroupHandle:isExist() then - return rawGroupHandle - end - if mashGroupName and Group and Group.getByName then - local ok, g = pcall(function() return Group.getByName(mashGroupName) end) - if ok and g then - rawGroupHandle = g - if g.isExist and g:isExist() then - return rawGroupHandle - end - elseif not ok then - _logDebug(string.format('[MobileMASH] resolveRawGroup Group.getByName error: %s', tostring(g))) - end - end - return nil - end - - local function groupIsAlive() - if mashGroupMoose and mashGroupMoose.IsAlive then - local ok, alive = pcall(function() return mashGroupMoose:IsAlive() end) - if ok and alive then return true end - if not ok then - _logDebug(string.format('[MobileMASH] groupIsAlive Moose check error: %s', tostring(alive))) - end - end - local g = resolveRawGroup() - if not g then return false end - local units = g:getUnits() - if not units then return false end - for _, u in ipairs(units) do - if u and u.isExist and u:isExist() then - return true - end - end - return false - end - - local function groupVec3() - if mashGroupMoose and mashGroupMoose.GetCoordinate then - local ok, coord = pcall(function() return mashGroupMoose:GetCoordinate() end) - if ok and coord then - local vec3 = coord.GetVec3 and coord:GetVec3() - if vec3 then return vec3 end - end - if not ok then - _logDebug(string.format('[MobileMASH] groupVec3 Moose coordinate error: %s', tostring(coord))) - end - end - local g = resolveRawGroup() - if g then - local units = g:getUnits() - if units and units[1] and units[1].getPoint then - local ok, point = pcall(function() return units[1]:getPoint() end) - if ok and point then return point end - end - end - return nil - end - - local zoneObj = buildZoneObject(displayName, radius, initialPos) - CTLD._mashZones = CTLD._mashZones or {} - - local mashData = { - id = mashId, - displayName = displayName, - position = { x = initialPos.x, z = initialPos.z }, - radius = radius, - side = side, - group = mashGroupMoose or rawGroupHandle, - groupName = mashGroupName, - isMobile = true, - catalogKey = catalogDef.description or 'Mobile MASH', - zone = zoneObj, - freq = beaconFreq, - } - - CTLD._mashZones[mashId] = mashData - _logDebug(string.format('[MobileMASH] Registered mashId=%s displayName=%s zoneRadius=%.1f freq=%s', mashId, displayName, radius, tostring(beaconFreq))) - - self._ZoneDefs = self._ZoneDefs or { PickupZones = {}, DropZones = {}, FOBZones = {}, MASHZones = {} } - self._ZoneDefs.MASHZones = self._ZoneDefs.MASHZones or {} - self._ZoneDefs.MASHZones[displayName] = { name = displayName, radius = radius, active = true, freq = beaconFreq } - - self._ZoneActive = self._ZoneActive or { Pickup = {}, Drop = {}, FOB = {}, MASH = {} } - self._ZoneActive.MASH = self._ZoneActive.MASH or {} - self._ZoneActive.MASH[displayName] = true - - local md = self.Config and self.Config.MapDraw or {} - if md.Enabled then - local ok, err = pcall(function() self:DrawZonesOnMap() end) - if not ok then - _logError(string.format('DrawZonesOnMap failed after Mobile MASH creation: %s', tostring(err))) - end - else - local circleId = _nextMarkupId() - local textId = _nextMarkupId() - local p = { x = initialPos.x, y = 0, z = initialPos.z } - - local colors = cfg.MASHZoneColors or {} - local borderColor = colors.border or {1, 1, 0, 0.85} - local fillColor = colors.fill or {1, 0.75, 0.8, 0.25} - - trigger.action.circleToCoalition(side, circleId, p, radius, borderColor, fillColor, 1, true, "") - - local textPos = { x = p.x, y = 0, z = p.z - radius - 50 } - trigger.action.textToCoalition(side, textId, textPos, {1,1,1,0.9}, {0,0,0,0}, 18, true, displayName) - - mashData.circleId = circleId - mashData.textId = textId - _logDebug(string.format('[MobileMASH] Drawn map circleId=%d textId=%d', circleId, textId)) - end - - local gridStr = self:_GetMGRSString(initialPos) - trigger.action.outTextForCoalition(side, _fmtTemplate(CTLD.Messages.medevac_mash_deployed, { - mash_id = index, - grid = gridStr, - freq = beaconFreq, - }), 30) - _logInfo(string.format('[MobileMASH] Mobile MASH "%s" registered at %s', displayName, gridStr)) - - if cfg.MobileMASH.AnnouncementInterval and cfg.MobileMASH.AnnouncementInterval > 0 then - local ctldInstance = self - local scheduler = SCHEDULER:New(nil, function() - local ok, err = pcall(function() - if not groupIsAlive() then - ctldInstance:_RemoveMobileMASH(mashId) - return - end - - local vec3 = groupVec3() - if vec3 then - mashData.position = { x = vec3.x, z = vec3.z } - if mashData.zone then - if mashData.zone.SetPointVec3 then - mashData.zone:SetPointVec3({ x = vec3.x, y = vec3.y or 0, z = vec3.z }) - elseif mashData.zone.SetVec2 then - mashData.zone:SetVec2({ x = vec3.x, y = vec3.z }) - end - end - local currentGrid = ctldInstance:_GetMGRSString({ x = vec3.x, z = vec3.z }) - trigger.action.outTextForCoalition(side, _fmtTemplate(CTLD.Messages.medevac_mash_announcement, { - mash_id = index, - grid = currentGrid, - freq = beaconFreq, - }), 20) - _logDebug(string.format('[MobileMASH] Announcement tick for %s at grid %s', displayName, tostring(currentGrid))) - end - end) - if not ok then _logError('Mobile MASH announcement scheduler error: '..tostring(err)) end - end, {}, cfg.MobileMASH.AnnouncementInterval, cfg.MobileMASH.AnnouncementInterval) - - mashData.scheduler = scheduler - _logDebug(string.format('[MobileMASH] Announcement scheduler started every %.1fs', cfg.MobileMASH.AnnouncementInterval)) - end - - if EVENTHANDLER then - local ctldInstance = self - local eventHandler = EVENTHANDLER:New() - eventHandler:HandleEvent(EVENTS.Dead) - - function eventHandler:OnEventDead(EventData) - local killedName = EventData.IniGroupName or (EventData.IniGroup and EventData.IniGroup:GetName()) - if killedName and killedName == mashGroupName then - ctldInstance:_RemoveMobileMASH(mashId) - end - end - - mashData.eventHandler = eventHandler - _logDebug(string.format('[MobileMASH] Event handler registered for group %s', tostring(mashGroupName))) - end - end - - if timer and timer.scheduleFunction and timer.getTime then - _logDebug('[MobileMASH] Scheduling finalizeMobileMASH via timer') - timer.scheduleFunction(function(_args, _time) - local ok, err = pcall(finalizeMobileMASH) - if not ok then - _logError(string.format('[MobileMASH] finalize failed: %s', tostring(err))) - end - return nil - end, {}, timer.getTime() + 0.2) - else - _logDebug('[MobileMASH] timer.scheduleFunction unavailable, running finalizeMobileMASH inline') - local ok, err = pcall(finalizeMobileMASH) - if not ok then - _logError(string.format('[MobileMASH] finalize failed: %s', tostring(err))) - end - end -end - --- Remove a Mobile MASH zone (on destruction or manual removal) -function CTLD:_RemoveMobileMASH(mashId) - if not CTLD._mashZones then return end - - local mash = CTLD._mashZones[mashId] - if mash then - -- Stop scheduler - if mash.scheduler then - mash.scheduler:Stop() - end - - -- Remove map drawings - if mash.circleId then trigger.action.removeMark(mash.circleId) end - if mash.textId then trigger.action.removeMark(mash.textId) end - local name = mash.displayName or mashId - if self._ZoneDefs and self._ZoneDefs.MASHZones then self._ZoneDefs.MASHZones[name] = nil end - if self._ZoneActive and self._ZoneActive.MASH then self._ZoneActive.MASH[name] = nil end - self:_removeZoneDrawing('MASH', name) - - -- Send destruction message - local msg = _fmtTemplate(CTLD.Messages.medevac_mash_destroyed, { - mash_id = string.match(mashId, 'MOBILE_MASH_%d+_(%d+)') or '?' - }) - trigger.action.outTextForCoalition(mash.side, msg, 20) - - -- Remove from table - CTLD._mashZones[mashId] = nil - _logVerbose(string.format('[MobileMASH] Removed MASH %s', mashId)) - if self.Config and self.Config.MapDraw and self.Config.MapDraw.Enabled then - pcall(function() self:DrawZonesOnMap() end) - end - end -end - --- #endregion Mobile MASH - --- #endregion Inventory helpers - --- Create a new Drop Zone (AO) at the player's current location and draw it on the map if enabled -function CTLD:CreateDropZoneAtGroup(group) - if not group or not group:IsAlive() then return end - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - -- Prevent creating a Drop Zone inside or too close to a Pickup Zone - -- 1) Block if inside a (potentially active-only) pickup zone - local activeOnlyForInside = (self.Config and self.Config.ForbidChecksActivePickupOnly ~= false) - local inside, pz, distInside, pr = self:_isUnitInsidePickupZone(unit, activeOnlyForInside) - if inside then - local isMetric = _getPlayerIsMetric(unit) - local curV, curU = _fmtRange(distInside or 0, isMetric) - local needV, needU = _fmtRange(self.Config.MinDropZoneDistanceFromPickup or 10000, isMetric) - _eventSend(self, group, nil, 'drop_zone_too_close_to_pickup', { - zone = (pz and pz.GetName and pz:GetName()) or '(pickup)', - need = needV, need_u = needU, - dist = curV, dist_u = curU, - }) - return - end - -- 2) Enforce a minimum distance from the nearest pickup zone (configurable) - local minD = tonumber(self.Config and self.Config.MinDropZoneDistanceFromPickup) or 0 - if minD > 0 then - local considerActive = (self.Config and self.Config.MinDropDistanceActivePickupOnly ~= false) - local nearestZone, nearestDist - if considerActive then - nearestZone, nearestDist = self:_nearestActivePickupZone(unit) - else - local list = (self.Config and self.Config.Zones and self.Config.Zones.PickupZones) or {} - nearestZone, nearestDist = _nearestZonePoint(unit, list) - end - if nearestZone and nearestDist and nearestDist < minD then - local isMetric = _getPlayerIsMetric(unit) - local needV, needU = _fmtRange(minD, isMetric) - local curV, curU = _fmtRange(nearestDist, isMetric) - _eventSend(self, group, nil, 'drop_zone_too_close_to_pickup', { - zone = (nearestZone and nearestZone.GetName and nearestZone:GetName()) or '(pickup)', - need = needV, need_u = needU, - dist = curV, dist_u = curU, - }) - return - end - end - local p = unit:GetPointVec3() - local baseName = group:GetName() or 'GROUP' - local safe = tostring(baseName):gsub('%W', '') - local name = string.format('AO_%s_%d', safe, math.random(100000,999999)) - local r = tonumber(self.Config and self.Config.DropZoneRadius) or 250 - local v2 = (VECTOR2 and VECTOR2.New) and VECTOR2:New(p.x, p.z) or { x = p.x, y = p.z } - local mz = ZONE_RADIUS:New(name, v2, r) - -- Register in runtime and config so other features can find it - self.DropZones = self.DropZones or {} - table.insert(self.DropZones, mz) - self._ZoneDefs = self._ZoneDefs or { PickupZones = {}, DropZones = {}, FOBZones = {} } - self._ZoneDefs.DropZones[name] = { name = name, radius = r, active = true } - self._ZoneActive = self._ZoneActive or { Pickup = {}, Drop = {}, FOB = {} } - self._ZoneActive.Drop[name] = true - self.Config.Zones = self.Config.Zones or { PickupZones = {}, DropZones = {}, FOBZones = {} } - self.Config.Zones.DropZones = self.Config.Zones.DropZones or {} - table.insert(self.Config.Zones.DropZones, { name = name, radius = r, active = true }) - -- Draw on map if configured - local md = self.Config and self.Config.MapDraw or {} - if md.Enabled and (md.DrawDropZones ~= false) then - local ok, err = pcall(function() self:DrawZonesOnMap() end) - if not ok then - _logError(string.format('DrawZonesOnMap failed after creating drop zone %s: %s', name, tostring(err))) - end - end - MESSAGE:New(string.format('Drop Zone created: %s (r≈%dm)', name, r), 10):ToGroup(group) -end - -function CTLD:AddPickupZone(z) - local mz = _findZone(z) - if mz then table.insert(self.PickupZones, mz); table.insert(self.Config.Zones.PickupZones, z) end -end - -function CTLD:AddDropZone(z) - local mz = _findZone(z) - if mz then table.insert(self.DropZones, mz); table.insert(self.Config.Zones.DropZones, z) end -end - -function CTLD:SetAllowedAircraft(list) - self.Config.AllowedAircraft = DeepCopy(list) -end - --- Explicit cleanup handler for mission end --- Call this to properly shut down all CTLD schedulers and clear state -function CTLD:Cleanup() - _logInfo('Cleanup initiated - stopping all schedulers and clearing state') - - -- Stop all smoke refresh schedulers - if CTLD._smokeRefreshSchedules then - for crateId, schedule in pairs(CTLD._smokeRefreshSchedules) do - if schedule.funcId then - pcall(function() timer.removeFunction(schedule.funcId) end) - end - end - CTLD._smokeRefreshSchedules = {} - end - - -- Stop all Mobile MASH schedulers - if CTLD._mashZones then - for mashId, mash in pairs(CTLD._mashZones) do - if mash.scheduler then - pcall(function() mash.scheduler:Stop() end) - end - if mash.eventHandler then - -- Event handlers clean themselves up, but we can nil the reference - mash.eventHandler = nil - end - end - end - - -- Stop any MEDEVAC timeout checkers or other schedulers - -- (If you add schedulers in the future, stop them here) - if self.MEDEVACSched then - pcall(function() self.MEDEVACSched:Stop() end) - self.MEDEVACSched = nil - end - if self.SalvageSched then - pcall(function() self.SalvageSched:Stop() end) - self.SalvageSched = nil - end - - -- Clear spatial grid - CTLD._spatialGrid = {} - - -- Clear state tables (optional - helps with memory in long-running missions) - CTLD._crates = {} - CTLD._troopsLoaded = {} - CTLD._loadedCrates = {} - CTLD._loadedTroopTypes = {} - CTLD._deployedTroops = {} - CTLD._hoverState = {} - CTLD._unitLast = {} - CTLD._coachState = {} - CTLD._msgState = {} - CTLD._buildConfirm = {} - CTLD._buildCooldown = {} - CTLD._jtacReservedCodes = { [coalition.side.BLUE] = {}, [coalition.side.RED] = {}, [coalition.side.NEUTRAL] = {} } - if self._loadedCrateMenus then - for _,state in pairs(self._loadedCrateMenus) do - if state and state.commands then - for _,cmd in ipairs(state.commands) do - if cmd and cmd.Remove then pcall(function() cmd:Remove() end) end - end - end - end - self._loadedCrateMenus = {} - end - - -- Clear salvage state - if CTLD._salvageCrates then - for crateName, meta in pairs(CTLD._salvageCrates) do - if meta.staticObject and meta.staticObject.destroy then - pcall(function() meta.staticObject:destroy() end) - end - end - CTLD._salvageCrates = {} - end - if self.JTACSched then - pcall(function() self.JTACSched:Stop() end) - self.JTACSched = nil - end - if self._jtacRegistry then - for groupName in pairs(self._jtacRegistry) do - self:_cleanupJTACEntry(groupName) - end - self._jtacRegistry = {} - end - - _logInfo('Cleanup complete') -end - --- Register mission end event to auto-cleanup --- This ensures resources are properly released -if not CTLD._cleanupHandlerRegistered then - CTLD._cleanupHandlerRegistered = true - - local cleanupHandler = EVENTHANDLER:New() - cleanupHandler:HandleEvent(EVENTS.MissionEnd) - - function cleanupHandler:OnEventMissionEnd(EventData) - _logInfo('Mission end detected - initiating cleanup') - -- Cleanup all instances - for _, instance in pairs(CTLD._instances or {}) do - if instance and instance.Cleanup then - pcall(function() instance:Cleanup() end) - end - end - -- Also call static cleanup - if CTLD.Cleanup then - pcall(function() CTLD:Cleanup() end) - end - end -end - --- #endregion Public helpers - --- ========================= --- Sling-Load Salvage System --- ========================= --- #region SlingLoadSalvage - --- Spawn a salvage crate when an enemy ground unit dies -function CTLD:_SpawnSlingLoadSalvageCrate(unitPos, unitTypeName, enemySide, eventData) - local cfg = self.Config.SlingLoadSalvage - if not cfg or not cfg.Enabled then return end - - -- Check spawn chance for this coalition - local spawnChance = cfg.SpawnChance[enemySide] or 0.15 - if math.random() > spawnChance then - _logVerbose(string.format('[SlingLoadSalvage] Spawn roll failed (%.2f chance)', spawnChance)) - return - end - - -- Check spawn restrictions - if cfg.NoSpawnNearPickupZones then - local minDist = cfg.NoSpawnNearPickupZoneDistance or 1000 - for _, zone in ipairs(self.PickupZones or {}) do - local zoneName = zone:GetName() - if zoneName and (self._ZoneActive.Pickup[zoneName] ~= false) then - local zonePos = zone:GetPointVec3() - local dist = math.sqrt((unitPos.x - zonePos.x)^2 + (unitPos.z - zonePos.z)^2) - if dist < minDist then - _logVerbose('[SlingLoadSalvage] Too close to pickup zone, aborting spawn') - return - end - end - end - end - - if cfg.NoSpawnNearAirbasesKm and cfg.NoSpawnNearAirbasesKm > 0 then - local airbases = coalition.getAirbases(enemySide) - if airbases then - local minDistKm = cfg.NoSpawnNearAirbasesKm * 1000 - for _, ab in ipairs(airbases) do - local abPos = ab:getPoint() - local dist = math.sqrt((unitPos.x - abPos.x)^2 + (unitPos.z - abPos.z)^2) - if dist < minDistKm then - _logVerbose('[SlingLoadSalvage] Too close to airbase, aborting spawn') - return - end - end - end - end - - -- Select weight class - local totalProb = 0 - for _, wc in ipairs(cfg.WeightClasses) do - totalProb = totalProb + wc.probability - end - local roll = math.random() * totalProb - local cumulative = 0 - local selectedClass = cfg.WeightClasses[1] -- fallback - for _, wc in ipairs(cfg.WeightClasses) do - cumulative = cumulative + wc.probability - if roll <= cumulative then - selectedClass = wc - break - end - end - - local weight = math.random(selectedClass.min, selectedClass.max) - local rewardValue = math.floor((weight / 500) * selectedClass.rewardPer500kg) - - -- Calculate spawn position - local minDist = cfg.MinSpawnDistance or 10 - local maxDist = cfg.MaxSpawnDistance or 25 - local distance = minDist + math.random() * (maxDist - minDist) - local angle = math.random() * 2 * math.pi - local spawnPos = { - x = unitPos.x + math.cos(angle) * distance, - z = unitPos.z + math.sin(angle) * distance - } - - -- Get land height - local landHeight = land.getHeight({ x = spawnPos.x, y = spawnPos.z }) - - -- Select cargo type based on weight - local cargoType - if weight < 1500 then - -- Light: barrels or ammo pallets - local lightTypes = { 'barrels_cargo', 'ammo_cargo' } - cargoType = lightTypes[math.random(1, #lightTypes)] - elseif weight < 2500 then - -- Medium: fuel tanks or containers - local mediumTypes = { 'fueltank_cargo', 'container_cargo', 'ammo_cargo' } - cargoType = mediumTypes[math.random(1, #mediumTypes)] - else - -- Heavy: large containers only - cargoType = 'container_cargo' - end - - -- Create unique crate name - -- Use prefix that matches the coalition allowed to collect this crate - local sidePrefix = (enemySide == coalition.side.BLUE) and 'B' or 'R' - local crateName = string.format('SALVAGE-%s-%04dKG-%06d', sidePrefix, weight, math.random(100000, 999999)) - - -- Enforce active salvage crate cap before spawning - if cfg.MaxActiveCrates then - local activeCount = 0 - for cname, meta in pairs(CTLD._salvageCrates or {}) do - if meta and meta.side == enemySide then - activeCount = activeCount + 1 - end - end - if activeCount >= cfg.MaxActiveCrates then - _logVerbose(string.format('[SlingLoadSalvage] Max active crates (%d) reached for side %d; skipping spawn', cfg.MaxActiveCrates, enemySide)) - return - end - end - - -- Spawn the static cargo - -- Spawn the crate for the coalition that can recover it (enemySide) - local countryId = nil - if CTLD._instances then - for _, inst in ipairs(CTLD._instances) do - if inst and inst.Side == enemySide and inst.CountryId then - countryId = inst.CountryId - break - end - end - end - if not countryId then - countryId = _defaultCountryForSide(enemySide) - end - - local staticData = { - ['type'] = cargoType, - ['name'] = crateName, - ['x'] = spawnPos.x, - ['y'] = spawnPos.z, - ['heading'] = math.random() * 2 * math.pi, - ['canCargo'] = true, - ['mass'] = weight, - } - - local success, staticObj = pcall(function() - return coalition.addStaticObject(countryId, staticData) - end) - - if not success or not staticObj then - _logError('[SlingLoadSalvage] Failed to spawn salvage crate: ' .. tostring(staticObj)) - return - end - - -- Store crate metadata - CTLD._salvageCrates[crateName] = { - side = enemySide, - weight = weight, - spawnTime = timer.getTime(), - position = spawnPos, - initialHealth = 1.0, - rewardValue = rewardValue, - warningsSent = {}, - staticObject = staticObj, - crateClass = selectedClass.name, - } - - -- Update stats - if not CTLD._salvageStats[enemySide] then - CTLD._salvageStats[enemySide] = { spawned = 0, delivered = 0, expired = 0, totalWeight = 0, totalReward = 0 } - end - CTLD._salvageStats[enemySide].spawned = CTLD._salvageStats[enemySide].spawned + 1 - - -- Spawn smoke if enabled (use unified crate smoke offset logic) - if cfg.SpawnSmoke then - local smokeColor = cfg.SmokeColor or trigger.smokeColor.Orange - -- Reuse crate smoke offset parameters but force Enabled for salvage spawn event - local baseCfg = self.Config.CrateSmoke or {} - local smokeConfig = { - Enabled = true, -- always allow initial salvage smoke when SlingLoadSalvage.SpawnSmoke = true - AutoRefresh = false, -- do not auto-refresh salvage smoke unless we explicitly add support later - RefreshInterval = baseCfg.RefreshInterval, - MaxRefreshDuration = baseCfg.MaxRefreshDuration, - OffsetMeters = baseCfg.OffsetMeters, - OffsetRandom = (baseCfg.OffsetRandom ~= false), - OffsetVertical = baseCfg.OffsetVertical, - } - -- Provide a position table compatible with _spawnCrateSmoke (y = ground height) - _spawnCrateSmoke({ x = spawnPos.x, y = landHeight, z = spawnPos.z }, smokeColor, smokeConfig, crateName) - end - - -- Calculate expiration time - local lifetime = cfg.CrateLifetime or 10800 - local timeRemainMin = math.floor(lifetime / 60) - local timeRemainHrs = math.floor(timeRemainMin / 60) - local timeRemainStr - if timeRemainHrs >= 1 then - timeRemainStr = string.format("%d hr%s", timeRemainHrs, timeRemainHrs > 1 and "s" or "") - else - timeRemainStr = string.format("%d min%s", timeRemainMin, timeRemainMin > 1 and "s" or "") - end - local grid = self:_GetMGRSString(spawnPos) - - -- Announce to coalition - local msg = _fmtTemplate(self.Messages.slingload_salvage_spawned, { - grid = grid, - weight = weight, - reward = rewardValue, - time_remain = timeRemainStr, - }) - _msgCoalition(enemySide, msg) - - _logInfo(string.format('[SlingLoadSalvage] Spawned %s: weight=%dkg, reward=%dpts at %s', - crateName, weight, rewardValue, grid)) -end - --- Check salvage crates for delivery and cleanup -function CTLD:_CheckSlingLoadSalvageCrates() - local cfg = self.Config.SlingLoadSalvage - if not cfg or not cfg.Enabled then return end - - local now = timer.getTime() - local cratesToRemove = {} - - for crateName, meta in pairs(CTLD._salvageCrates) do - if meta.side == self.Side then - local elapsed = now - meta.spawnTime - local lifetime = cfg.CrateLifetime or 10800 - - -- Check for expiration - if elapsed >= lifetime then - table.insert(cratesToRemove, crateName) - - -- Update stats - CTLD._salvageStats[meta.side].expired = CTLD._salvageStats[meta.side].expired + 1 - - -- Announce expiration - local grid = self:_GetMGRSString(meta.position) - local msg = _fmtTemplate(self.Messages.slingload_salvage_expired, { - id = crateName, - grid = grid, - }) - _msgCoalition(meta.side, msg) - - -- Remove the static object - if meta.staticObject and meta.staticObject.destroy then - pcall(function() meta.staticObject:destroy() end) - end - - _logVerbose(string.format('[SlingLoadSalvage] Crate %s expired', crateName)) - - else - -- Check for warnings - local remaining = lifetime - elapsed - for _, warnTime in ipairs(cfg.WarningTimes or { 1800, 300 }) do - if remaining <= warnTime and not meta.warningsSent[warnTime] then - meta.warningsSent[warnTime] = true - local grid = self:_GetMGRSString(meta.position) - local msgKey = (warnTime >= 1800) and 'slingload_salvage_warn_30min' or 'slingload_salvage_warn_5min' - local msg = _fmtTemplate(self.Messages[msgKey], { - id = crateName, - grid = grid, - weight = meta.weight, - }) - _msgCoalition(meta.side, msg) - end - end - - -- Check if crate is in a salvage zone - if meta.staticObject and meta.staticObject:isExist() then - local cratePos = meta.staticObject:getPoint() - if cratePos then - -- Check all salvage zones for this coalition - for _, zone in ipairs(self.SalvageDropZones or {}) do - local zoneName = zone:GetName() - local zoneDef = self._ZoneDefs.SalvageDropZones[zoneName] - - if zoneDef and zoneDef.side == meta.side and (self._ZoneActive.SalvageDrop[zoneName] ~= false) then - -- cratePos is a DCS Vec3 table, so use the direct Vec3 helper to avoid GetVec2 calls - if zone:IsVec3InZone(cratePos) then - -- Simple CTLD.lua style: just check if crate is in air - local crateHooked = _isCrateHooked(meta.staticObject) - - if not crateHooked then - -- Crate is on the ground in the zone - deliver it! - _logInfo(string.format('[SlingLoadSalvage] Delivering %s', crateName)) - self:_DeliverSlingLoadSalvageCrate(crateName, meta, zoneName) - table.insert(cratesToRemove, crateName) - break - else - -- Crate is still hooked - send hint and wait for release - self:_SendSalvageHint(meta, 'slingload_salvage_hooked_in_zone', { - id = crateName, - zone = zoneName, - }, cratePos, 8) - _logDebug(string.format('[SlingLoadSalvage] Crate %s still hooked, waiting for release', crateName)) - end - end - end - end - -- Provide guidance if crate is lingering inside other zone types - self:_CheckCrateZoneHints(crateName, meta, cratePos) - end - else - -- Crate no longer exists (destroyed or removed) - table.insert(cratesToRemove, crateName) - _logVerbose(string.format('[SlingLoadSalvage] Crate %s no longer exists', crateName)) - end - end - end - end - - -- Remove processed crates - for _, crateName in ipairs(cratesToRemove) do - CTLD._salvageCrates[crateName] = nil - end -end - --- Deliver a salvage crate and award points -function CTLD:_DeliverSlingLoadSalvageCrate(crateName, meta, zoneName) - local cfg = self.Config.SlingLoadSalvage - - -- Check crate health for condition multiplier - local healthRatio = 1.0 - if meta.staticObject and meta.staticObject.getLife then - local success, currentLife = pcall(function() return meta.staticObject:getLife() end) - if success and currentLife then - local success2, maxLife = pcall(function() return meta.staticObject:getLife0() end) - if success2 and maxLife and maxLife > 0 then - healthRatio = currentLife / maxLife - end - end - end - - -- Determine condition multiplier - local conditionMult = cfg.ConditionMultipliers.Damaged or 1.0 - local conditionLabel = "Damaged" - if healthRatio >= 0.9 then - conditionMult = cfg.ConditionMultipliers.Undamaged or 1.5 - conditionLabel = "Undamaged" - elseif healthRatio < 0.5 then - conditionMult = cfg.ConditionMultipliers.HeavyDamage or 0.5 - conditionLabel = "Heavy Damage" - end - - -- Calculate final reward - local finalReward = math.floor(meta.rewardValue * conditionMult) - - -- Award salvage points - CTLD._salvagePoints[meta.side] = (CTLD._salvagePoints[meta.side] or 0) + finalReward - - -- Update stats - CTLD._salvageStats[meta.side].delivered = CTLD._salvageStats[meta.side].delivered + 1 - CTLD._salvageStats[meta.side].totalWeight = CTLD._salvageStats[meta.side].totalWeight + meta.weight - CTLD._salvageStats[meta.side].totalReward = CTLD._salvageStats[meta.side].totalReward + finalReward - - -- Find the player who delivered (nearest transport helo in zone) - local playerName = "Unknown Pilot" - local deliveryUnit = nil - for _, zone in ipairs(self.SalvageDropZones or {}) do - if zone:GetName() == zoneName then - -- Find nearby friendly helicopters - local zonePos = zone:GetPointVec3() - local radius = self:_getZoneRadius(zone) or 300 - local nearbyUnits = {} - - -- Search for units in the zone - local sphere = _buildSphereVolume(zonePos, radius) - - local foundUnits = {} - world.searchObjects(Object.Category.UNIT, sphere, function(obj) - if obj and obj:isExist() and obj.getCoalition then - local objCoal = obj:getCoalition() - if objCoal == meta.side and obj.getGroup then - local grp = obj:getGroup() - if grp then - local grpName = grp:getName() - table.insert(foundUnits, { unit = obj, group = grp, groupName = grpName }) - end - end - end - return true - end) - - -- Find player name from group - if #foundUnits > 0 then - deliveryUnit = foundUnits[1].unit - local grpName = foundUnits[1].groupName - if grpName then - -- Try to extract player name from group - local mooseGrp = GROUP:FindByName(grpName) - if mooseGrp then - local unit1 = mooseGrp:GetUnit(1) - if unit1 then - local pName = unit1:GetPlayerName() - if pName and pName ~= '' then - playerName = pName - else - playerName = grpName - end - end - end - end - end - break - end - end - - -- Announce delivery - local msg = _fmtTemplate(self.Messages.slingload_salvage_delivered, { - player = playerName, - weight = meta.weight, - reward = finalReward, - condition = conditionLabel, - total = CTLD._salvagePoints[meta.side], - }) - local quip - local quipPool = self.Messages.slingload_salvage_received_quips - if quipPool and #quipPool > 0 then - local template = quipPool[math.random(#quipPool)] - if template and template ~= '' then - quip = _fmtTemplate(template, { - player = playerName, - zone = zoneName, - reward = finalReward, - weight = meta.weight, - condition = conditionLabel, - total = CTLD._salvagePoints[meta.side], - coalition = (self.Side == coalition.side.BLUE) and 'BLUE' or 'RED', - }) - end - end - if quip and quip ~= '' then - msg = msg .. '\n' .. quip - end - _msgCoalition(meta.side, msg) - - -- Remove the crate - if meta.staticObject and meta.staticObject.destroy then - pcall(function() meta.staticObject:destroy() end) - end - - _logInfo(string.format('[SlingLoadSalvage] %s delivered %s: %dkg, %dpts (%s), total=%d', - playerName, crateName, meta.weight, finalReward, conditionLabel, CTLD._salvagePoints[meta.side])) -end - --- Menu: Create Salvage Zone at group position -function CTLD:CreateSalvageZoneAtGroup(group) - local cfg = self.Config.SlingLoadSalvage - if not cfg or not cfg.Enabled then - _msgGroup(group, 'Sling-Load Salvage system is disabled.') - return - end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local pos = unit:GetPointVec3() - local coord = COORDINATE:NewFromVec3(pos) - local radius = cfg.DefaultZoneRadius or 300 - - self._DynamicSalvageZones = self._DynamicSalvageZones or {} - self._DynamicSalvageQueue = self._DynamicSalvageQueue or {} - - -- Pre-clean existing dynamics so limit checks are up to date - self:_enforceDynamicSalvageZoneLimit() - - -- Generate unique zone name - local zoneName = string.format('SalvageZone-%s-%d', (self.Side == coalition.side.BLUE and 'BLUE' or 'RED'), - math.random(1000, 9999)) - - -- Create MOOSE zone - local zone = ZONE_RADIUS:New(zoneName, coord:GetVec2(), radius) - - -- Add to instance zones - table.insert(self.SalvageDropZones, zone) - local now = timer and timer.getTime and timer.getTime() or 0 - local lifetime = tonumber(cfg.DynamicZoneLifetime or 0) or 0 - local expiresAt = (lifetime > 0) and (now + lifetime) or nil - - self._ZoneDefs.SalvageDropZones[zoneName] = { - name = zoneName, - side = self.Side, - active = true, - radius = radius, - dynamic = true, - createdAt = now, - expiresAt = expiresAt, - } - self._ZoneActive.SalvageDrop[zoneName] = true - - -- Track dynamic zone metadata for cleanup enforcement - self._DynamicSalvageZones[zoneName] = { - zone = zone, - createdAt = now, - expiresAt = expiresAt, - radius = radius, - } - table.insert(self._DynamicSalvageQueue, zoneName) - - -- Enforce limits after registering the new zone - self:_enforceDynamicSalvageZoneLimit() - if not self._DynamicSalvageZones[zoneName] then - _msgGroup(group, 'Unable to create salvage zone (limit reached). Older zones were not cleared in time.') - return - end - - -- Announce - local msg = _fmtTemplate(self.Messages.slingload_salvage_zone_created, { - zone = zoneName, - radius = radius, - }) - if lifetime > 0 then - msg = msg .. string.format(' Expires in %s.', _ctldFormatSeconds(lifetime)) - end - local maxZones = tonumber(cfg.MaxDynamicZones or 0) or 0 - if maxZones > 0 then - msg = msg .. string.format(' Active zone cap: %d.', maxZones) - end - _msgGroup(group, msg) - - _logInfo(string.format('[SlingLoadSalvage] Created zone %s at %s', zoneName, coord:ToStringLLDMS())) - - local ok, err = pcall(function() self:DrawZonesOnMap() end) - if not ok then - _logError(string.format('[SlingLoadSalvage] DrawZonesOnMap failed after creating %s: %s', zoneName, tostring(err))) - end -end - -function CTLD:RetireOldestDynamicSalvageZone(group) - local cfg = self.Config.SlingLoadSalvage - if not cfg or not cfg.Enabled then return end - - self._DynamicSalvageQueue = self._DynamicSalvageQueue or {} - if #self._DynamicSalvageQueue == 0 then - if group then _msgGroup(group, 'No dynamic salvage zones to retire.') end - return - end - - local oldest = self._DynamicSalvageQueue[1] - if not oldest then - if group then _msgGroup(group, 'No dynamic salvage zones to retire.') end - return - end - - local exists = self._DynamicSalvageZones and self._DynamicSalvageZones[oldest] - if exists then - self:_removeDynamicSalvageZone(oldest, 'manual-retire') - if group then - _msgGroup(group, string.format('Retired salvage zone: %s', oldest)) - end - else - -- Remove stale entry from queue and notify user - table.remove(self._DynamicSalvageQueue, 1) - if group then _msgGroup(group, 'Oldest salvage zone already retired.') end - end -end - --- Menu: Show active salvage zones -function CTLD:ShowActiveSalvageZones(group) - local cfg = self.Config.SlingLoadSalvage - if not cfg or not cfg.Enabled then return end - - local activeZones = {} - for _, zone in ipairs(self.SalvageDropZones or {}) do - local zoneName = zone:GetName() - if self._ZoneActive.SalvageDrop[zoneName] ~= false then - local zoneDef = self._ZoneDefs.SalvageDropZones[zoneName] - if zoneDef and zoneDef.side == self.Side then - table.insert(activeZones, zoneName) - end - end - end - - if #activeZones == 0 then - _msgGroup(group, 'No active Salvage Collection Zones configured.') - else - local msg = 'Active Salvage Collection Zones:\n' .. table.concat(activeZones, '\n') - _msgGroup(group, msg) - end -end - --- Menu: Show nearest salvage crate vectors -function CTLD:ShowNearestSalvageCrate(group) - local cfg = self.Config.SlingLoadSalvage - if not cfg or not cfg.Enabled then return end - - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - - local pos = unit:GetPointVec3() - local here = { x = pos.x, z = pos.z } - - local nearestName, nearestMeta, nearestDist = nil, nil, math.huge - for crateName, meta in pairs(CTLD._salvageCrates) do - if meta.side == self.Side then - local dx = meta.position.x - here.x - local dz = meta.position.z - here.z - local dist = math.sqrt(dx*dx + dz*dz) - if dist < nearestDist then - nearestDist = dist - nearestName = crateName - nearestMeta = meta - end - end - end - - if not nearestName then - local msg = self.Messages.slingload_salvage_no_crates or 'No active salvage crates available.' - _msgGroup(group, msg) - return - end - - local brg = _bearingDeg(here, nearestMeta.position) - local isMetric = _getPlayerIsMetric(unit) - local rng, rngU = _fmtRange(nearestDist, isMetric) - - local msg = _fmtTemplate(self.Messages.slingload_salvage_vectors, { - id = nearestName, - brg = brg, - rng = rng, - rng_u = rngU, - weight = nearestMeta.weight, - reward = nearestMeta.rewardValue, - }) - _msgGroup(group, msg) -end - --- #endregion SlingLoadSalvage - --- #endregion Public helpers - --- ========================= --- Return factory --- ========================= --- #region Export -_MOOSE_CTLD = CTLD -return CTLD --- #endregion Export - - diff --git a/Moose_CTLD_Pure/Moose_CTLD_FAC.lua b/Moose_CTLD_Pure/Moose_CTLD_FAC.lua deleted file mode 100644 index f6b00f8..0000000 --- a/Moose_CTLD_Pure/Moose_CTLD_FAC.lua +++ /dev/null @@ -1,1756 +0,0 @@ --- Moose_CTLD_FAC.lua ---[[ -Full-featured FAC/RECCE module (FAC2 parity) for pure-MOOSE CTLD, without MIST -========================================================================== -Dependencies: MOOSE (Moose.lua) and DCS core. No MIST required. - -Capabilities -- AFAC/RECCE auto-detect (by group name or unit type) on Birth; per-group F10 menu -- Auto-lase (laser + IR) using DCS Spot API; configurable marker type/color; per-FAC laser code -- Manual target workflow: scan nearby, list top 10 (prioritize AA/SAM), select one, multi-strike helper -- RECCE sweeps: LoS-based scan; adds map marks with DMS/MGRS/alt/heading/speed; stores target list -- Fires & strikes: Artillery, Naval guns, Bombers/Fighters; HE/illum/mortar, guided multi-task combos -- Carpet/TALD: via menu or map marks (CBRQT/TDRQT/AttackAz ) -- Event handling: Map marks (tasking), Shots (re-task), periodic schedulers (menus, status, AI spotter) - -Quick start -1) Load order: Moose.lua -> Moose_CTLD.lua -> Moose_CTLD_FAC.lua -2) In mission init: local fac = _MOOSE_CTLD_FAC:New(ctld, { CoalitionSide = coalition.side.BLUE }) -3) Put players in groups named with AFAC/RECON/RECCE (or use configured aircraft types) -4) Use F10 FAC/RECCE: Auto Laze ON, Scan, Select Target, Artillery, etc. - -Design notes -- This module aims to match FAC2 behaviors using DCS+MOOSE equivalents; some heuristics (e.g., naval ranges) - are conservative approximations to avoid silent failures. -]] - -if not _G.BASE then - env.info('[Moose_CTLD_FAC] Moose (BASE) not detected. Ensure Moose.lua is loaded before this script.') -end - -local FAC = {} -FAC.__index = FAC -FAC.Version = '1.0.1' - -local LOG_NONE = 0 -local LOG_ERROR = 1 -local LOG_INFO = 2 -local LOG_VERBOSE = 3 -local LOG_DEBUG = 4 - -local _logLevelLabels = { - [LOG_ERROR] = 'ERROR', - [LOG_INFO] = 'INFO', - [LOG_VERBOSE] = 'VERBOSE', - [LOG_DEBUG] = 'DEBUG', -} - --- Safe deep copy: prefer MOOSE UTILS.DeepCopy when available; fallback to Lua implementation -local function _deepcopy_fallback(obj, seen) - if type(obj) ~= 'table' then return obj end - seen = seen or {} - if seen[obj] then return seen[obj] end - local res = {} - seen[obj] = res - for k, v in pairs(obj) do - res[_deepcopy_fallback(k, seen)] = _deepcopy_fallback(v, seen) - end - local mt = getmetatable(obj) - if mt then setmetatable(res, mt) end - return res -end - -local function DeepCopy(obj) - if _G.UTILS and type(UTILS.DeepCopy) == 'function' then - return UTILS.DeepCopy(obj) - end - return _deepcopy_fallback(obj) -end - --- Deep-merge src into dst (recursively). Arrays/lists in src replace dst. -local function DeepMerge(dst, src) - if type(dst) ~= 'table' or type(src) ~= 'table' then return src end - for k, v in pairs(src) do - if type(v) == 'table' then - local isArray = (rawget(v, 1) ~= nil) - if isArray then - dst[k] = DeepCopy(v) - else - dst[k] = DeepMerge(dst[k] or {}, v) - end - else - dst[k] = v - end - end - return dst -end - --- #region Config --- Configuration for FAC behavior and UI. Adjust defaults here or pass overrides to :New(). -FAC.Config = { - CoalitionSide = coalition.side.BLUE, - UseGroupMenus = true, - CreateMenuAtMissionStart = false, -- if true with UseGroupMenus=true, creates empty root menu at mission start to reserve F10 position - RootMenuName = 'FAC/RECCE', -- Name for the root F10 menu. Note: Menu ordering depends on script load order in mission editor. - MenuAnnounceCooldown = 45, -- seconds to wait before repeating the "menu ready" message for the same group - MenuInactiveGrace = 30, -- seconds to keep menus alive after the last player disappears (prevents thrash during slot swaps) - LogLevel = nil, -- nil inherits CTLD.LogLevel; falls back to INFO when standalone - - -- Visuals / marking - FAC_maxDistance = 18520, -- FAC LoS search distance (m) - FAC_smokeOn_RED = true, - FAC_smokeOn_BLUE = true, - FAC_smokeColour_RED = trigger.smokeColor.Blue, - FAC_smokeColour_BLUE = trigger.smokeColor.Red, - MarkerDefault = 'FLARES', -- 'FLARES' | 'SMOKE' - - FAC_location = true, -- include coords in messages - FAC_lock = 'all', -- 'vehicle' | 'troop' | 'all' - FAC_laser_codes = { '1688','1677','1666','1113','1115','1111' }, - - fireMissionRounds = 24, -- default shells per call - illumHeight = 500, -- illumination height - facOffsetDist = 5000, -- offset aimpoint for mortars - - -- Platform type hints (names or types) - facACTypes = { 'SA342L','UH-1H','Mi-8MTV2','SA342M','SA342Minigun', 'UH-60L', 'CH-47F' }, - artyDirectorTypes = { 'Soldier M249','Paratrooper AKS-74','Soldier M4' }, - - -- RECCE scan - RecceScanRadius = 40000, - MinReportSeparation = 400, - - -- Arty tasking - Arty = { - Enabled = true, - }, -} --- #endregion Config - --- #region State --- Internal state tracking for FACs, targets, menus, and tasking -FAC._ctld = nil -FAC._menus = {} -- [groupName] = { root = MENU_GROUP, ... } -FAC._menuAnnouncements = {} -- [groupName] = last announcement timestamp (seconds) -FAC._menuLastSeen = {} -- [groupName] = last time the group was confirmed active -FAC._facUnits = {} -- [unitName] = { name, side } -FAC._facOnStation = {} -- [unitName] = true|nil -FAC._laserCodes = {} -- [unitName] = '1688' -FAC._markerType = {} -- [unitName] = 'FLARES'|'SMOKE' -FAC._markerColor = {} -- [unitName] = smokeColor (0..4) -FAC._currentTargets = {} -- [unitName] = { name, unitType, unitId } -FAC._laserSpots = {} -- [unitName] = { ir=Spot, laser=Spot } -FAC._smokeMarks = {} -- [targetName] = nextTime -FAC._manualLists = {} -- [unitName] = { Unit[] } - -FAC._facPilotNames = {} -- dynamic add on Birth if name contains AFAC/RECON/RECCE or type in facACTypes -FAC._reccePilotNames = {} -FAC._artDirectNames = {} - --- Laser code reservation per coalition side: [side] = { [code] = unitName } -FAC._reservedCodes = {} - --- Coalition-level admin/help menu handle per side -FAC._coalitionMenus = {} - -FAC._ArtyTasked = {} -- [groupName] = { tasked=int, timeTasked=time, tgt=Unit|nil, requestor=string|nil } -FAC._RECCETasked = {} -- [unitName] = 1 when busy - --- Map mark debouncing -FAC._lastMarks = {} -- [zoneName] = { x,z } --- #endregion State - --- #region Utilities (no MIST) --- Helpers for logging, vectors, coordinate formatting, headings, classification, etc. -local function _currentLogLevel(self) - if not self then return LOG_INFO end - local lvl = self.Config and self.Config.LogLevel - if lvl == nil and self._ctld and self._ctld.Config then - lvl = self._ctld.Config.LogLevel - end - return lvl or LOG_INFO -end - -local function _log(self, level, msg) - if level <= LOG_NONE then return end - if level > _currentLogLevel(self) then return end - local label = _logLevelLabels[level] or tostring(level) - env.info(string.format('[FAC][%s] %s', label, tostring(msg))) -end - -local function _dbg(self, msg) - _log(self, LOG_DEBUG, msg) -end - -local function _logInfo(self, msg) - _log(self, LOG_INFO, msg) -end - -local function _in(list, value) - if not list then return false end - for _,v in ipairs(list) do if v == value then return true end end - return false -end - -local function _removeKey(tbl, key) - if tbl then tbl[key] = nil end -end - -local function _vec3(p) - return { x = p.x, y = p.y or land.getHeight({ x = p.x, y = p.z or p.y or 0 }), z = p.z or p.y } -end - -local function _llToDMS(lat, lon) - -- Convert lat/lon in degrees to DMS string (e.g., 33°30'12.34"N 036°12'34.56"E) - local function dms(v, isLat) - local hemi = isLat and (v >= 0 and 'N' or 'S') or (v >= 0 and 'E' or 'W') - v = math.abs(v) - local d = math.floor(v) - local mFloat = (v - d) * 60 - local m = math.floor(mFloat) - local s = (mFloat - m) * 60 - return string.format('%d°%02d\'%05.2f"%s', d, m, s, hemi) - end - return dms(lat, true)..' '..dms(lon, false) -end - -local function _mgrsToString(m) - -- Format DCS coord.LLtoMGRS table to "XXYY 00000 00000"; fallback to key=value if shape differs - if not m then return '' end - -- DCS coord.LLtoMGRS returns table like: { UTMZone=XX, MGRSDigraph=YY, Easting=nnnnn, Northing=nnnnnn } - if m.UTMZone and m.MGRSDigraph and m.Easting and m.Northing then - return string.format('%s%s %05d %05d', tostring(m.UTMZone), tostring(m.MGRSDigraph), math.floor(m.Easting+0.5), math.floor(m.Northing+0.5)) - end - -- fallback stringify - local t = {} - for k,v in pairs(m) do table.insert(t, tostring(k)..'='..tostring(v)) end - return table.concat(t, ',') -end - -local function _bearingDeg(from, to) - local dx = (to.x - from.x) - local dz = (to.z - from.z) - local ang = math.deg(math.atan2(dx, dz)) - if ang < 0 then ang = ang + 360 end - return math.floor(ang + 0.5) -end - -local function _distance(a, b) - local dx = a.x - b.x - local dz = a.z - b.z - return math.sqrt(dx*dx + dz*dz) -end - -local function _getHeading(unit) - -- Approximate true heading using unit orientation + true north correction - local pos = unit:getPosition() - if pos then - local heading = math.atan2(pos.x.z, pos.x.x) - -- add true-north correction - local p = pos.p - local lat, lon = coord.LOtoLL(p) - local northPos = coord.LLtoLO(lat + 1, lon) - heading = heading + math.atan2(northPos.z - p.z, northPos.x - p.x) - if heading < 0 then heading = heading + 2*math.pi end - return heading - end - return 0 -end - -local function _formatUnitGeo(u) - -- Extracts geo/status for a unit: DMS/MGRS, altitude (m/ft), heading (deg), speed (mph) - local p = u:getPosition().p - local lat, lon = coord.LOtoLL(p) - local dms = _llToDMS(lat, lon) - local mgrs = _mgrsToString(coord.LLtoMGRS(lat, lon)) - local altM = math.floor(p.y) - local altF = math.floor(p.y * 3.28084) - local vel = u:getVelocity() or {x=0,y=0,z=0} - local spd = math.sqrt((vel.x or 0)^2 + (vel.z or 0)^2) - local mph = math.floor(spd * 2) -- approx - local hdg = math.floor(_getHeading(u) * 180/math.pi) - return dms, mgrs, altM, altF, hdg, mph -end - -local function _isInfantry(u) - -- Heuristic: treat named manpads/mortars as infantry - local tn = string.lower(u:getTypeName() or '') - return tn:find('infantry') or tn:find('paratrooper') or tn:find('stinger') or tn:find('manpad') or tn:find('mortar') -end - -local function _isVehicle(u) - return not _isInfantry(u) -end - -local function _isArtilleryUnit(u) - -- Detect tube/MLRS artillery; include mortar/howitzer/SPG by type name to cover units lacking attributes - if u:hasAttribute('Artillery') or u:hasAttribute('MLRS') then return true end - local tn = string.lower(u:getTypeName() or '') - if tn:find('mortar') or tn:find('2b11') or tn:find('m252') then return true end - if tn:find('howitzer') or tn:find('m109') or tn:find('paladin') or tn:find('2s19') or tn:find('msta') or tn:find('2s3') or tn:find('akatsiya') then return true end - if tn:find('mlrs') or tn:find('m270') or tn:find('bm%-21') or tn:find('grad') then return true end - return false -end - -local function _isNavalUnit(u) - -- Use DCS attributes to detect surface ships with guns capability - return u:hasAttribute('Naval') or u:hasAttribute('Cruisers') or u:hasAttribute('Frigates') or u:hasAttribute('Corvettes') or u:hasAttribute('Landing Ships') -end - -local function _isBomberOrFighter(u) - -- Detect fixed-wing strike-capable aircraft (for carpet/guided tasks) - return u:hasAttribute('Strategic bombers') or u:hasAttribute('Bombers') or u:hasAttribute('Multirole fighters') -end - -local function _artyMaxRangeForUnit(u) - -- Heuristic max range (meters) by unit type name; conservative to avoid "never fires" when out of range - local tn = string.lower(u:getTypeName() or '') - if tn:find('mortar') or tn:find('2b11') or tn:find('m252') then return 6000 end - if tn:find('mlrs') or tn:find('m270') or tn:find('bm%-21') or tn:find('grad') then return 30000 end - if tn:find('howitzer') or tn:find('m109') or tn:find('paladin') or tn:find('2s19') or tn:find('msta') or tn:find('2s3') or tn:find('akatsiya') then return 20000 end - -- generic tube artillery fallback - return 12000 -end - -local function _coalitionOpposite(side) - return (side == coalition.side.BLUE) and coalition.side.RED or coalition.side.BLUE -end --- #endregion Utilities (no MIST) - --- #region Construction --- Create a new FAC module instance. Optionally pass your CTLD instance and a config override table. -function FAC:New(ctld, cfg) - local o = setmetatable({}, self) - o._ctld = ctld - o.Config = DeepCopy(FAC.Config) - if cfg then o.Config = DeepMerge(o.Config, cfg) end - o.Side = o.Config.CoalitionSide - o._zones = {} - - o:_wireBirth() - o:_wireMarks() - o:_wireShots() - - -- Schedulers for menus/status/lase loop/AI spotters - o._schedMenus = SCHEDULER:New(nil, function() o:_ensureMenus() end, {}, 5, 10) - o._schedStatus = SCHEDULER:New(nil, function() o:_checkFacStatus() end, {}, 5, 1.0) - o._schedAI = SCHEDULER:New(nil, function() o:_artyAICall() end, {}, 10, 30) - - -- Create placeholder menu at mission start to reserve F10 position if requested - if o.Config.UseGroupMenus and o.Config.CreateMenuAtMissionStart then - o.PlaceholderMenu = MENU_COALITION:New(o.Side, o.Config.RootMenuName or 'FAC/RECCE') - MENU_COALITION_COMMAND:New(o.Side, 'Spawn in a FAC/RECCE aircraft to see options', o.PlaceholderMenu, function() - MESSAGE:New('FAC/RECCE menus will appear when you spawn in an appropriate aircraft.', 10):ToCoalition(o.Side) - end) - end - - -- Only create coalition-level Admin/Help when not using per-group menus - if not o.Config.UseGroupMenus then - o:_ensureCoalitionMenu() - end - - return o -end --- #endregion Construction - --- #region Event wiring --- Wire Birth (to detect AFAC/RECCE/Artillery Director), Map Mark handlers (tasking), and Shot events (re-tasking) -function FAC:_wireBirth() - local h = EVENTHANDLER:New() - h:HandleEvent(EVENTS.Birth) - h:HandleEvent(EVENTS.Dead) - h:HandleEvent(EVENTS.Crash) - h:HandleEvent(EVENTS.PlayerLeaveUnit) - local selfref = self - function h:OnEventBirth(e) - local unit = e.IniUnit - if not unit or not unit:IsAlive() then return end - if unit:GetCoalition() ~= selfref.Side then return end - -- classify as AFAC / RECCE / Arty Director - local name = unit:GetName() - local tname = unit:GetTypeName() - local g = unit:GetGroup() - if not g then return end - local gname = g:GetName() or name - - local isAFAC = (gname:find('AFAC') or gname:find('RECON')) or _in(selfref.Config.facACTypes, tname) - local isRECCE = (gname:find('RECCE') or gname:find('RECON')) or _in(selfref.Config.facACTypes, tname) - local isAD = _in(selfref.Config.artyDirectorTypes, tname) - - if isAFAC then selfref._facPilotNames[name] = true end - if isRECCE then selfref._reccePilotNames[name] = true end - if isAD then selfref._artDirectNames[name] = true end - end - - local function handleDeparture(eventData) - if not eventData then return end - local unit = eventData.IniUnit or eventData.IniDCSUnit - local name = eventData.IniUnitName or eventData.IniDCSUnitName - if unit then - selfref:_handleUnitDeparture(unit) - elseif name then - selfref:_handleUnitDeparture(name) - end - end - - function h:OnEventDead(e) - handleDeparture(e) - end - - function h:OnEventCrash(e) - handleDeparture(e) - end - - function h:OnEventPlayerLeaveUnit(e) - handleDeparture(e) - end - self._hBirth = h -end - -function FAC:_wireMarks() - -- Map mark handlers for Carpet Bomb/TALD and RECCE area tasks - local selfref = self - self._markEH = {} - function self._markEH:onEvent(e) - if not e or not e.id then return end - if e.id == world.event.S_EVENT_MARK_ADDED then - if type(e.text) == 'string' then - if e.text:find('CBRQT') or e.text:find('TDRQT') or e.text:find('AttackAz') then - local az = tonumber((e.text or ''):match('(%d+)%s*$')) - local mode = e.text:find('TDRQT') and 'TALD' or 'CARPET' - selfref:_executeCarpetOrTALD(e.pos, e.coalition, mode, az) - trigger.action.removeMark(e.idx) - elseif e.text:find('RECCE') then - selfref:_executeRecceMark(e.pos, e.coalition) - trigger.action.removeMark(e.idx) - end - end - end - end - world.addEventHandler(self._markEH) -end - -function FAC:_wireShots() - local selfref = self - self._shotEH = {} - function self._shotEH:onEvent(e) - if e.id == world.event.S_EVENT_SHOT and e.initiator then - local g = Unit.getGroup(e.initiator) - if not g then return end - local gname = g:getName() - local T = selfref._ArtyTasked[gname] - if T then - T.tasked = math.max(0, (T.tasked or 0) - 1) - if T.tasked == 0 then - local d = g:getUnit(1):getDesc() - trigger.action.outTextForCoalition(g:getCoalition(), (d and d.displayName or gname)..' Task Group available for re-tasking', 10) - selfref._ArtyTasked[gname] = nil - end - end - end - end - world.addEventHandler(self._shotEH) -end --- #endregion Event wiring - --- #region Housekeeping -function FAC:_safeRemoveMenu(menu, reason) - if not menu or type(menu) ~= 'table' then return end - - local shouldRemove = true - if MENU_INDEX and menu.Group and menu.MenuText then - local okPath, path = pcall(function() - return MENU_INDEX:ParentPath(menu.ParentMenu, menu.MenuText) - end) - if okPath and path then - local okHas, registered = pcall(function() - return MENU_INDEX:HasGroupMenu(menu.Group, path) - end) - if not okHas or registered ~= menu then - shouldRemove = false - end - else - shouldRemove = false - end - end - - if shouldRemove and menu.Remove then - local ok, err = pcall(function() menu:Remove() end) - if not ok and err then - _log(self, LOG_VERBOSE, string.format('Failed removing menu (%s): %s', tostring(reason or menu.MenuText or 'unknown'), tostring(err))) - end - elseif not shouldRemove then - _log(self, LOG_DEBUG, string.format('Skip stale menu removal (%s)', tostring(reason or menu.MenuText or 'unknown'))) - end - - if menu.Destroy then pcall(function() menu:Destroy() end) end - if menu.Delete then pcall(function() menu:Delete() end) end -end - -function FAC:_cleanupMenuForGroup(gname) - local menuSet = self._menus[gname] - if not menuSet then return end - for _,menu in pairs(menuSet) do - self:_safeRemoveMenu(menu, gname) - end - self._menus[gname] = nil - self._menuLastSeen[gname] = nil -end - -function FAC:_pruneMenus(active) - local now = (timer and timer.getTime and timer.getTime()) or 0 - local grace = self.Config.MenuInactiveGrace or 0 - for gname,_ in pairs(self._menus) do - if active[gname] then - if now > 0 then - self._menuLastSeen[gname] = now - end - else - if now > 0 then - local last = self._menuLastSeen[gname] - local shouldRemove = true - if type(last) == 'number' then - shouldRemove = (grace <= 0) or ((now - last) >= grace) - elseif last ~= nil then - -- Non-number sentinel: treat as recently seen. - shouldRemove = false - end - if shouldRemove then - self:_cleanupMenuForGroup(gname) - end - end - end - end -end - -function FAC:_pruneManualLists() - for uname,list in pairs(self._manualLists) do - local alive = {} - for _,unit in ipairs(list) do - if unit and unit.isExist and unit:isExist() and unit:getLife() > 0 then - alive[#alive+1] = unit - end - end - self._manualLists[uname] = (#alive > 0) and alive or nil - end -end - -function FAC:_pruneSmokeMarks() - for targetName,_ in pairs(self._smokeMarks) do - local target = Unit.getByName(targetName) - if not target or not target:isActive() or target:getLife() <= 1 then - self._smokeMarks[targetName] = nil - end - end -end - -function FAC:_pruneArtyTasked() - local now = timer.getTime() - for gname,info in pairs(self._ArtyTasked) do - local g = Group.getByName(gname) - local staleTime = info and info.timeTasked and (now - info.timeTasked > 900) - local noTasks = not info or (info.tasked or 0) <= 0 - if not g or not g:isExist() or staleTime or noTasks then - self._ArtyTasked[gname] = nil - end - end -end - -function FAC:_unregisterPilotName(uname) - _removeKey(self._facPilotNames, uname) - _removeKey(self._reccePilotNames, uname) - _removeKey(self._artDirectNames, uname) -end - -function FAC:_handleUnitDeparture(unitOrName) - local uname - if type(unitOrName) == 'string' then - uname = unitOrName - elseif unitOrName then - if unitOrName.GetName then - uname = unitOrName:GetName() - elseif unitOrName.getName then - uname = unitOrName:getName() - end - end - if not uname then return end - self:_cleanupFac(uname) -end --- #endregion Housekeeping - --- #region Zone-based RECCE (optional) --- Add a named or coordinate-based zone for periodic DETECTION_AREAS scans -function FAC:AddRecceZone(def) - local z - if def.name then z = ZONE:FindByName(def.name) end - if not z and def.coord then - local r = def.radius or 5000 - local v2 = (VECTOR2 and VECTOR2.New) and VECTOR2:New(def.coord.x, def.coord.z) or { x = def.coord.x, y = def.coord.z } - z = ZONE_RADIUS:New(def.name or ('FAC_ZONE_'..math.random(10000,99999)), v2, r) - end - if not z then return nil end - local enemySide = _coalitionOpposite(self.Side) - local setEnemies = SET_GROUP:New():FilterCoalitions(enemySide):FilterCategoryGround():FilterStart() - local det = DETECTION_AREAS:New(setEnemies, z:GetRadius()) - det:BoundZone(z) - local Z = { Zone = z, Name = z:GetName(), Detector = det, LastScan = 0 } - table.insert(self._zones, Z) - return Z -end - -function FAC:RunZones(interval) - -- Start/Restart periodic scans of configured recce zones - if self._zoneSched then self._zoneSched:Stop() end - self._zoneSched = SCHEDULER:New(nil, function() - for _,Z in ipairs(self._zones) do self:_scanZone(Z) end - end, {}, 5, interval or 20) -end - --- Backwards-compatible Run() entry point used by init scripts -function FAC:Run() - -- Schedulers for menus/status are started in New(); here we can kick off zone scans if any zones exist. - if #self._zones > 0 then self:RunZones() end - return self -end - -function FAC:_scanZone(Z) - -- Perform one detection update and mark contacts, with spatial de-duplication - Z.Detector:DetectionUpdate() - local reps = Z.Detector:GetDetectedItems() or {} - for _,rep in ipairs(reps) do - local pos2 = rep.point - if pos2 then - local point = { x = pos2.x, z = pos2.y } - local last = self._lastMarks[Z.Name] - if not last or _distance(point, last) >= (self.Config.MinReportSeparation or 400) then - self._lastMarks[Z.Name] = { x = point.x, z = point.z } - self:_markPoint(nil, point, rep.type or 'Contact') - end - end - end -end --- #endregion Zone-based RECCE (optional) - --- #region Menus --- Ensure per-group menus exist for active coalition player groups -function FAC:_unitEligibleForFac(unit) - if not unit then return false end - local uname = (unit.GetName and unit:GetName()) or (unit.getName and unit:getName()) - if uname then - if self._facPilotNames[uname] or self._reccePilotNames[uname] or self._artDirectNames[uname] then - return true - end - end - - local tname = (unit.GetTypeName and unit:GetTypeName()) or (unit.getTypeName and unit:getTypeName()) - if tname then - if _in(self.Config.facACTypes, tname) or _in(self.Config.artyDirectorTypes, tname) then - return true - end - end - - local grp = (unit.GetGroup and unit:GetGroup()) or (unit.getGroup and unit:getGroup()) - local gname = grp and ((grp.GetName and grp:GetName()) or (grp.getName and grp:getName())) or nil - if type(gname) == 'string' then - if gname:find('AFAC') or gname:find('RECCE') or gname:find('RECON') then - return true - end - end - - return false -end - -function FAC:_groupEligibleForFacMenus(group) - if not group or not group:IsAlive() then return false end - local units = group:GetUnits() - if type(units) ~= 'table' then - local single = group:GetUnit(1) - if single then - return self:_unitEligibleForFac(single) - end - return false - end - for _,u in ipairs(units) do - if self:_unitEligibleForFac(u) then - return true - end - end - return false -end - -function FAC:_ensureMenus() - if not self.Config.UseGroupMenus then return end - local players = coalition.getPlayers(self.Side) or {} - local active = {} - local now = (timer and timer.getTime and timer.getTime()) or 0 - for _,u in ipairs(players) do - local dg = u:getGroup() - if dg then - local gname = dg:getName() - local mg = GROUP:FindByName(gname) - if mg then - local eligible = self:_groupEligibleForFacMenus(mg) - active[gname] = true - if now > 0 then - self._menuLastSeen[gname] = now - else - self._menuLastSeen[gname] = self._menuLastSeen[gname] or 0 - end - local existing = self._menus[gname] - local needsRefresh = not existing or (existing.role == 'fac' and not eligible) or (existing.role == 'observer' and eligible) - if needsRefresh then - if existing then - self:_cleanupMenuForGroup(gname) - end - local menuSet - if eligible then - menuSet = self:_buildGroupMenus(mg) - if menuSet then menuSet.role = 'fac' end - else - menuSet = self:_buildObserverMenu(mg) - if menuSet then menuSet.role = 'observer' end - end - if menuSet then - self._menus[gname] = menuSet - self:_announceMenuReady(mg) - else - _log(self, LOG_ERROR, string.format('FAC menu creation returned nil for group %s', tostring(gname))) - end - end - end - end - end - self:_pruneMenus(active) -end - -function FAC:_ensureCoalitionMenu() - if self.Config.UseGroupMenus then return end - -- Create a coalition-level Admin/Help menu, nested under a FAC parent (not at F10 root) - if self._coalitionMenus[self.Side] then return end - self._coalitionRoot = self._coalitionRoot or {} - -- Create or reuse the coalition-level parent menu for FAC - self._coalitionRoot[self.Side] = self._coalitionRoot[self.Side] or MENU_COALITION:New(self.Side, 'FAC/RECCE Admin') - local parent = self._coalitionRoot[self.Side] - local root = MENU_COALITION:New(self.Side, 'Admin/Help', parent) - MENU_COALITION_COMMAND:New(self.Side, 'Show FAC Codes In Use', root, function() - self:_showCodesCoalition() - end) - MENU_COALITION_COMMAND:New(self.Side, 'Set FAC Log Level: DEBUG', root, function() - self.Config.LogLevel = LOG_DEBUG - _logInfo(self, string.format('Log level set to DEBUG via coalition admin menu (%s)', tostring(self.Side))) - trigger.action.outTextForCoalition(self.Side, 'FAC log level set to DEBUG', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Set FAC Log Level: INFO', root, function() - self.Config.LogLevel = LOG_INFO - _logInfo(self, string.format('Log level set to INFO via coalition admin menu (%s)', tostring(self.Side))) - trigger.action.outTextForCoalition(self.Side, 'FAC log level set to INFO', 8) - end) - MENU_COALITION_COMMAND:New(self.Side, 'Inherit CTLD Log Level', root, function() - self.Config.LogLevel = nil - _logInfo(self, string.format('Log level inheritance restored via coalition admin menu (%s)', tostring(self.Side))) - trigger.action.outTextForCoalition(self.Side, 'FAC log level now inherits CTLD setting', 8) - end) - self._coalitionMenus[self.Side] = root -end - -function FAC:_announceMenuReady(group) - if not group or not group.GetName then return end - local gname = group:GetName() - if not gname or gname == '' then return end - - self._menuAnnouncements = self._menuAnnouncements or {} - local now = (timer and timer.getTime and timer.getTime()) or 0 - local last = self._menuAnnouncements[gname] - local cooldown = self.Config.MenuAnnounceCooldown or 45 - - local shouldAnnounce = false - - if not last then - shouldAnnounce = true - elseif type(last) == 'number' and now > 0 then - shouldAnnounce = (now - last) >= cooldown - elseif type(last) ~= 'number' then - shouldAnnounce = true - end - - if shouldAnnounce then - MESSAGE:New('FAC/RECCE menu ready (F10)', 10):ToGroup(group) - if now > 0 then - self._menuAnnouncements[gname] = now - else - self._menuAnnouncements[gname] = true - end - elseif (not last or type(last) ~= 'number') and now > 0 then - -- Backfill numeric timestamp once timer API becomes available - self._menuAnnouncements[gname] = now - end -end - -function FAC:_buildGroupMenus(group) - -- Build the entire FAC/RECCE menu tree for a MOOSE GROUP - if not group or not group:IsAlive() then return nil end - local gname = group:GetName() - local root = MENU_GROUP:New(group, self.Config.RootMenuName or 'FAC/RECCE') - if not root then - _log(self, LOG_ERROR, string.format('Failed to create FAC menu for group %s (MENU_GROUP:New returned nil)', tostring(gname))) - return nil - end - _log(self, LOG_INFO, string.format('FAC menu built for group %s', tostring(gname))) - -- Safe menu command helper: wraps callbacks to avoid silent errors and report to group - local function CMD(title, parent, cb) - return MENU_GROUP_COMMAND:New(group, title, parent, function() - local ok, err = pcall(cb) - if not ok then - env.info('[FAC] Menu error: '..tostring(err)) - MESSAGE:New('FAC menu error: '..tostring(err), 8):ToGroup(group) - end - end) - end - - -- Status & On-Station - CMD('FAC: Status', root, function() self:_showFacStatus(group) end) - - local tgtRoot = MENU_GROUP:New(group, 'Targeting Mode', root) - CMD('Auto Laze ON', tgtRoot, function() self:_setOnStation(group, true) end) - CMD('Auto Laze OFF', tgtRoot, function() self:_setOnStation(group, nil) end) - CMD('Scan for Close Targets', tgtRoot, function() self:_scanManualList(group) end) - local selRoot = MENU_GROUP:New(group, 'Select Found Target', tgtRoot) - for i=1,10 do - CMD('Target '..i, selRoot, function() self:_setManualTarget(group, i) end) - end - CMD('Call arty on all manual targets', tgtRoot, function() self:_multiStrike(group) end) - - -- Laser codes - local lzr = MENU_GROUP:New(group, 'Laser Code', root) - for _,code in ipairs(self.Config.FAC_laser_codes) do - CMD(code, lzr, function() self:_setLaserCode(group, code) end) - end - local cust = MENU_GROUP:New(group, 'Custom Code', lzr) - local function addDigitMenu(d, max) - local m = MENU_GROUP:New(group, 'Digit '..d, cust) - for n=1,max do - CMD(tostring(n), m, function() self:_setLaserDigit(group, d, n) end) - end - end - addDigitMenu(1,1); addDigitMenu(2,6); addDigitMenu(3,8); addDigitMenu(4,8) - - -- Marker - local mk = MENU_GROUP:New(group, 'Marker', root) - local sm = MENU_GROUP:New(group, 'Smoke', mk) - local fl = MENU_GROUP:New(group, 'Flares', mk) - local function setM(typeName, color) - return function() self:_setMarker(group, typeName, color) end - end - CMD('GREEN', sm, setM('SMOKE', trigger.smokeColor.Green)) - CMD('RED', sm, setM('SMOKE', trigger.smokeColor.Red)) - CMD('WHITE', sm, setM('SMOKE', trigger.smokeColor.White)) - CMD('ORANGE', sm, setM('SMOKE', trigger.smokeColor.Orange)) - CMD('BLUE', sm, setM('SMOKE', trigger.smokeColor.Blue)) - CMD('GREEN', fl, setM('FLARES', trigger.smokeColor.Green)) - CMD('WHITE', fl, setM('FLARES', trigger.smokeColor.White)) - CMD('ORANGE', fl, setM('FLARES', trigger.smokeColor.Orange)) - CMD('Map Marker current target', mk, function() self:_setMapMarker(group) end) - - -- Artillery - local arty = MENU_GROUP:New(group, 'Artillery', root) - CMD('Check available arty', arty, function() self:_checkArty(group) end) - CMD('Call Fire Mission (HE)', arty, function() self:_callFireMission(group, self.Config.fireMissionRounds, 0) end) - CMD('Call Illumination', arty, function() self:_callFireMission(group, self.Config.fireMissionRounds, 1) end) - CMD('Call Mortar Only (anti-infantry)', arty, function() self:_callFireMission(group, self.Config.fireMissionRounds, 2) end) - CMD('Call Heavy Only (no smart)', arty, function() self:_callFireMission(group, 10, 3) end) - - local air = MENU_GROUP:New(group, 'Air/Naval', arty) - CMD('Single Target (GPS/Guided)', air, function() self:_callFireMission(group, 1, 4) end) - CMD('Multi Target (Guided only)', air, function() self:_callFireMissionMulti(group, 1, 4) end) - CMD('Carpet Bomb (attack heading = aircraft heading)', air, function() self:_callCarpetOnCurrent(group) end) - - -- RECCE - CMD('RECCE: Sweep & Mark', root, function() self:_recceDetect(group) end) - - -- Admin/Help (nested inside FAC/RECCE group menu when using group menus) - local admin = MENU_GROUP:New(group, 'Admin/Help', root) - CMD('Show FAC Codes In Use', admin, function() self:_showCodesCoalition() end) - CMD('Set FAC Log Level: DEBUG', admin, function() - self.Config.LogLevel = LOG_DEBUG - _logInfo(self, string.format('Log level set to DEBUG via group admin menu (%s)', group:GetName())) - MESSAGE:New('FAC log level set to DEBUG', 8):ToGroup(group) - end) - CMD('Set FAC Log Level: INFO', admin, function() - self.Config.LogLevel = LOG_INFO - _logInfo(self, string.format('Log level set to INFO via group admin menu (%s)', group:GetName())) - MESSAGE:New('FAC log level set to INFO', 8):ToGroup(group) - end) - CMD('Inherit CTLD Log Level', admin, function() - self.Config.LogLevel = nil - _logInfo(self, string.format('Log level inheritance restored via group admin menu (%s)', group:GetName())) - MESSAGE:New('FAC log level now inherits CTLD setting', 8):ToGroup(group) - end) - - -- Log-level controls (mission-maker convenience; per-instance toggle) - local dbg = MENU_GROUP:New(group, 'Log Level', root) - CMD('Set Log Level: DEBUG', dbg, function() - self.Config.LogLevel = LOG_DEBUG - local u = group:GetUnit(1); local who = (u and u:GetName()) or 'Unknown' - _logInfo(self, string.format('Log level set to DEBUG by %s', who)) - MESSAGE:New('FAC log level set to DEBUG', 8):ToGroup(group) - end) - CMD('Set Log Level: INFO', dbg, function() - self.Config.LogLevel = LOG_INFO - local u = group:GetUnit(1); local who = (u and u:GetName()) or 'Unknown' - _logInfo(self, string.format('Log level set to INFO by %s', who)) - MESSAGE:New('FAC log level set to INFO', 8):ToGroup(group) - end) - CMD('Inherit from CTLD', dbg, function() - self.Config.LogLevel = nil - local u = group:GetUnit(1); local who = (u and u:GetName()) or 'Unknown' - _logInfo(self, string.format('Log level inheritance restored by %s', who)) - MESSAGE:New('FAC log level now inherits CTLD setting', 8):ToGroup(group) - end) - return { root = root } -end - -function FAC:_buildObserverMenu(group) - if not group or not group:IsAlive() then return nil end - local gname = group:GetName() - local root = MENU_GROUP:New(group, self.Config.RootMenuName or 'FAC/RECCE') - if not root then - _log(self, LOG_ERROR, string.format('Failed to create observer FAC menu for group %s', tostring(gname))) - return nil - end - - local function CMD(title, cb) - return MENU_GROUP_COMMAND:New(group, title, root, function() - local ok, err = pcall(cb) - if not ok then - env.info('[FAC] Observer menu error: '..tostring(err)) - MESSAGE:New('FAC observer menu error: '..tostring(err), 8):ToGroup(group) - end - end) - end - - CMD('Show Active FAC/RECCE Controllers', function() self:_showFacStatus(group) end) - CMD('Show FAC Codes In Use', function() self:_showCodesCoalition() end) - CMD('FAC/RECCE Help', function() - local types = self.Config.facACTypes or {} - local typeList = (#types > 0) and table.concat(types, ', ') or 'see mission briefing' - - local laserCodes = self.Config.FAC_laser_codes or {'1688'} - local defaultCode = laserCodes[1] or '1688' - local allCodes = table.concat(laserCodes, ', ') - - local maxDist = tostring(self.Config.FAC_maxDistance or 18520) - local rootName = self.Config.RootMenuName or 'FAC/RECCE' - local markerDefault = self.Config.MarkerDefault or 'FLARES' - - local msg = table.concat({ - 'FAC/RECCE Overview:', - '', - '- This module lets certain aircraft act as an airborne JTAC / artillery spotter.', - '- To get the FAC menu, you must be in a group named with AFAC/RECCE/RECON,', - ' or flying one of the approved FAC aircraft types (' .. typeList .. ').', - '', - 'Basic Usage:', - '- Open the F10 radio menu and look for "' .. rootName .. '".', - '- Use "Auto Laze ON" to have the module automatically search for and lase nearby enemy targets.', - '- Use "Scan for Close Targets" then "Select Found Target" to manually pick a target from a list.', - '- Use "RECCE: Sweep & Mark" to scan a larger area and drop map markers on detected contacts.', - '', - 'Laser Codes:', - '- Default FAC laser code: ' .. defaultCode .. '.', - '- Allowed codes: ' .. allCodes .. '.', - '- Use the "Laser Code" submenu to change your code if another FAC is already using it.', - '- The module will try to avoid code conflicts and will notify you if a different code is assigned.', - '', - 'Markers & Smoke:', - '- Default marker type: ' .. markerDefault .. '.', - '- FAC can mark the current target with smoke or flares in different colors.', - '- Use the "Marker" submenu to choose SMOKE or FLARES and a color for your marks.', - '', - 'Range & Line of Sight:', - '- FAC search range is about ' .. maxDist .. ' meters (~10 NM).', - '- Targets must be within line-of-sight; hills and terrain can block detection and lasing.', - '', - 'Artillery & Air Support:', - '- The "Artillery" and "Air/Naval" menus look for AI units on your side that can fire on the target.', - '- If no suitable unit is in range or has ammo, the module will tell you.', - '- Guided/air/naval options require appropriate AI aircraft or ships placed by the mission designer.', - '', - 'If you do not see FAC menus:', - '- Check that your group name contains AFAC/RECCE/RECON, or you are flying a supported FAC aircraft type.', - '- Make sure Moose.lua, Moose_CTLD.lua, and Moose_CTLD_FAC.lua are all loaded in the mission (in that order).', - }, '\n') - - MESSAGE:New(msg, 30):ToGroup(group) - end) - - return { root = root } -end --- #endregion Menus - --- #region Status & On-station -function FAC:_facName(unitName) - local u = Unit.getByName(unitName) - if u and u:getPlayerName() then return u:getPlayerName() end - return unitName -end - -function FAC:_showFacStatus(group) - local unit = group:GetUnit(1) - if not unit or not unit:IsAlive() then return end - local side = unit:GetCoalition() - local colorToStr = { [trigger.smokeColor.Green]='GREEN',[trigger.smokeColor.Red]='RED',[trigger.smokeColor.White]='WHITE',[trigger.smokeColor.Orange]='ORANGE',[trigger.smokeColor.Blue]='BLUE' } - local msg = 'FAC STATUS:\n\n' - for uname,_ in pairs(self._facUnits) do - local u = Unit.getByName(uname) - if u and u:getLife()>0 and u:isActive() and u:getCoalition()==side and self._facOnStation[uname] then - local tgt = self._currentTargets[uname] - local lcd = self._laserCodes[uname] or 'UNKNOWN' - local marker = self._markerType[uname] or self.Config.MarkerDefault - local mcol = self._markerColor[uname] - local mcolStr = mcol and (colorToStr[mcol] or tostring(mcol)) or 'WHITE' - if tgt then - local eu = Unit.getByName(tgt.name) - if eu and eu:isActive() and eu:getLife()>0 then - msg = msg .. string.format('%s targeting %s CODE %s %s\nMarked %s %s\n', self:_facName(uname), eu:getTypeName(), lcd, self:_posString(eu), mcolStr, marker) - else - msg = msg .. string.format('%s on-station CODE %s\n', self:_facName(uname), lcd) - end - else - msg = msg .. string.format('%s on-station CODE %s\n', self:_facName(uname), lcd) - end - end - end - if msg == 'FAC STATUS:\n\n' then - msg = 'No Active FACs. Join AFAC/RECON to play as flying JTAC and Artillery Spotter.' - end - trigger.action.outTextForCoalition(side, msg, 20) -end - -function FAC:_posString(u) - -- Render a compact position string for messages - if not self.Config.FAC_location then return '' end - local p = u:getPosition().p - local lat, lon = coord.LOtoLL(p) - local dms = _llToDMS(lat, lon) - local mgrs = _mgrsToString(coord.LLtoMGRS(lat, lon)) - local altM = math.floor(p.y) - local altF = math.floor(p.y*3.28084) - return string.format('@ DMS %s MGRS %s Alt %dm/%dft', dms, mgrs, altM, altF) -end - -function FAC:_setOnStation(group, on) - local u = group:GetUnit(1) - if not u or not u:IsAlive() then return end - if not self:_unitEligibleForFac(u) then - MESSAGE:New('FAC controls unavailable for this aircraft type.', 10):ToGroup(group) - return - end - local uname = u:GetName() - _dbg(self, string.format('Action:SetOnStation unit=%s on=%s', uname, tostring(on and true or false))) - -- init defaults - if not self._laserCodes[uname] then - -- Assign a free code on first-time activation - local code = self:_assignFreeCode(u:GetCoalition(), uname) - self._laserCodes[uname] = code or (self.Config.FAC_laser_codes and self.Config.FAC_laser_codes[1]) or '1688' - end - if not self._markerType[uname] then self._markerType[uname] = self.Config.MarkerDefault end - if not self._facUnits[uname] then self._facUnits[uname] = { name = uname, side = u:GetCoalition() } end - - if not self._facOnStation[uname] and on then - trigger.action.outTextForCoalition(u:GetCoalition(), string.format('[FAC "%s" on-station using CODE %s]', self:_facName(uname), self._laserCodes[uname]), 10) - elseif self._facOnStation[uname] and not on then - trigger.action.outTextForCoalition(u:GetCoalition(), string.format('[FAC "%s" off-station]', self:_facName(uname)), 10) - self:_cleanupFac(uname, true) - end - if on then - self._facOnStation[uname] = true - -- start autolase one-shot; the status scheduler keeps it alive every 1s - self:_autolase(uname) - else - self._facOnStation[uname] = nil - end -end - -function FAC:_setLaserCode(group, code) - -- Set the laser code for this FAC; updates status if on-station - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - _dbg(self, string.format('Action:SetLaserCode unit=%s code=%s', uname, tostring(code))) - -- Enforce simple reservation: reassign if taken - local assigned = self:_reserveCode(u:GetCoalition(), uname, tostring(code)) - self._laserCodes[uname] = assigned - if self._facOnStation[uname] then - trigger.action.outTextForCoalition(u:GetCoalition(), string.format('[FAC "%s" on-station using CODE %s]', self:_facName(uname), self._laserCodes[uname]), 10) - end -end - -function FAC:_setLaserDigit(group, digit, val) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - _dbg(self, string.format('Action:SetLaserDigit unit=%s digit=%d val=%s', uname, digit, tostring(val))) - local cur = self._laserCodes[uname] or '1688' - local s = tostring(cur) - if #s ~= 4 then s = '1688' end - local pre = s:sub(1, digit-1) - local post = s:sub(digit+1) - s = pre .. tostring(val) .. post - self:_setLaserCode(group, s) -end - -function FAC:_setMarker(group, typ, color) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - _dbg(self, string.format('Action:SetMarker unit=%s type=%s color=%s', uname, tostring(typ), tostring(color))) - self._markerType[uname] = typ - self._markerColor[uname] = color - local colorStr = ({[trigger.smokeColor.Green]='GREEN',[trigger.smokeColor.Red]='RED',[trigger.smokeColor.White]='WHITE',[trigger.smokeColor.Orange]='ORANGE',[trigger.smokeColor.Blue]='BLUE'})[color] or 'WHITE' - if self._facOnStation[uname] then - trigger.action.outTextForCoalition(u:GetCoalition(), string.format('[FAC "%s" on-station marking with %s %s]', self:_facName(uname), colorStr, typ), 10) - else - MESSAGE:New('Marker set to '..colorStr..' '..typ, 10):ToGroup(group) - end -end - -function FAC:_setMapMarker(group) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - local tgt = self._currentTargets[uname] - if not tgt then MESSAGE:New('No Target to Mark', 10):ToGroup(group); return end - local t = Unit.getByName(tgt.name) - if not t or not t:isActive() then return end - _dbg(self, string.format('Action:MapMarker unit=%s target=%s', uname, tgt.name)) - local dms, mgrs, altM, altF, hdg, mph = _formatUnitGeo(t) - local text = string.format('%s - DMS %s Alt %dm/%dft\nHeading %d Speed %d MPH\nSpotted by %s', t:getTypeName(), dms, altM, altF, hdg, mph, self:_facName(uname)) - local id = math.floor(timer.getTime()*1000 + 0.5) - trigger.action.markToCoalition(id, text, t:getPoint(), u:GetCoalition(), false) - timer.scheduleFunction(function(idp) trigger.action.removeMark(idp) end, id, timer.getTime() + 300) -end --- #endregion Status & On-station - --- #region Auto-lase loop & target selection -function FAC:_checkFacStatus() - self:_pruneManualLists() - self:_pruneSmokeMarks() - self:_pruneArtyTasked() - -- Autostart for AI FACs and run autolase cadence - for uname,_ in pairs(self._facPilotNames) do - local u = Unit.getByName(uname) - if u and u:isActive() and u:getLife()>0 then - if not self._facUnits[uname] and (u:getPlayerName() == nil) then - self._facOnStation[uname] = true - end - if (not self._facUnits[uname]) and self._facOnStation[uname] then - self:_autolase(uname) - end - end - end -end - -function FAC:_autolase(uname) - local u = Unit.getByName(uname) - if not u then - if self._facUnits[uname] then - trigger.action.outTextForCoalition(self._facUnits[uname].side, string.format('[FAC "%s" MIA]', self:_facName(uname)), 10) - end - self:_cleanupFac(uname) - return - end - if not self._facOnStation[uname] then self:_cancelLase(uname); self._currentTargets[uname]=nil; return end - if not self._laserCodes[uname] then self._laserCodes[uname] = self.Config.FAC_laser_codes[1] end - if not self._facUnits[uname] then self._facUnits[uname] = { name = u:getName(), side = u:getCoalition() } end - if not self._markerType[uname] then self._markerType[uname] = self.Config.MarkerDefault end - - if not u:isActive() then - timer.scheduleFunction(function(args) self:_autolase(args[1]) end, {uname}, timer.getTime()+30) - return - end - - local enemy = self:_currentOrFindEnemy(u, uname) - if enemy then - _dbg(self, string.format('AutoLase: unit=%s target=%s type=%s', uname, enemy:getName(), enemy:getTypeName())) - self:_laseUnit(enemy, u, uname, self._laserCodes[uname]) - -- variable next tick based on target speed - local v = enemy:getVelocity() or {x=0,z=0} - local spd = math.sqrt((v.x or 0)^2 + (v.z or 0)^2) - local next = (spd < 1) and 1 or 1/spd - timer.scheduleFunction(function(args) self:_autolase(args[1]) end, {uname}, timer.getTime()+next) - -- markers recurring - local nm = self._smokeMarks[enemy:getName()] - if not nm or nm < timer.getTime() then self:_createMarker(enemy, uname) end - else - _dbg(self, string.format('AutoLase: unit=%s no-visible-target -> cancel', uname)) - self:_cancelLase(uname) - timer.scheduleFunction(function(args) self:_autolase(args[1]) end, {uname}, timer.getTime()+5) - end -end - -function FAC:_currentOrFindEnemy(facUnit, uname) - local cur = self._currentTargets[uname] - if cur then - local eu = Unit.getByName(cur.name) - if eu and eu:isActive() and eu:getLife()>0 then - local d = _distance(eu:getPoint(), facUnit:getPoint()) - if d < (self.Config.FAC_maxDistance or 18520) then - local epos = eu:getPoint() - if land.isVisible({x=epos.x,y=epos.y+2,z=epos.z}, {x=facUnit:getPoint().x,y=facUnit:getPoint().y+2,z=facUnit:getPoint().z}) then - return eu - end - end - end - end - -- find nearest visible - _dbg(self, string.format('FindNearest: unit=%s mode=%s', uname, tostring(self.Config.FAC_lock))) - return self:_findNearestEnemy(facUnit, self.Config.FAC_lock) -end - -function FAC:_findNearestEnemy(facUnit, targetType) - local facSide = facUnit:getCoalition() - local enemySide = _coalitionOpposite(facSide) - local nearest, best = nil, self.Config.FAC_maxDistance or 18520 - local origin = facUnit:getPoint() - _dbg(self, string.format('Search: origin=(%.0f,%.0f) radius=%d targetType=%s', origin.x, origin.z, self.Config.FAC_maxDistance or 18520, tostring(targetType))) - - local volume = { id = world.VolumeType.SPHERE, params = { point = origin, radius = self.Config.FAC_maxDistance or 18520 } } - local function search(u) - if u:getLife() <= 1 or u:inAir() then return end - if u:getCoalition() ~= enemySide then return end - local up = u:getPoint() - local d = _distance(up, origin) - if d >= best then return end - local allowed = true - if targetType == 'vehicle' then allowed = _isVehicle(u) - elseif targetType == 'troop' then allowed = _isInfantry(u) end - if not allowed then return end - if land.isVisible({x=up.x,y=up.y+2,z=up.z}, {x=origin.x,y=origin.y+2,z=origin.z}) and u:isActive() then - best = d; nearest = u - end - end - world.searchObjects(Object.Category.UNIT, volume, search) - if nearest then - local uname = facUnit:getName() - self._currentTargets[uname] = { name = nearest:getName(), unitType = nearest:getTypeName(), unitId = nearest:getID() } - self:_announceNewTarget(facUnit, nearest, uname) - self:_createMarker(nearest, uname) - _dbg(self, string.format('Search: selected target=%s type=%s dist=%.0f', nearest:getName(), nearest:getTypeName(), best)) - end - return nearest -end - -function FAC:_announceNewTarget(facUnit, enemy, uname) - local col = self._markerColor[uname] - local colorStr = ({[trigger.smokeColor.Green]='GREEN',[trigger.smokeColor.Red]='RED',[trigger.smokeColor.White]='WHITE',[trigger.smokeColor.Orange]='ORANGE',[trigger.smokeColor.Blue]='BLUE'})[col or trigger.smokeColor.White] or 'WHITE' - local dms, mgrs, altM, altF, hdg, mph = _formatUnitGeo(enemy) - _dbg(self, string.format('AnnounceTarget: fac=%s target=%s code=%s mark=%s %s', self:_facName(uname), enemy:getName(), self._laserCodes[uname] or '1688', colorStr, self._markerType[uname] or 'FLARES')) - local msg = string.format('[%s lasing new target %s. CODE %s @ DMS %s MGRS %s Alt %dm/%dft\nMarked %s %s]', - self:_facName(uname), enemy:getTypeName(), self._laserCodes[uname] or '1688', dms, mgrs, altM, altF, colorStr, self._markerType[uname] or 'FLARES') - trigger.action.outTextForCoalition(facUnit:getCoalition(), msg, 10) -end - -function FAC:_createMarker(enemy, uname) - local typ = self._markerType[uname] or self.Config.MarkerDefault - local col = self._markerColor[uname] - local when = (typ == 'SMOKE') and 300 or 5 - self._smokeMarks[enemy:getName()] = timer.getTime() + when - local p = enemy:getPoint() - _dbg(self, string.format('CreateMarker: target=%s type=%s color=%s ttl=%.0fs', enemy:getName(), typ, tostring(col or trigger.smokeColor.White), when)) - if typ == 'SMOKE' then - trigger.action.smoke({x=p.x, y=p.y+2, z=p.z}, col or trigger.smokeColor.White) - else - trigger.action.signalFlare({x=p.x, y=p.y+2, z=p.z}, col or trigger.smokeColor.White, 0) - end -end - -function FAC:_cancelLase(uname) - local S = self._laserSpots[uname] - if S then - if S.ir then Spot.destroy(S.ir) end - if S.laser then Spot.destroy(S.laser) end - self._laserSpots[uname] = nil - end -end - -function FAC:_laseUnit(enemy, facUnit, uname, code) - local p = enemy:getPoint() - local tgt = { x=p.x, y=p.y+2, z=p.z } - local spots = self._laserSpots[uname] - if not spots then - spots = {} - local ok, res = pcall(function() - spots.ir = Spot.createInfraRed(facUnit, {x=0,y=2,z=0}, tgt) - spots.laser = Spot.createLaser(facUnit, {x=0,y=2,z=0}, tgt, tonumber(code) or 1688) - return spots - end) - if ok then - self._laserSpots[uname] = spots - else - env.error('[FAC] Spot creation failed: '..tostring(res)) - end - else - if spots.ir then spots.ir:setPoint(tgt) end - if spots.laser then spots.laser:setPoint(tgt) end - end -end - -function FAC:_cleanupFac(uname, preserveRole) - if not uname then return end - local current = self._currentTargets[uname] - if current and current.name then - self._smokeMarks[current.name] = nil - end - self:_cancelLase(uname) - self._laserCodes[uname] = nil - self._markerType[uname] = nil - self._markerColor[uname] = nil - self._manualLists[uname] = nil - self._laserSpots[uname] = nil - self._currentTargets[uname] = nil - if not preserveRole then - self:_unregisterPilotName(uname) - end - -- release reserved code if any - local side = (self._facUnits[uname] and self._facUnits[uname].side) or self.Side - if side then self:_releaseCode(side, uname) end - self._facUnits[uname] = nil - self._facOnStation[uname] = nil -end - --- #endregion Auto-lase loop & target selection - --- #region Manual Scan/Select --- Manual Scan/Select -function FAC:_scanManualList(group) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - -- Use DCS Unit position for robust coords - local du = Unit.getByName(uname) - if not du or not du:getPoint() then return end - local origin = du:getPoint() - _dbg(self, string.format('Action:ScanManual unit=%s origin=(%.0f,%.0f) radius=%d', uname, origin.x, origin.z, self.Config.FAC_maxDistance)) - local enemySide = _coalitionOpposite(u:GetCoalition()) - local foundAA, foundOther = {}, {} - local function ins(tbl, item) table.insert(tbl, item) end - local function cb(item) - if item:getCoalition() ~= enemySide then return end - if item:inAir() or not item:isActive() or item:getLife() <= 1 then return end - local p = item:getPoint() - if land.isVisible({x=p.x,y=p.y+2,z=p.z}, {x=origin.x,y=origin.y+2,z=origin.z}) then - if item:hasAttribute('SAM TR') or item:hasAttribute('IR Guided SAM') or item:hasAttribute('AA_flak') then - ins(foundAA, item) - else - ins(foundOther, item) - end - end - end - world.searchObjects(Object.Category.UNIT, { id=world.VolumeType.SPHERE, params={ point = origin, radius = self.Config.FAC_maxDistance } }, cb) - local list = {} - for i=1,10 do list[i] = foundAA[i] or foundOther[i] end - self._manualLists[uname] = list - _dbg(self, string.format('Action:ScanManual unit=%s results=%d', uname, #list)) - -- print bearings/ranges - local gid = group:GetDCSObject() and group:GetDCSObject():getID() or nil - for i,v in ipairs(list) do - if v then - local p = v:getPoint() - local d = _distance(p, origin) - local dy, dx = p.z - origin.z, p.x - origin.x - local hdg = math.deg(math.atan2(dx, dy)) - if hdg < 0 then hdg = hdg + 360 end - if gid then - trigger.action.outTextForGroup(gid, string.format('Target %d: %s Bearing %d Range %dm/%dft', i, v:getTypeName(), math.floor(hdg+0.5), math.floor(d), math.floor(d*3.28084)), 30) - local id = math.floor(timer.getTime()*1000 + i) - trigger.action.markToGroup(id, 'Target '..i..':'..v:getTypeName(), v:getPoint(), gid, false) - timer.scheduleFunction(function(mid) trigger.action.removeMark(mid) end, id, timer.getTime()+60) - end - end - end -end - -function FAC:_setManualTarget(group, idx) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - _dbg(self, string.format('Action:SetManualTarget unit=%s index=%d', uname, idx)) - local list = self._manualLists[uname] - if not list or not list[idx] then - MESSAGE:New('Invalid Target', 10):ToGroup(group) - return - end - local enemy = list[idx] - if enemy and enemy:getLife()>0 then - self._currentTargets[uname] = { name = enemy:getName(), unitType = enemy:getTypeName(), unitId = enemy:getID() } - self:_setOnStation(group, true) - self:_createMarker(enemy, uname) - MESSAGE:New(string.format('Designating Target %d: %s', idx, enemy:getTypeName()), 10):ToGroup(group) - _dbg(self, string.format('Action:SetManualTarget unit=%s target=%s type=%s', uname, enemy:getName(), enemy:getTypeName())) - else - MESSAGE:New(string.format('Target %d already dead', idx), 10):ToGroup(group) - _dbg(self, string.format('Action:SetManualTarget unit=%s index=%d dead', uname, idx)) - end -end - -function FAC:_multiStrike(group) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - local list = self._manualLists[uname] or {} - _dbg(self, string.format('Action:MultiStrike unit=%s targets=%d', uname, #list)) - for _,t in ipairs(list) do if t and t:isExist() then self:_callFireMission(group, 10, 0, t) end end -end --- #endregion Manual Scan/Select - --- #region RECCE sweep (aircraft-based) -function FAC:_recceDetect(group) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - local side = u:GetCoalition() - -- Use DCS Unit API for coordinates to avoid relying on MOOSE point methods - local du = Unit.getByName(uname) - if not du or not du:getPoint() then return end - local pos = du:getPoint() - _dbg(self, string.format('Action:RecceSweep unit=%s center=(%.0f,%.0f) radius=%d', uname, pos.x, pos.z, self.Config.RecceScanRadius)) - local enemySide = _coalitionOpposite(side) - local temp = {} - local count = 0 - local function cb(item) - if item:getCoalition() ~= enemySide then return end - if item:getLife() < 1 then return end - local p = item:getPoint() - if land.isVisible({x=p.x,y=p.y+2,z=p.z}, {x=pos.x,y=pos.y+2,z=pos.z}) and (item:isActive() or item:getCategory()==Object.Category.STATIC) then - count = count + 1 - local dms, mgrs, altM, altF, hdg, mph = _formatUnitGeo(item) - local id = math.floor(timer.getTime()*1000 + count) - local text = string.format('%s - DMS %s Alt %dm/%dft\nHeading %d Speed %d MPH\nSpotted by %s', item:getTypeName(), dms, altM, altF, hdg, mph, self:_facName(uname)) - trigger.action.markToCoalition(id, text, item:getPoint(), side, false) - timer.scheduleFunction(function(mid) trigger.action.removeMark(mid) end, id, timer.getTime()+300) - table.insert(temp, item) - end - end - world.searchObjects(Object.Category.UNIT, { id=world.VolumeType.SPHERE, params={ point = pos, radius = self.Config.RecceScanRadius } }, cb) - world.searchObjects(Object.Category.STATIC, { id=world.VolumeType.SPHERE, params={ point = pos, radius = self.Config.RecceScanRadius } }, cb) - self._manualLists[uname] = temp - _dbg(self, string.format('Action:RecceSweep unit=%s results=%d', uname, #temp)) - if #temp > 0 then - MESSAGE:New(string.format('RECCE: %d contact(s) marked on map for 5 minutes. Open F10 Map to view.', #temp), 10):ToGroup(group) - -- Coalition heads-up so other players know to check the map - local lat, lon = coord.LOtoLL(pos) - local mgrs = _mgrsToString(coord.LLtoMGRS(lat, lon)) - local loc = (mgrs and mgrs ~= '') and ('MGRS '..mgrs) or 'FAC position' - trigger.action.outTextForCoalition(side, string.format('RECCE: %d contact(s) marked near %s. Check F10 map.', #temp, loc), 10) - else - MESSAGE:New('RECCE: No visible enemy contacts found.', 8):ToGroup(group) - end -end - -function FAC:_executeRecceMark(pos, coal) - -- Find nearest AI recce unit of coalition not busy, task to fly over and run recceDetect via script action - -- For simplicity we just run a coalition-wide recce flood at mark point using nearby AI if available; else no-op. - trigger.action.outTextForCoalition(coal, 'RECCE task requested at map mark', 10) -end --- #endregion RECCE sweep (aircraft-based) - --- #region Artillery/Naval/Air tasking -function FAC:_artyAmmo(units) - local total = 0 - for i=1,#units do - local ammo = units[i]:getAmmo() - if ammo then - if ammo[1] then total = total + (ammo[1].count or 0) end - end - end - return total -end - -function FAC:_guidedAmmo(units) - local total = 0 - for i=1,#units do - local ammo = units[i]:getAmmo() - if ammo then - for k=1,#ammo do - local d = ammo[k].desc - if d and d.guidance == 1 then total = total + (ammo[k].count or 0) end - end - end - end - return total -end - -function FAC:_navalGunStats(units) - local total, maxRange = 0, 0 - for i=1,#units do - local ammo = units[i]:getAmmo() - if ammo then - for k=1,#ammo do - local d = ammo[k].desc - if d and d.category == 0 and d.warhead and d.warhead.caliber and d.warhead.caliber >= 75 then - total = total + (ammo[k].count or 0) - local r = (d.warhead.caliber >= 120) and 22222 or 18000 - if r > maxRange then maxRange = r end - end - end - end - end - return total, maxRange -end - -function FAC:_getArtyFor(point, facUnit, mode) - -- mode: 0 HE, 1 illum, 2 mortar only, 3 heavy only (no smart), 4 guided/naval/air, -1 any except bombers - -- Accept either a MOOSE Unit (GetCoalition) or a DCS Unit (getCoalition) - local side - if facUnit then - if facUnit.GetCoalition then - side = facUnit:GetCoalition() - elseif facUnit.getCoalition then - side = facUnit:getCoalition() - end - end - side = side or self.Side - local bestName - local candidates = {} - local function consider(found) - if found:getCoalition() ~= side or not found:isActive() or found:getPlayerName() then return end - local u = found - local g = u:getGroup() - if not g then return end - local gname = g:getName() - if candidates[gname] then return end - if not self._ArtyTasked[gname] then self._ArtyTasked[gname] = { name=gname, tasked=0, timeTasked=nil, tgt=nil, requestor=nil } end - if self._ArtyTasked[gname].tasked ~= 0 and (mode ~= -1 or self._ArtyTasked[gname].requestor ~= 'AI Spotter') then return end - table.insert(candidates, gname) - end - world.searchObjects(Object.Category.UNIT, { id=world.VolumeType.SPHERE, params={ point = point, radius = 4600000 } }, consider) - - local filtered = {} - for _,gname in ipairs(candidates) do - local g = Group.getByName(gname) - if g and g:isExist() then - local u1 = g:getUnit(1) - local pos = u1:getPoint() - local d = _distance(pos, point) - if mode == 4 then - if _isBomberOrFighter(u1) or _isNavalUnit(u1) then - if _isNavalUnit(u1) then - local tot, rng = self:_navalGunStats(g:getUnits()) - _dbg(self, string.format('ArtySelect: %s (naval) dist=%.0f max=%.0f ammo=%d %s', gname, d, rng, tot or 0, (tot>0 and rng>=d) and 'OK' or 'SKIP')) - if tot>0 and rng >= d then table.insert(filtered, gname) end - else - local guided = self:_guidedAmmo(g:getUnits()) - _dbg(self, string.format('ArtySelect: %s (air) dist=%.0f guided=%d %s', gname, d, guided or 0, (guided>0) and 'OK' or 'SKIP')) - if guided > 0 then table.insert(filtered, gname) end - end - end - else - if _isNavalUnit(u1) then - local tot, rng = self:_navalGunStats(g:getUnits()) - _dbg(self, string.format('ArtySelect: %s (naval) dist=%.0f max=%.0f ammo=%d %s', gname, d, rng, tot or 0, (tot>0 and rng>=d) and 'OK' or 'SKIP')) - if tot>0 and rng >= d then table.insert(filtered, gname) end - elseif _isArtilleryUnit(u1) then - local r = _artyMaxRangeForUnit(u1) - _dbg(self, string.format('ArtySelect: %s (artillery %s) dist=%.0f max=%.0f %s', gname, u1:getTypeName() or '?', d, r, (d<=r) and 'OK' or 'SKIP')) - if d <= r then table.insert(filtered, gname) end - end - end - end - end - local best, bestAmmo - for _,gname in ipairs(filtered) do - local g = Group.getByName(gname) - local ammo = self:_artyAmmo(g:getUnits()) - if (not bestAmmo) or ammo > bestAmmo then bestAmmo = ammo; best = gname end - end - if best then return Group.getByName(best) end - return nil -end - -function FAC:_checkArty(group) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - -- Resolve using DCS Unit position - local du = Unit.getByName(u:GetName()) - if not du or not du:getPoint() then return end - local pos = du:getPoint() - _dbg(self, string.format('Action:CheckArty unit=%s at=(%.0f,%.0f)', u:GetName(), pos.x, pos.z)) - local g = self:_getArtyFor(pos, du, 0) - if g then - _dbg(self, string.format('Action:CheckArty unit=%s found=%s', u:GetName(), g:getName())) - MESSAGE:New('Arty available: '..g:getName(), 10):ToGroup(group) - else - _dbg(self, string.format('Action:CheckArty unit=%s none-found', u:GetName())) - MESSAGE:New('No untasked arty/bomber/naval in range', 10):ToGroup(group) - end -end - -function FAC:_callFireMission(group, rounds, mode, specificTarget) - -- Resolve a suitable asset (arty/naval/air) and push a task at the current target or a forward offset - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - local enemy = specificTarget or (self._currentTargets[uname] and Unit.getByName(self._currentTargets[uname].name)) - local attackPoint - if enemy and enemy:isActive() then attackPoint = enemy:getPoint() else - -- offset forward of FAC as fallback - local du = Unit.getByName(uname) - if not du or not du:getPoint() then return end - local hdg = _getHeading(du) - local up = du:getPoint() - attackPoint = { x = up.x + math.cos(hdg)*self.Config.facOffsetDist, y = up.y, z = up.z + math.sin(hdg)*self.Config.facOffsetDist } - end - _dbg(self, string.format('Action:CallFireMission unit=%s rounds=%s mode=%s target=%s', uname, tostring(rounds), tostring(mode), enemy and enemy:getName() or 'offset')) - local arty = self:_getArtyFor(attackPoint, Unit.getByName(uname), mode) - if not arty then - _dbg(self, string.format('Action:CallFireMission unit=%s no-asset-in-range', uname)) - MESSAGE:New('Unable to process fire mission: no asset in range', 10):ToGroup(group) - return - end - local firepoint = { x = attackPoint.x, y = attackPoint.z, altitude = arty:getUnit(1):getPoint().y, altitudeEnabled = true, attackQty = 1, expend = 'One', weaponType = 268402702 } - local task - if _isNavalUnit(arty:getUnit(1)) then - -- FireAtPoint expects a 2D vec2 where y=z; do not pass altitude here - task = { id='FireAtPoint', params = { point = { x = attackPoint.x, y = attackPoint.z }, expendQty = 1, radius = 50, weaponType = 0 } } - elseif _isBomberOrFighter(arty:getUnit(1)) then - task = { id='Bombing', params = { y = attackPoint.z, x = attackPoint.x, altitude = firepoint.altitude, altitudeEnabled = true, attackQty = 1, groupAttack = true, weaponType = 2147485694 } } - else - -- Ground artillery - task = { id='FireAtPoint', params = { point = { x = attackPoint.x, y = attackPoint.z }, expendQty = rounds or 1, radius = 50, weaponType = 0 } } - end - local ctrl = arty:getController() - ctrl:pushTask(task) - -- Avoid forcing unknown option ids; rely on group's ROE/AlarmState from mission editor - local ammo = self:_artyAmmo(arty:getUnits()) - self._ArtyTasked[arty:getName()] = { name = arty:getName(), tasked = rounds or 1, timeTasked = timer.getTime(), tgt = enemy, requestor = self:_facName(uname) } - trigger.action.outTextForCoalition(u:GetCoalition(), string.format('Fire mission sent: %s firing %d rounds. Requestor: %s', arty:getUnit(1):getTypeName(), rounds or 1, self:_facName(uname)), 10) - _dbg(self, string.format('Action:CallFireMission unit=%s asset=%s rounds=%s point=(%.0f,%.0f)', uname, arty:getName(), tostring(rounds), attackPoint.x, attackPoint.z)) -end - -function FAC:_callFireMissionMulti(group, rounds, mode) - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - local list = self._manualLists[uname] - if not list or #list == 0 then MESSAGE:New('No manual targets. Scan first.', 10):ToGroup(group) return end - local first = list[1] - local arty = self:_getArtyFor(first:getPoint(), u, 4) - if not arty then MESSAGE:New('No guided asset available', 10):ToGroup(group) return end - _dbg(self, string.format('Action:CallFireMissionMulti unit=%s targets=%d asset=%s', uname, #list, arty:getName())) - local tasks = {} - local guided = self:_guidedAmmo(arty:getUnits()) - for i,t in ipairs(list) do - if i > guided then break end - local p = t:getPoint() - tasks[#tasks+1] = { number = i, id='Bombing', enabled=true, auto=false, params={ y=p.z, x=p.x, altitude=arty:getUnit(1):getPoint().y, altitudeEnabled=true, attackQty=1, groupAttack=false, weaponType=8589934592 } } - end - local combo = { id='ComboTask', params = { tasks = tasks } } - local ctrl = arty:getController() - ctrl:setOption(1,1) - ctrl:pushTask(combo) - ctrl:setOption(10,3221225470) - self._ArtyTasked[arty:getName()] = { name=arty:getName(), tasked = #tasks, timeTasked=timer.getTime(), tgt=nil, requestor=self:_facName(uname) } - trigger.action.outTextForCoalition(u:GetCoalition(), string.format('Guided strike queued on %d targets', #tasks), 10) - _dbg(self, string.format('Action:CallFireMissionMulti unit=%s queuedTasks=%d', uname, #tasks)) -end - -function FAC:_callCarpetOnCurrent(group) - -- Carpet bomb the current target using attack heading of the aircraft - local u = group:GetUnit(1); if not u or not u:IsAlive() then return end - local uname = u:GetName() - local tgt = self._currentTargets[uname] - if not tgt then MESSAGE:New('No current target', 10):ToGroup(group) return end - local enemy = Unit.getByName(tgt.name) - if not enemy or not enemy:isActive() then MESSAGE:New('Target invalid', 10):ToGroup(group) return end - local du = Unit.getByName(uname) - local attackHdgDeg = du and math.floor(_getHeading(du)*180/math.pi) or 0 - _dbg(self, string.format('Action:Carpet unit=%s target=%s hdg=%d', uname, enemy:getName(), attackHdgDeg)) - self:_executeCarpetOrTALD(enemy:getPoint(), u:GetCoalition(), 'CARPET', attackHdgDeg) -end - -function FAC:_executeCarpetOrTALD(point, coal, mode, attackHeadingDeg) - local side = coal or self.Side - local arty = self:_getArtyFor(point, nil, (mode=='TALD') and 4 or 5) - if not arty then - trigger.action.outTextForCoalition(side, 'No bomber/naval asset available for '..(mode or 'CARPET'), 10) - return - end - local u1 = arty:getUnit(1) - local pos = u1:getPoint() - local hdg = attackHeadingDeg and math.rad(attackHeadingDeg) or 0 - local weaponType = (mode=='TALD') and 8589934592 or 2147485694 - local altitude = (mode=='TALD') and 10000 or pos.y - _dbg(self, string.format('Action:%s asset=%s heading=%d', tostring(mode or 'CARPET'), u1:getName(), attackHeadingDeg or -1)) - local task = { id='Bombing', params={ x=point.x, y=point.z, altitude=altitude, altitudeEnabled=true, attackQty=1, groupAttack=true, weaponType=weaponType, direction=hdg, directionEnabled=true } } - local ctrl = arty:getController() - ctrl:setOption(1,1) - ctrl:setTask(task) - ctrl:setOption(10,3221225470) - trigger.action.outTextForCoalition(side, string.format('%s ordered to attack map mark (hdg %d)', u1:getTypeName(), attackHeadingDeg or 0), 10) -end --- Provide a stub for periodic AI spotter loop (safe to extend as needed) -function FAC:_artyAICall() - return -end - --- #endregion Artillery/Naval/Air tasking - --- #region Mark helpers -function FAC:_markPoint(group, point, label) - local p3 = { x=point.x, y=land.getHeight({x=point.x,y=point.z}), z=point.z } - trigger.action.smoke(p3, self.Config.FAC_smokeColour_BLUE) - local id = math.floor(timer.getTime()*1000 + 0.5) - local lat, lon = coord.LOtoLL(p3) - local txt = string.format('FAC: %s at %s', label or 'Contact', _llToDMS(lat,lon)) - trigger.action.markToCoalition(id, txt, p3, self.Side, true) -end - --- #region Code reservation helpers -function FAC:_reserveCode(side, uname, code) - self._reservedCodes[side] = self._reservedCodes[side] or {} - local pool = self._reservedCodes[side] - code = tostring(code) - if pool[code] and pool[code] ~= uname then - -- Find a free alternative from configured list - local fallback = self:_assignFreeCode(side, uname) - if fallback then - -- Inform coalition about reassignment - trigger.action.outTextForCoalition(side, string.format('FAC %s requested code %s but it is in use by %s. Assigned %s instead.', self:_facName(uname), code, self:_facName(pool[code]), fallback), 10) - return fallback - end - -- No free code, keep requested (collision allowed with notice) - trigger.action.outTextForCoalition(side, string.format('FAC %s is sharing code %s with %s (no free codes).', self:_facName(uname), code, self:_facName(pool[code])), 10) - end - pool[code] = uname - return code -end - -function FAC:_assignFreeCode(side, uname) - self._reservedCodes[side] = self._reservedCodes[side] or {} - local pool = self._reservedCodes[side] - for _,c in ipairs(self.Config.FAC_laser_codes or {'1688'}) do - local key = tostring(c) - if not pool[key] or pool[key] == uname then - pool[key] = uname - return key - end - end - return nil -end - -function FAC:_releaseCode(side, uname) - local pool = self._reservedCodes[side] - if not pool then return end - for code,owner in pairs(pool) do - if owner == uname then pool[code] = nil end - end -end - -function FAC:_showCodesCoalition() - local side = self.Side - local pool = self._reservedCodes[side] or {} - local lines = {'FAC Codes In Use:\n'} - local any = false - for _,c in ipairs(self.Config.FAC_laser_codes or {'1688'}) do - local owner = pool[tostring(c)] - if owner then any = true; table.insert(lines, string.format(' %s -> %s', tostring(c), self:_facName(owner))) end - end - if not any then table.insert(lines, ' (none)') end - trigger.action.outTextForCoalition(side, table.concat(lines, '\n'), 15) -end --- #endregion Code reservation helpers --- #endregion Mark helpers - --- #region Export -_MOOSE_CTLD_FAC = FAC -return FAC --- #endregion Export diff --git a/Moose_CTLD_Pure/Moose_CTLD_Init_DualCoalitions.lua b/Moose_CTLD_Pure/Moose_CTLD_Init_DualCoalitions.lua deleted file mode 100644 index 0afdd12..0000000 --- a/Moose_CTLD_Pure/Moose_CTLD_Init_DualCoalitions.lua +++ /dev/null @@ -1,118 +0,0 @@ --- init_mission_dual_coalition.lua --- Use in Mission Editor with DO SCRIPT FILE load order: --- 1) Moose.lua --- 2) Moose_CTLD_Pure/Moose_CTLD.lua --- 3) Moose_CTLD_Pure/catalogs/CrateCatalog_CTLD_Extract.lua -- optional but recommended catalog with BLUE+RED items (_CTLD_EXTRACTED_CATALOG) --- 4) Moose_CTLD_Pure/Moose_CTLD_FAC.lua -- optional FAC/RECCE support --- 5) DO SCRIPT: dofile on this file OR paste the block below directly --- --- IMPORTANT: F10 menu ordering depends on script execution order! --- Load this initialization script BEFORE other mission scripts (TADC, CVN, Intel, etc.) --- to ensure CTLD and FAC appear earlier in the F10 menu. --- --- Zones you should create in the Mission Editor (as trigger zones): --- BLUE: PICKUP_BLUE_MAIN, DROP_BLUE_1, FOB_BLUE_A --- RED : PICKUP_RED_MAIN, DROP_RED_1, FOB_RED_A --- Adjust names below if you use different zone names. - - --- Create CTLD instances only if Moose and CTLD are available -if _MOOSE_CTLD and _G.BASE then -local blueCfg = { - CoalitionSide = coalition.side.BLUE, - PickupZoneSmokeColor = trigger.smokeColor.Green, - AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB) - 'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI' - }, - -- Optional: drive zone activation from mission flags (preferred: set per-zone below via flag/activeWhen) - - MapDraw = { - Enabled = true, - DrawMASHZones = true, -- Enable MASH zone drawing - }, - - Zones = { - PickupZones = { { name = 'ALPHA', flag = 9001, activeWhen = 0 } }, - DropZones = { { name = 'BRAVO', flag = 9002, activeWhen = 0 } }, - FOBZones = { { name = 'CHARLIE', flag = 9003, activeWhen = 0 } }, - MASHZones = { { name = 'MASH Alpha', freq = '251.0 AM', radius = 500, flag = 9010, activeWhen = 0 } }, - SalvageDropZones = { { name = 'S1', flag = 9020, radius = 500, activeWhen = 0 } }, - }, - BuildRequiresGroundCrates = true, -} -env.info('[DEBUG] blueCfg.Zones.MASHZones count: ' .. tostring(blueCfg.Zones and blueCfg.Zones.MASHZones and #blueCfg.Zones.MASHZones or 'NIL')) -if blueCfg.Zones and blueCfg.Zones.MASHZones and blueCfg.Zones.MASHZones[1] then - env.info('[DEBUG] blueCfg.Zones.MASHZones[1].name: ' .. tostring(blueCfg.Zones.MASHZones[1].name)) -end -ctldBlue = _MOOSE_CTLD:New(blueCfg) - -local redCfg = { - CoalitionSide = coalition.side.RED, - PickupZoneSmokeColor = trigger.smokeColor.Green, - AllowedAircraft = { -- transport-capable unit type names (case-sensitive as in DCS DB) - 'UH-1H','Mi-8MTV2','Mi-24P','SA342M','SA342L','SA342Minigun','UH-60L','CH-47Fbl1','CH-47F','Mi-17','GazelleAI' - - }, - -- Optional: drive zone activation for RED via per-zone flag/activeWhen - - MapDraw = { - Enabled = true, - DrawMASHZones = true, -- Enable MASH zone drawing - }, - - Zones = { - PickupZones = { { name = 'DELTA', flag = 9101, activeWhen = 0 } }, - DropZones = { { name = 'ECHO', flag = 9102, activeWhen = 0 } }, - FOBZones = { { name = 'FOXTROT', flag = 9103, activeWhen = 0 } }, - MASHZones = { { name = 'MASH Bravo', freq = '252.0 AM', radius = 500, flag = 9111, activeWhen = 0 } }, - SalvageDropZones = { { name = 'S2', flag = 9020, radius = 500, activeWhen = 0 } }, - }, - BuildRequiresGroundCrates = true, -} -env.info('[DEBUG] redCfg.Zones.MASHZones count: ' .. tostring(redCfg.Zones and redCfg.Zones.MASHZones and #redCfg.Zones.MASHZones or 'NIL')) -if redCfg.Zones and redCfg.Zones.MASHZones and redCfg.Zones.MASHZones[1] then - env.info('[DEBUG] redCfg.Zones.MASHZones[1].name: ' .. tostring(redCfg.Zones.MASHZones[1].name)) -end -ctldRed = _MOOSE_CTLD:New(redCfg) - --- Merge catalog into both CTLD instances if catalog was loaded -env.info('[init_mission_dual_coalition] Checking for catalog: '..((_CTLD_EXTRACTED_CATALOG and 'FOUND') or 'NOT FOUND')) -if _CTLD_EXTRACTED_CATALOG then - local count = 0 - for k,v in pairs(_CTLD_EXTRACTED_CATALOG) do count = count + 1 end - env.info('[init_mission_dual_coalition] Catalog has '..tostring(count)..' entries') - env.info('[init_mission_dual_coalition] Merging catalog into CTLD instances') - ctldBlue:MergeCatalog(_CTLD_EXTRACTED_CATALOG) - ctldRed:MergeCatalog(_CTLD_EXTRACTED_CATALOG) - env.info('[init_mission_dual_coalition] Catalog merged successfully') - -- Verify merge - local blueCount = 0 - for k,v in pairs(ctldBlue.Config.CrateCatalog) do blueCount = blueCount + 1 end - env.info('[init_mission_dual_coalition] BLUE catalog now has '..tostring(blueCount)..' entries') -else - env.info('[init_mission_dual_coalition] WARNING: _CTLD_EXTRACTED_CATALOG not found - catalog not loaded!') - env.info('[init_mission_dual_coalition] Available globals: '..((_G._CTLD_EXTRACTED_CATALOG and 'in _G') or 'not in _G')) -end -else - env.info('[init_mission_dual_coalition] Moose or CTLD missing; skipping CTLD init') -end - - --- Optional: FAC/RECCE for both sides (requires Moose_CTLD_FAC.lua) -if _MOOSE_CTLD_FAC and _G.BASE and ctldBlue and ctldRed then - facBlue = _MOOSE_CTLD_FAC:New(ctldBlue, { - CoalitionSide = coalition.side.BLUE, - Arty = { Enabled = false }, - }) - -- facBlue:AddRecceZone({ name = 'RECCE_BLUE_1' }) - facBlue:Run() - - facRed = _MOOSE_CTLD_FAC:New(ctldRed, { - CoalitionSide = coalition.side.RED, - Arty = { Enabled = false }, - }) - -- facRed:AddRecceZone({ name = 'RECCE_RED_1' }) - facRed:Run() -else - env.info('[init_mission_dual_coalition] FAC not initialized (missing Moose/CTLD/FAC or CTLD not created)') -end diff --git a/Moose_CTLD_Pure/Moose_CTLD_Pure.miz b/Moose_CTLD_Pure/Moose_CTLD_Pure.miz deleted file mode 100644 index ee30c9e..0000000 Binary files a/Moose_CTLD_Pure/Moose_CTLD_Pure.miz and /dev/null differ diff --git a/Moose_CTLD_Pure/Player_Mission_Guide.html b/Moose_CTLD_Pure/Player_Mission_Guide.html deleted file mode 100644 index 9932325..0000000 --- a/Moose_CTLD_Pure/Player_Mission_Guide.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - -Complete MOOSE CTLD System — Player & Mission Setup Guide - - - -

Complete MOOSE CTLD System — Player & Mission Setup Guide

-

Welcome! This guide explains what logistics means in DCS, how the CTLD system lets players change the battlefield, and exactly how to use the in-game menus. It also includes a concise mission-maker setup section.

-
- -

What is CTLD and why it matters

- -
Screenshot placeholder: F10 -> CTLD root menu
-

Tip: The loop you’ll repeat is Request → Deliver → Build → Fight.

-
- -

Getting started (players)

-
    -
  1. Spawn in a supported helicopter or transport.
  2. -
  3. Fly to a friendly Supply (Pickup) Zone.
  4. -
  5. Open F10 Other -> CTLD.
  6. -
  7. Use Logistics -> Request Crate to spawn crates; use Operations -> Build to assemble units/sites.
  8. -
  9. Use Navigation to get vectors and Hover Coach, and Field Tools to mark or create a quick Drop Zone.
  10. -
  11. Deliver, build, and watch the mission evolve.
  12. -
-
Screenshot placeholder: Example Pickup Zone with smoke
-
- -

Menu overview (matches in-game structure)

-

Below are the menu groups and the common actions you’ll see under each. Some options appear only when relevant (e.g., inventory enabled, crates nearby, zones configured).

- -

Operations

-
Screenshot placeholder: Operations menu open
- - -

Logistics

-
Screenshot placeholder: Logistics -> Request Crate
- - -

Field Tools

-
Screenshot placeholder: Field Tools menu open
- - -

Navigation

-
Screenshot placeholder: Navigation menu open
- - -

Admin/Help

-
Screenshot placeholder: Admin/Help menu open
- - -
-

How players influence the mission

- -
Screenshot placeholder: Example built SAM site
- -
-

Mission setup (for mission makers)

-

Keep this section short and focused. You can find the defaults and toggles inside:

- - -

Load order (Do Script File in Mission Editor)

-
    -
  1. Moose.lua
  2. -
  3. Moose_CTLD_Pure/Moose_CTLD.lua
  4. -
  5. A catalog file from Moose_CTLD_Pure/catalogs/ (optional but recommended)
  6. -
  7. Moose_CTLD_Pure/Moose_CTLD_FAC.lua (optional FAC/RECCE)
  8. -
  9. Your mission init block (you can use Moose_CTLD_Pure/init_mission_dual_coalition.lua as-is or adapt it)
  10. -
-
Screenshot placeholder: Mission Editor Do Script File list
- -

Minimal snippet (example) — keep it to the point:

- -

Hint: See the shipped init_mission_dual_coalition.lua for a clean example of both BLUE and RED.

- -

Zones you must create in the Mission Editor

- -

Use the names referenced by your init script. The example init uses flags to control active/inactive state.

-
Screenshot placeholder: Trigger zones for Pickup/Drop/FOB
- -

Frequently configured options (where to change)

-

All of the following live under CTLD.Config in Moose_CTLD.lua or can be provided in the table passed to _MOOSE_CTLD:New({...}) in your init script.

- - -

Crate catalog (recipes)

- -
Screenshot placeholder: Request Crate categories
- -

Dual-coalition setup

- - -

FAC/RECCE (optional, from Moose_CTLD_FAC.lua)

- - -

Sanity checks and troubleshooting

- - -
-

Screenshot ideas (drop your captures in the placeholders above)

- - -
-

Appendix: File locations and names

- -

No large code is required; most options are cleanly exposed in the config tables. Keep snippets tiny when needed.

- - \ No newline at end of file diff --git a/Moose_CTLD_Pure/Player_Mission_Guide.md b/Moose_CTLD_Pure/Player_Mission_Guide.md deleted file mode 100644 index 22c618f..0000000 --- a/Moose_CTLD_Pure/Player_Mission_Guide.md +++ /dev/null @@ -1,438 +0,0 @@ -# Complete MOOSE CTLD System — Player & Mission Setup Guide - -Welcome! This guide explains what logistics means in DCS, how the CTLD system lets players change the battlefield, and exactly how to use the in-game menus. It also includes a concise mission-maker setup section. - ---- - -## What is CTLD and why it matters - -- CTLD (logistics & troop transport) turns helicopters and transports into force multipliers. -- You request “crates” at Supply (Pickup) Zones, deliver them, and build combat units, SAM sites, radars, FOBs, and support vehicles. -- You can also transport troops and deploy them to hold ground or attack. -- Every delivered asset can change the front line: new air defenses, JTACs, EWR coverage, armor pushes, or an FOB that shortens logistics legs. - -[screenshot: F10 -> CTLD root menu] - -Tip: The loop you’ll repeat is Request → Pickup → Transport → Deliver → Build → Fight. - ---- - -## Getting started (players) - -1) Spawn in a supported helicopter or transport. -2) Fly to a friendly Supply (Pickup) Zone. -3) Open F10 Other -> CTLD. -4) Use Logistics -> Request Crate to spawn crates; use Operations -> Build to assemble units/sites. -5) Use Navigation to get vectors and Hover Coach, and Field Tools to mark or create a quick Drop Zone. -6) Deliver, build, and watch the mission evolve. - -[screenshot: Example Pickup Zone with smoke] - ---- - -## Menu overview (matches in-game structure) - -Below are the menu groups and the common actions you’ll see under each. Some options appear only when relevant (e.g., inventory enabled, crates nearby, zones configured). - -### Operations - -[screenshot: Operations menu open] - -- Troop Transport - - Load Troops: Load infantry while inside an ACTIVE Supply (Pickup) Zone if the mission enforces this rule. - - Deploy Troops (Defend): Unload troops to hold the current area and defend nearby. - - Deploy Troops (Attack): Unload troops and order them to seek and engage enemies or move toward enemy-held bases (mission-configured behavior and speed). Static/unsuitable units will hold position. - - Notes - - Troop loading may be restricted to Pickup Zones. The nearest zone will be shown in messages if you’re outside. - - Deployment is blocked inside Pickup Zones when restrictions are enabled. - -- Build - - Build Here: Consumes nearby crates (within the Build Radius) and spawns the unit/site at your position. Includes a "confirm within X seconds" safety and a cooldown between builds. - - Build (Advanced) → Buildable Near You - - Lists everything that can be built with crates you've dropped nearby (and optionally what you're carrying, depending on mission settings). - - Per item you'll see: - - Build [Hold Position]: Spawns and orders the unit/site to hold. - - Build [Attack (N m)]: Spawns and orders mobile units to seek/attack within the configured radius. Static/unsuitable units will still hold. - - Refresh Buildable List: Re-scan nearby crates and update the list. - - FOB-only recipes can require building inside an FOB Zone when enabled (mission-specific rule). - -- MEDEVAC (if enabled in mission) - - List Active MEDEVAC Requests: Shows all pending rescue missions with grid coordinates and time remaining - - Nearest MEDEVAC Location: Bearing and range to the closest MEDEVAC crew needing rescue - - Coalition Salvage Points: Display current salvage point balance for your coalition - - Vectors to Nearest MEDEVAC: Full details (bearing, range, time remaining) to nearest crew - - MASH Locations: Shows all active MASH (Mobile Army Surgical Hospital) zones where you can deliver crews - - Pop Smoke at Crew Locations: Marks all active crew locations with smoke for easier visual identification - - Pop Smoke at MASH Zones: Marks all MASH zones with smoke - - MASH & Salvage System - Guide: In-game quick reference for the MEDEVAC system (same as in Admin/Help -> Player Guides) - - Admin/Settings → Clear All MEDEVAC Missions: Debug/admin tool to reset all active MEDEVAC missions - -### Logistics - -[screenshot: Logistics -> Request Crate] - -- Request Crate - - Menu is organized by categories (e.g., Combat Vehicles, AAA, SAM short range, Support, Artillery, etc.). - - Each entry shows how many crates are required (e.g., “M1097 Avenger (2 crates)”). - - Requests generally require being within the maximum distance to an ACTIVE Pickup Zone. - - When inventory is enabled, stock is tracked per zone; out-of-stock types cannot be requested at that location until resupplied. - -- Recipe Info - - Browse categories and see each item’s description; use this to plan which crates you need to build a unit or a multi-crate site. - -- Request Crate (In Stock Here) - - Appears when inventory menus are enabled and the mission-maker has exposed this view. - - Shows only items in stock at your nearest active Supply Zone and lets you spawn them directly. - - Includes a “Refresh” option to update the list after requests. - -- Crate handling tips - - Crates are marked with smoke at spawn. - - Use Navigation -> Request Vectors to Nearest Crate if you lose sight of it. - - Hover pickup: hold roughly 5–20 m AGL, very low ground speed, steady for a few seconds to auto-load. - - Crates have a mission-configured lifetime and will self-cleanup if not used. - -### Field Tools - -[screenshot: Field Tools menu open] - -- Create Drop Zone (AO) - - Quickly creates a temporary Drop Zone around your current position for coordination or scripted objectives. - -- Smoke My Location - - Green / Red / White / Orange / Blue: Mark your current spot with smoke to help other players find you or the build point. - -### Navigation - -[screenshot: Navigation menu open] - -- Hover Coach: Enable / Disable - - In-game guidance messages to help you nail the hover pickup window (AGL, drift, speed, “hold steady” cues). - -- Request Vectors to Nearest Crate - - Prints bearing and range to the closest friendly crate. - -- Vectors to Nearest Pickup Zone - - Bearing and range to the nearest active Supply (Pickup) Zone; if none are active, you’ll get helpful direction to the nearest configured one. - -### Admin/Help - -[screenshot: Admin/Help menu open] - -- Show CTLD Status - - Quick summary of active crates, how many zones exist, and whether Build Confirm/Cooldown are ON. - -- Draw CTLD Zones on Map / Clear CTLD Map Drawings - - Draws labeled circles for Pickup/Drop/FOB zones on the F10 map for your coalition; clear them when you’re done. - -- Debug → Enable logging / Disable logging - - Toggles detailed logging (mission maker troubleshooting). - -- Player Guides (in-game quick reference) - - Zones – Guide - - Inventory – How It Works - - CTLD Basics (2-minute tour) - - Troop Transport & JTAC Use - - Hover Pickup & Slingloading - - Build System: Build Here and Advanced - - SAM Sites: Building, Repairing, and Augmenting - -- Coalition Summary (if exposed by mission maker) - - A roll-up of coalition CTLD activity (counts, highlights). Exact placement depends on mission configuration. - ---- - -## How players influence the mission - -- Build air defenses (SAM/AAA): Protect friendly FARPs/FOBs and deny enemy air. -- Deploy armor and ATGM teams: Push objectives, ambush enemy convoys, or hold key terrain. -- Build EWR/JTAC: Improve situational awareness and targeting support. -- Establish FOBs: Create forward supply hubs to shorten flight times and increase the tempo of logistics. -- Rescue MEDEVAC crews: Save downed vehicle crews, earn salvage points, and keep friendly vehicles in the fight. - -[screenshot: Example built SAM site] - -Practical tip: Coordinate. One player can shuttle crates while others escort or build. FOBs multiply everyone's effectiveness. - ---- - -## MEDEVAC & Salvage System (Player Operations Guide) - -The MEDEVAC (Medical Evacuation) and Salvage system adds a high-stakes rescue mission layer to logistics. When friendly ground vehicles are destroyed, their crews may survive and call for rescue. Successfully rescuing and delivering these crews to MASH zones earns your coalition Salvage Points—a critical resource that keeps logistics flowing even when supply zones run dry. - -### What is MEDEVAC? - -- **Vehicle destruction triggers rescue missions**: When a friendly ground vehicle (tank, APC, AA vehicle, etc.) is destroyed, the crew has a chance to survive and spawn near the wreck. -- **Time-limited rescue window**: Crews have a limited time (typically 60 minutes) to be rescued. If no one comes, they're KIA and the vehicle is permanently lost. -- **Coalition-wide benefit**: Any helicopter pilot can attempt the rescue. Successful delivery to MASH earns salvage points for the entire coalition. - -### How the rescue workflow works - -1. **Vehicle destroyed → Crew spawns** (after a delay, typically 5 minutes to let the battle clear) - - Crew spawns near the wreck with a small offset toward the nearest enemy - - Invulnerability period during announcement (crews can't be killed immediately) - - MEDEVAC request broadcast to coalition with grid coordinates and salvage value - - Map marker created (if enabled) showing location and time remaining - -2. **Navigate to crew location** - - Use Operations → MEDEVAC → Vectors to Nearest MEDEVAC for bearing and range - - Or check Navigation → Vectors to Nearest MEDEVAC Crew - - Crews pop smoke when they detect approaching helicopters (typically within 8 km) - - Watch for humorous greeting messages when you get close! - -3. **Load the crew** - - Hover nearby and load troops normally (Operations → Troop Transport → Load Troops) - - System automatically detects MEDEVAC crew and marks them as rescued - - **Original vehicle respawns at its death location** (if enabled), fully repaired and ready to fight - - You'll see a confirmation message with crew size and salvage value - -4. **Deliver to MASH zone** - - Fly to any friendly MASH (Mobile Army Surgical Hospital) zone - - Use Operations → MEDEVAC → MASH Locations or Navigation → Vectors to Nearest MASH - - Deploy troops inside the MASH zone (Operations → Troop Transport → Deploy) - - **Salvage points automatically awarded** to your coalition - - Coalition-wide message announces the delivery, points earned, and new total - -### Warning system - -The mission keeps you informed of time-critical rescues: -- **15-minute warning**: "WARNING: [vehicle] crew at [grid] - rescue window expires in 15 minutes!" -- **5-minute warning**: "URGENT: [vehicle] crew at [grid] - rescue window expires in 5 minutes!" -- **Timeout**: If rescue window expires, crew is KIA and vehicle is permanently lost - -### MASH Zones (Mobile Army Surgical Hospital) - -**Fixed MASH zones** are pre-configured by the mission maker at friendly bases or FARPs. These are always active and visible on the map (use Admin/Help → Draw CTLD Zones to see them). - -**Mobile MASH** can be built by players using MASH crates from the logistics catalog: -- Request and build Mobile MASH crates like any other unit -- Creates a new delivery zone with radio beacon -- Perfect for forward operations near active combat zones -- Multiple mobile MASHs can be deployed to reduce delivery times -- If destroyed, that MASH zone stops accepting deliveries - -### Salvage Points: The economic engine - -**Earning salvage**: -- Each vehicle type has a salvage value (typically 1 point per crew member) -- Deliver crews to MASH to earn points for your coalition -- Coalition-wide pool: everyone benefits from everyone's rescues - -**Using salvage**: -- When you request crates and the supply zone is OUT OF STOCK, salvage automatically applies (if enabled) -- System consumes salvage points equal to the item's cost -- Lets you build critical items even when supply lines are exhausted -- Check current balance: Operations → MEDEVAC → Coalition Salvage Points - -**Strategic value**: -- High-value vehicles (tanks, AA systems) typically award more salvage -- Prioritize rescues based on salvage value and proximity -- Mobile MASH deployment near combat zones multiplies salvage income -- Salvage can unlock mission-critical capabilities when inventory runs low - -### Crew survival mechanics (mission-configurable) - -- **Survival chance**: Configurable per coalition (default ~50%). Not every destroyed vehicle spawns a crew. -- **MANPADS chance**: Some crew members may spawn with anti-air weapons (default ~10%), providing limited self-defense -- **Crew size**: Varies by vehicle type (catalog-defined). Tanks typically have 3-4 crew, APCs 2-3. -- **Crew defense**: Crews will return fire if engaged during rescue (can be disabled) -- **Invulnerability**: Crews are typically immortal during the announcement delay and often remain protected until rescue to prevent instant death - -### Best practices for MEDEVAC operations - -1. **Monitor requests actively**: Use Operations → MEDEVAC → List Active MEDEVAC Requests to see all pending missions -2. **Prioritize by value and time**: High salvage + low time remaining = top priority -3. **Deploy Mobile MASH forward**: Reduce delivery time by placing MASH near active combat zones -4. **Coordinate with team**: Share MEDEVAC locations. One player can rescue while another delivers to MASH. -5. **Use smoke marking**: Operations → MEDEVAC → Pop Smoke at Crew Locations marks all crews with smoke -6. **Check salvage before major operations**: Know your coalition's salvage balance before pushing objectives -7. **Risk assessment**: Don't sacrifice your aircraft for low-value rescues in hot zones. Dead rescuer = no rescue. - -### MEDEVAC menu quick reference (Operations → MEDEVAC) - -- **List Active MEDEVAC Requests**: Overview of all pending rescues (grid, vehicle type, time left) -- **Nearest MEDEVAC Location**: Quick bearing/range to closest crew -- **Vectors to Nearest MEDEVAC**: Detailed navigation info with time remaining -- **Coalition Salvage Points**: Check current balance -- **MASH Locations**: Shows all active MASH zones (fixed and mobile) -- **Pop Smoke at Crew Locations**: Visual marking for all active crews -- **Pop Smoke at MASH Zones**: Visual marking for all delivery zones -- **MASH & Salvage System - Guide**: In-game reference (same content available in Admin/Help → Player Guides) - -### MEDEVAC statistics (if enabled) - -Some missions track detailed statistics available via Admin/Help → Show MEDEVAC Statistics: -- Crews spawned, rescued, delivered to MASH -- Timed out and killed in action -- Vehicles respawned -- Salvage earned, used, and current balance - -[screenshot: MEDEVAC request message with grid coordinates] -[screenshot: Operations → MEDEVAC menu] -[screenshot: Mobile MASH deployed with beacon] - ---- - -## How players influence the mission - -- Build air defenses (SAM/AAA): Protect friendly FARPs/FOBs and deny enemy air. -- Deploy armor and ATGM teams: Push objectives, ambush enemy convoys, or hold key terrain. -- Build EWR/JTAC: Improve situational awareness and targeting support. -- Establish FOBs: Create forward supply hubs to shorten flight times and increase the tempo of logistics. -- Rescue MEDEVAC crews: Save downed vehicle crews, earn salvage points, and keep friendly vehicles in the fight. - -[screenshot: Example built SAM site] - -Practical tip: Coordinate. One player can shuttle crates while others escort or build. FOBs multiply everyone's effectiveness. - ---- - -## Mission setup (for mission makers) - -Keep this section short and focused. You can find the defaults and toggles inside: -- `Moose_CTLD_Pure/Moose_CTLD.lua` (main CTLD implementation; see the `CTLD.Config` table) -- `Moose_CTLD_Pure/Moose_CTLD_FAC.lua` (optional FAC/RECCE support) -- `Moose_CTLD_Pure/catalogs/` (example catalogs with ready-to-use recipes) -- `Moose_CTLD_Pure/init_mission_dual_coalition.lua` (ready-to-use minimal init for BLUE+RED) - -### Load order (Do Script File in Mission Editor) - -1) `Moose.lua` -2) `Moose_CTLD.lua` -3) A catalog file from `/catalogs/` -4) `Moose_CTLD_FAC.lua` (optional FAC/RECCE) -5) Your mission init block (you can use `Moose_CTLD_Pure/init_mission_dual_coalition.lua` as-is or adapt it) - -image - - -Minimal snippet (example) — keep it to the point: - -- Create a CTLD instance per coalition with: CoalitionSide, AllowedAircraft, Zones (Pickup/Drop/FOB definitions), and key toggles. -- Optionally create a FAC module instance and run it. -- Optionally merge a crate catalog. - -Hint: See the shipped `init_mission_dual_coalition.lua` for a clean example of both BLUE and RED. - -### Zones you must create in the Mission Editor - -- Pickup (Supply): e.g., `ALPHA` (BLUE), `DELTA` (RED) -- Drop: e.g., `BRAVO` (BLUE), `ECHO` (RED) -- FOB: e.g., `CHARLIE` (BLUE), `FOXTROT` (RED) -- MASH (optional, for MEDEVAC): e.g., `MASH_BLUE_1`, `MASH_RED_1` (accepts crew deliveries for salvage points) - -Use the names referenced by your init script. The example init uses flags to control active/inactive state. - -[screenshot: Trigger zones for Pickup/Drop/FOB/MASH] - -### Frequently configured options (where to change) - -All of the following live under `CTLD.Config` in `Moose_CTLD.lua` or can be provided in the table passed to `_MOOSE_CTLD:New({...})` in your init script. - -- Logistics rules - - `RequirePickupZoneForCrateRequest`: Enforce being near an ACTIVE Supply Zone to request crates - - `RequirePickupZoneForTroopLoad`: Enforce being inside a Supply Zone to load troops - - `PickupZoneMaxDistance`: Max distance to the nearest ACTIVE zone for crate requests - - `ForbidDropsInsidePickupZones`: Block dropping crates inside Supply Zones - - `ForbidTroopDeployInsidePickupZones`: Block troop deployment inside Supply Zones - - `ForbidChecksActivePickupOnly`: If true, restrictions apply only to ACTIVE zones - -- Building behavior - - `BuildRadius`: How far to search for crates around the player when building - - `BuildSpawnOffset`: Push spawn a few meters ahead of the aircraft to avoid collisions - - `BuildConfirmEnabled` + `BuildConfirmWindowSeconds`: Double-press safety to prevent accidental builds - - `BuildCooldownEnabled` + `BuildCooldownSeconds`: Per-group cooldown after a successful build - - `RestrictFOBToZones`: When true, FOB-only builds must occur inside an FOB Zone - - `AutoBuildFOBInZones`: When true, crates for FOBs inside an FOB Zone can auto-build - -- Inventory system (per-zone stock) - - `Inventory.Enabled`: Track stock per Supply Zone and FOB - - `Inventory.ShowStockInMenu`: Show counts in menu labels - - `Inventory.HideZeroStockMenu`: Enable the special “In Stock Here” menu at nearest zone - - `Inventory.FOBStockFactor`: % of initial stock seeded when a new FOB is built - -- Hover & pickup quality-of-life - - `HoverCoachConfig`: Message timing and thresholds for the in-game hover guidance - - `TroopSpawnOffset`: Spawn troops slightly forward to avoid overlaps - -- AI behavior for Attack builds - - `AttackAI.VehicleSearchRadius`: How far spawned vehicles look for enemies when ordered to Attack - - `AttackAI.MoveSpeedKmh`: Movement speed for Attack orders - -- MEDEVAC & Salvage system (optional feature) - - `MEDEVAC.Enabled`: Master switch for the rescue/salvage system - - `MEDEVAC.CrewSurvivalChance`: Per-coalition probability that destroyed vehicle crews survive (0.0-1.0) - - `MEDEVAC.ManPadSpawnChance`: Probability crews spawn with MANPADS for self-defense - - `MEDEVAC.CrewSpawnDelay`: Seconds after death before crew spawns (allows battle to clear) - - `MEDEVAC.CrewTimeout`: Max time for rescue before crew is KIA (default 3600 = 1 hour) - - `MEDEVAC.CrewImmortalDuringDelay`: Invulnerability during announcement delay - - `MEDEVAC.PopSmokeOnApproach`: Auto-smoke when helos get close (default true) - - `MEDEVAC.RespawnOnPickup`: Original vehicle respawns when crew is rescued (default true) - - `MEDEVAC.Salvage.Enabled`: Enable salvage points economy - - `MEDEVAC.Salvage.AutoApply`: Auto-use salvage for out-of-stock items (default true) - - `MEDEVAC.MapMarkers.Enabled`: Create F10 map markers for active MEDEVAC requests - - `Zones.MASHZones`: Configure fixed MASH delivery zones (Mobile MASH can be built by players) - -- Menus - - `UseGroupMenus`: Per-group F10 menus (recommended) - - `UseCategorySubmenus`: Organize Request Crate/Recipe Info by category - - `PickupZoneSmokeColor`: Color for crate spawn smoke marks - -### Crate catalog (recipes) - -- Use one of the provided catalogs under `Moose_CTLD_Pure/catalogs/` or your own. -- Each entry defines a display label, side, category, stock, and a build function. -- Multi-crate “SITE” entries build multi-unit groups (SAM sites or composite systems). -- Typical workflow - - Load your chosen catalog after `Moose_CTLD.lua`. - - Merge it into each CTLD instance you created. - -[screenshot: Request Crate categories] - -### Dual-coalition setup - -- Instantiate two CTLD instances (one per side), each with its own zone names and smoke colors. -- Instantiate two FAC modules if you want auto-lase/RECCE for both sides. -- The included `init_mission_dual_coalition.lua` shows a minimal working setup. - -### FAC/RECCE (optional, from `Moose_CTLD_FAC.lua`) - -- What it adds - - Auto-lase with configurable laser codes, IR markers, map marks - - Manual target lists, quick multi-strike helper - - Artillery/Naval/Air tasking (HE/illum/mortar, carpet/TALD prompts) - - RECCE sweeps: detects and marks units with DMS/MGRS -- Player usage - - Look for an F10 FAC/RECCE menu in qualifying aircraft or groups -- Mission knobs - - CoalitionSide, auto-lase behavior, code reservations, marker type/color, and on-station logic are configurable in `Moose_CTLD_FAC.lua` or via `:New()` overrides - -### Sanity checks and troubleshooting - -- Use Admin/Help -> Show CTLD Status to verify counts and toggles quickly. -- Draw zones to confirm names/positions match your intent. -- If crates don’t spawn: check zone active state, distance to zone, and inventory stock. -- If builds don’t trigger: check Build Radius, confirm window, cooldown, and that the crates match the recipe. - ---- - -## Screenshot ideas (drop your captures in the placeholders above) - -- CTLD root menu with the five groups (Operations, Logistics, Field Tools, Navigation, Admin/Help) -- Request Crate with category submenus visible -- Build (Advanced) -> Buildable Near You list -- Hover Coach prompt during a near-perfect hover -- Vectors message to a crate / pickup zone -- Zone drawings on the F10 map (Pickup/Drop/FOB labeled) -- In Stock Here list (if enabled) -- Example SAM site placed after a build - ---- - -## Appendix: File locations and names - -- Main CTLD: `Moose_CTLD_Pure/Moose_CTLD.lua` -- FAC/RECCE: `Moose_CTLD_Pure/Moose_CTLD_FAC.lua` -- Example dual-coalition init: `Moose_CTLD_Pure/init_mission_dual_coalition.lua` -- Catalogs: `Moose_CTLD_Pure/catalogs/` - -No large code is required; most options are cleanly exposed in the config tables. Keep snippets tiny when needed. diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_TEST.vap b/Moose_CTLD_Pure/Voice Attack/CTLD_TEST.vap deleted file mode 100644 index e4d11eb..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_TEST.vap +++ /dev/null @@ -1,25 +0,0 @@ - - - DCS CTLD Menu Navigation - a8f7c9d2-4e6b-4c1a-9f3e-2a8d7c6b5e4f - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c0d - load troops - - - {RALT}\{F2}{F1}{F1} - - - - - 4b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e - show status;ctld status;check status - - - {RALT}\{F5}{F2} - - - - - diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Guide.md b/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Guide.md deleted file mode 100644 index eedbd9c..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Guide.md +++ /dev/null @@ -1,266 +0,0 @@ -# DCS CTLD Voice Attack Profile Guide - -## Overview -This Voice Attack profile provides voice command navigation for the Moose CTLD (Combat Troop and Logistics Deployment) menu system in DCS World. All commands use direct navigation - saying the command automatically navigates through the entire F10 menu path. - -## Installation - -### 1. Import the Profile -1. Open Voice Attack -2. Click the wrench icon (Edit Profile) -3. Click "Import Profile" -4. Navigate to `CTLD_VoiceAttack_Profile.xml` -5. Select the profile and click OK - -### 2. DCS Key Binding (No Configuration Needed!) -The profile uses **Right Alt + Backslash** (`RAlt + \`) which works in all situations: - -- **On the ground:** Backslash `\` alone opens F10, but `RAlt + \` also works -- **In the air:** Only `RAlt + \` works (backslash alone is disabled) - -The profile uses `RAlt + \` for all commands, ensuring compatibility both on ground and in air. - -**No DCS configuration changes needed** - this is the default binding! - -## F10 Key Binding - -### How DCS F10 Menu Works -- **On ground:** Backslash `\` key opens F10 menu -- **In the air:** `\` is disabled, must use `Right Alt + \` - -### Voice Attack Profile -All commands use **`RAlt + \`** which works in both situations: -``` -"load troops" → RAlt + \ + F2 + F1 + F1 -"build here" → RAlt + \ + F2 + F2 + F1 -"vectors to pickup" → RAlt + \ + F4 + F2 -``` - -This ensures voice commands work whether you're on the ground or flying! - -## Command Reference - -### OPERATIONS: Troop Transport - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "load troops" | Load troops at supply zone | Operations → Troop Transport → Load Troops | -| "deploy troops"
"deploy hold"
"deploy defend" | Deploy troops in defensive posture | Operations → Troop Transport → Deploy [Hold Position] | -| "deploy attack"
"troops attack" | Deploy troops with attack orders | Operations → Troop Transport → Deploy [Attack] | - -### OPERATIONS: Build - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "build here"
"build at position" | Build collected crates at location | Operations → Build → Build Here | -| "refresh buildable list"
"refresh build list" | Update list of buildable items | Operations → Build → Refresh Buildable List | - -### OPERATIONS: MEDEVAC (if enabled) - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "list medevac"
"active medevac requests" | Show all active MEDEVAC missions | Operations → MEDEVAC → List Active MEDEVAC Requests | -| "nearest medevac location"
"medevac location" | Show nearest MEDEVAC crew location | Operations → MEDEVAC → Nearest MEDEVAC Location | -| "salvage points"
"check salvage" | Display coalition salvage points | Operations → MEDEVAC → Coalition Salvage Points | -| "vectors to medevac"
"medevac vectors" | Get bearing/range to nearest crew | Operations → MEDEVAC → Vectors to Nearest MEDEVAC | -| "mash locations"
"show mash" | List all MASH zones | Operations → MEDEVAC → MASH Locations | -| "smoke crew locations"
"mark crews" | Pop smoke at MEDEVAC crew positions | Operations → MEDEVAC → Pop Smoke at Crew Locations | -| "smoke mash zones"
"mark mash" | Pop smoke at MASH delivery zones | Operations → MEDEVAC → Pop Smoke at MASH Zones | - -### LOGISTICS: Crate Management - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "drop one crate"
"drop crate" | Drop single loaded crate | Logistics → Crate Management → Drop One Loaded Crate | -| "drop all crates"
"drop cargo" | Drop all loaded crates | Logistics → Crate Management → Drop All Loaded Crates | -| "mark nearest crate"
"smoke crate"
"remark crate" | Re-mark closest crate with smoke | Logistics → Crate Management → Re-mark Nearest Crate | -| "show inventory"
"check inventory"
"zone inventory" | Display zone inventory | Logistics → Show Inventory at Nearest Zone | - -### FIELD TOOLS - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "create drop zone"
"mark drop zone" | Create new drop zone at position | Field Tools → Create Drop Zone (AO) | -| "smoke green"
"green smoke" | Pop green smoke at location | Field Tools → Smoke My Location → Green | -| "smoke red"
"red smoke" | Pop red smoke at location | Field Tools → Smoke My Location → Red | -| "smoke white"
"white smoke" | Pop white smoke at location | Field Tools → Smoke My Location → White | -| "smoke orange"
"orange smoke" | Pop orange smoke at location | Field Tools → Smoke My Location → Orange | -| "smoke blue"
"blue smoke" | Pop blue smoke at location | Field Tools → Smoke My Location → Blue | - -### NAVIGATION - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "vectors to crate"
"find crate"
"nearest crate" | Get bearing/range to nearest crate | Navigation → Request Vectors to Nearest Crate | -| "vectors to pickup"
"find pickup zone"
"nearest pickup" | Get bearing/range to pickup zone | Navigation → Vectors to Nearest Pickup Zone | -| "smoke nearest zone"
"mark nearest zone" | Smoke closest zone (any type) | Navigation → Smoke Nearest Zone | -| "smoke all zones"
"mark all zones"
"smoke nearby zones" | Smoke all zones within 5km | Navigation → Smoke All Nearby Zones (5km) | -| "vectors to mash"
"find mash"
"nearest mash" | Get bearing/range to MASH | Navigation → Vectors to Nearest MASH | -| "enable hover coach"
"hover coach on" | Enable hover pickup guidance | Navigation → Hover Coach: Enable | -| "disable hover coach"
"hover coach off" | Disable hover pickup guidance | Navigation → Hover Coach: Disable | - -### STATUS & ADMIN - -| Voice Command | Action | Menu Path | -|--------------|--------|-----------| -| "show status"
"ctld status"
"check status" | Display CTLD system status | Admin/Help → Show CTLD Status | -| "draw zones on map"
"show zones"
"mark zones on map" | Draw all zones on F10 map | Admin/Help → Draw CTLD Zones on Map | -| "clear map drawings"
"clear map marks"
"remove zone marks" | Remove zone drawings from map | Admin/Help → Clear CTLD Map Drawings | -| "medevac statistics"
"medevac stats"
"show medevac stats" | Display MEDEVAC statistics | Admin/Help → Show MEDEVAC Statistics | - -### QUICK ACCESS COMMANDS - -These are alternate phrases for commonly used functions: - -| Voice Command | Equivalent To | -|--------------|---------------| -| "quick pickup"
"pickup mode" | "load troops" | -| "quick deploy"
"fast deploy" | "deploy troops" | -| "quick build"
"fast build" | "build here" | - -## Usage Tips - -### 1. Voice Recognition Accuracy -- Speak clearly and at normal volume -- Pause briefly between words for best recognition -- If a command doesn't work, try an alternate phrase -- Train Voice Attack with your voice for better accuracy - -### 2. Menu Navigation Timing -- Commands execute instantly with no delays -- DCS menu system is fast - no need to wait between commands -- If you're in a different menu, the command will navigate from wherever you are - -### 3. Common Workflows - -**Troop Transport Mission:** -1. "vectors to pickup" (find supply zone) -2. "load troops" (board passengers) -3. Fly to destination -4. "deploy hold" or "deploy attack" (unload with orders) - -**Crate Logistics Mission:** -1. "vectors to pickup" (find supply zone) -2. Use manual F10 menu to request specific crates -3. "vectors to crate" (find spawned crate) -4. Pick up crate -5. "build here" (deploy at destination) - -**MEDEVAC Mission:** -1. "list medevac" (check active requests) -2. "vectors to medevac" (find nearest crew) -3. Pick up crew (auto-load when landed nearby) -4. "vectors to mash" (find hospital) -5. Deploy at MASH (auto-unload) -6. "salvage points" (check rewards) - -**Reconnaissance:** -1. "smoke all zones" (mark nearby objectives) -2. "draw zones on map" (see all zones on F10) -3. "vectors to pickup" (return to base) -4. "clear map drawings" (clean up map) - -### 4. Combat Situations -Voice commands work best when: -- ✓ Flying stable (not in combat maneuvers) -- ✓ Hands free for flight controls -- ✓ Clear of radio chatter/background noise -- ✗ Not recommended during combat or emergency procedures - -### 5. Request Crate Limitation -**Note:** The profile does NOT include voice commands for requesting specific crate types because: -- There are dozens of crate types (vehicles, SAMs, FOBs, etc.) -- Categories vary by mission configuration -- Manual F10 navigation (F2 → Logistics → Request Crate) is more practical - -Use voice commands for navigation/status, manual F10 for crate requests. - -## Troubleshooting - -### Command Not Recognized -1. Check Voice Attack is running and profile is active -2. Train Voice Attack with your voice (Tools → Train Profile) -3. Try alternate phrases for the command -4. Verify microphone input levels - -### Wrong Menu Opens -1. Verify DCS is using default key bindings (RAlt + \ for F10) -2. Check that backslash key isn't rebound in DCS controls -3. Try manual RAlt + \ to verify F10 menu opens - -### Command Works But Menu Doesn't Navigate -1. Verify DCS is the active window -2. Check F10 menu is not already open -3. Ensure no other key bindings conflict with F-keys -4. Try manual navigation to verify menu structure matches profile - -### MEDEVAC Commands Not Available -- These commands only work if MEDEVAC system is enabled in the mission -- Check mission briefing or use "show status" to verify MEDEVAC is active - -## Profile Customization - -### Adding New Commands -1. Open Voice Attack profile editor -2. Click "New Command" -3. Set "When I say" to your phrase -4. Add Action: "Send keys to active window" -5. Enter key sequence (e.g., `{RALT}{F2}{F1}{F1}`) -6. Save command - -### Modifying Existing Commands -1. Find command in list -2. Click "Edit" -3. Modify "When I say" phrases -4. Update key sequence if menu structure changed -5. Save changes - -### Key Sequence Format -- `{RALT}` = Right Alt key -- `\\` = Backslash key (escaped in XML) -- `{F1}` through `{F9}` = Function keys -- Example: `{RALT}\\{F2}{F3}{F1}` = RAlt, \, F2, F3, F1 in sequence - -## Menu Structure Reference - -``` -CTLD (Root - F2) -├── F1: Operations -│ ├── F1: Troop Transport -│ ├── F2: Build -│ └── F3: MEDEVAC -├── F2: Logistics -│ ├── F1: Request Crate -│ ├── F2: Recipe Info -│ ├── F3: Crate Management -│ └── F4: Show Inventory -├── F3: Field Tools -├── F4: Navigation -└── F5: Admin/Help -``` - -See full menu tree diagram in main documentation. - -## Version Information - -- **Profile Version:** 1.0 -- **CTLD Version:** 0.1.0-alpha (Moose_CTLD_Pure) -- **Voice Attack Version:** 1.8+ (tested on 1.10) -- **DCS Version:** Compatible with current stable/open beta - -## Support & Updates - -If the menu structure changes in future CTLD updates: -1. Check `Moose_CTLD.lua` function `BuildGroupMenus()` (around line 2616) -2. Update key sequences in Voice Attack profile -3. Test each command to verify navigation - -## Credits - -- **CTLD System:** Moose_CTLD_Pure custom implementation -- **Voice Attack:** VoiceAttack by VoiceAttack.com -- **DCS World:** Eagle Dynamics - ---- - -**Happy Flying! 🚁** diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile.vap b/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile.vap deleted file mode 100644 index ccc61c8..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile.vap +++ /dev/null @@ -1,1138 +0,0 @@ - - - DCS CTLD Menu Navigation - a8f7c9d2-4e6b-4c1a-9f3e-2a8d7c6b5e4f - - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c0d - load troops - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F1 - - - 300 - - - F1 - - - - - 4b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e - deploy troops;deploy hold;deploy defend - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F1 - - - 300 - - - F2 - - - - - 5c9d0e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f - deploy attack;troops attack - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F1 - - - 300 - - - F3 - - - - - - - 6d0e1f2a-3b4c-5d6e-7f8a-9b0c1d2e3f4a - build here;build at position - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F2 - - - 300 - - - F1 - - - - - 7e1f2a3b-4c5d-6e7f-8a9b-0c1d2e3f4a5b - refresh buildable list;refresh build list - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F2 - - - 300 - - - F4 - - - - - - - 8f2a3b4c-5d6e-7f8a-9b0c-1d2e3f4a5b6c - list medevac;active medevac requests - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F1 - - - - - 9a3b4c5d-6e7f-8a9b-0c1d-2e3f4a5b6c7d - nearest medevac location;medevac location - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F2 - - - - - 0b4c5d6e-7f8a-9b0c-1d2e-3f4a5b6c7d8e - salvage points;check salvage - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F3 - - - - - 1c5d6e7f-8a9b-0c1d-2e3f-4a5b6c7d8e9f - vectors to medevac;medevac vectors - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F4 - - - - - 2d6e7f8a-9b0c-1d2e-3f4a-5b6c7d8e9f0a - mash locations;show mash - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F5 - - - - - 3e7f8a9b-0c1d-2e3f-4a5b-6c7d8e9f0a1b - smoke crew locations;mark crews - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F6 - - - - - 4f8a9b0c-1d2e-3f4a-5b6c-7d8e9f0a1b2c - smoke mash zones;mark mash - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F3 - - - 300 - - - F7 - - - - - - - 5a9b0c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d - drop one crate;drop crate - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F4 - - - 300 - - - F1 - - - - - 6b0c1d2e-3f4a-5b6c-7d8e-9f0a1b2c3d4e - drop all crates;drop cargo - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F4 - - - 300 - - - F2 - - - - - 7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f - mark nearest crate;smoke crate;remark crate - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F4 - - - 300 - - - F3 - - - - - 8d2e3f4a-5b6c-7d8e-9f0a-1b2c3d4e5f6a - show inventory;check inventory;zone inventory - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F4 - - - 300 - - - F4 - - - - - - - 9e3f4a5b-6c7d-8e9f-0a1b-2c3d4e5f6a7b - create drop zone;mark drop zone - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F3 - - - 300 - - - F1 - - - - - 0f4a5b6c-7d8e-9f0a-1b2c-3d4e5f6a7b8c - smoke green;green smoke - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F3 - - - 300 - - - F2 - - - 300 - - - F1 - - - - - 1a5b6c7d-8e9f-0a1b-2c3d-4e5f6a7b8c9d - smoke red;red smoke - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F3 - - - 300 - - - F2 - - - 300 - - - F2 - - - - - 2b6c7d8e-9f0a-1b2c-3d4e-5f6a7b8c9d0e - smoke white;white smoke - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F3 - - - 300 - - - F2 - - - 300 - - - F3 - - - - - 3c7d8e9f-0a1b-2c3d-4e5f-6a7b8c9d0e1f - smoke orange;orange smoke - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F3 - - - 300 - - - F2 - - - 300 - - - F4 - - - - - 4d8e9f0a-1b2c-3d4e-5f6a-7b8c9d0e1f2a - smoke blue;blue smoke - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F3 - - - 300 - - - F2 - - - 300 - - - F5 - - - - - - - 5e9f0a1b-2c3d-4e5f-6a7b-8c9d0e1f2a3b - vectors to crate;find crate;nearest crate - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F1 - - - - - 6f0a1b2c-3d4e-5f6a-7b8c-9d0e1f2a3b4c - vectors to pickup;find pickup zone;nearest pickup - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F2 - - - - - 7a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d - smoke nearest zone;mark nearest zone - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F3 - - - - - 8b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e - smoke all zones;mark all zones;smoke nearby zones - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F4 - - - - - 9c3d4e5f-6a7b-8c9d-0e1f-2a3b4c5d6e7f - vectors to mash;find mash;nearest mash - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F6 - - - - - 0d4e5f6a-7b8c-9d0e-1f2a-3b4c5d6e7f8a - enable hover coach;hover coach on - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F7 - - - - - 1e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b - disable hover coach;hover coach off - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F4 - - - 300 - - - F8 - - - - - - - 2f6a7b8c-9d0e-1f2a-3b4c-5d6e7f8a9b0c - show status;ctld status;check status - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F5 - - - 300 - - - F2 - - - - - 3a7b8c9d-0e1f-2a3b-4c5d-6e7f8a9b0c1d - draw zones on map;show zones;mark zones on map - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F5 - - - 300 - - - F3 - - - - - 4b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d3e - clear map drawings;clear map marks;remove zone marks - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F5 - - - 300 - - - F4 - - - - - 5c9d0e1f-2a3b-4c5d-6e7f-8a9b0c1d2e4f - medevac statistics;medevac stats;show medevac stats - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F5 - - - 300 - - - F5 - - - - - - - a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d - quick pickup;pickup mode - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F1 - - - 300 - - - F1 - - - - - b2c3d4e5-6f7a-8b9c-0d1e-2f3a4b5c6d7e - quick deploy;fast deploy - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F1 - - - 300 - - - F3 - - - - - c3d4e5f6-7a8b-9c0d-1e2f-3a4b5c6d7e8f - quick build;fast build - - - RALT - - - 200 - - - BACKSLASH - - - 300 - - - F2 - - - 300 - - - F2 - - - 300 - - - F1 - - - - - diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_F10.vap b/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_F10.vap deleted file mode 100644 index 9cd3339..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_F10.vap +++ /dev/null @@ -1,1497 +0,0 @@ - - - CTLD Voice Menu (F10) - f2c64b1e-0e5a-4cae-9f4d-0b1c2d3e4f5a - - - - c101a001-7e5f-4d2c-8b3a-1c2d3e4f5a60 - load troops;load infantry - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F1 - - - - - c101a002-7e5f-4d2c-8b3a-1c2d3e4f5a61 - load assault squad;load assault team - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F1 - - - - - c101a003-7e5f-4d2c-8b3a-1c2d3e4f5a62 - load manpads team;load aa squad - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F2 - - - - - c101a004-7e5f-4d2c-8b3a-1c2d3e4f5a63 - load anti tank team;load at squad - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F3 - - - - - c101a005-7e5f-4d2c-8b3a-1c2d3e4f5a64 - load mortar team;load mortar squad - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F4 - - - - - c101a006-7e5f-4d2c-8b3a-1c2d3e4f5a65 - deploy troops hold;deploy hold - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F3 - - - - - c101a007-7e5f-4d2c-8b3a-1c2d3e4f5a66 - deploy troops attack;deploy attack - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F1 - - - 250 - - - F4 - - - - - - - c101a008-7e5f-4d2c-8b3a-1c2d3e4f5a67 - build here;build at position - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F1 - - - - - c101a009-7e5f-4d2c-8b3a-1c2d3e4f5a68 - open build advanced;build advanced menu - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F2 - - - - - c101a00a-7e5f-4d2c-8b3a-1c2d3e4f5a69 - open buildable near you;show buildable list - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F3 - - - - - c101a00b-7e5f-4d2c-8b3a-1c2d3e4f5a6a - refresh build list;refresh buildable list - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F2 - - - 250 - - - F4 - - - - - - - c101a00c-7e5f-4d2c-8b3a-1c2d3e4f5a6b - list medevac requests;active medevac - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F1 - - - - - c101a00d-7e5f-4d2c-8b3a-1c2d3e4f5a6c - nearest medevac location;medevac location - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F2 - - - - - c101a00e-7e5f-4d2c-8b3a-1c2d3e4f5a6d - check salvage points;show salvage - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F3 - - - - - c101a00f-7e5f-4d2c-8b3a-1c2d3e4f5a6e - vectors to medevac;medevac vectors - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F4 - - - - - c101a010-7e5f-4d2c-8b3a-1c2d3e4f5a6f - show mash locations;list mash - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F5 - - - - - c101a011-7e5f-4d2c-8b3a-1c2d3e4f5a70 - smoke crew locations;mark crews - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F6 - - - - - c101a012-7e5f-4d2c-8b3a-1c2d3e4f5a71 - smoke mash zones;mark mash - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F7 - - - - - c101a013-7e5f-4d2c-8b3a-1c2d3e4f5a72 - medevac guide;salvage guide - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F1 - - - 250 - - - F3 - - - 250 - - - F8 - - - - - - - c101a014-7e5f-4d2c-8b3a-1c2d3e4f5a73 - open request crate;request crate menu - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F2 - - - 250 - - - F1 - - - 200 - - - - - c101a015-7e5f-4d2c-8b3a-1c2d3e4f5a74 - open recipe info;recipe info menu - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F2 - - - 250 - - - F2 - - - 200 - - - - - c101a016-7e5f-4d2c-8b3a-1c2d3e4f5a75 - drop one crate;drop crate - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F1 - - - - - c101a017-7e5f-4d2c-8b3a-1c2d3e4f5a76 - drop all crates;drop cargo - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F2 - - - - - c101a018-7e5f-4d2c-8b3a-1c2d3e4f5a77 - remark nearest crate;smoke crate - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F3 - - - - - c101a019-7e5f-4d2c-8b3a-1c2d3e4f5a78 - show zone inventory;check inventory - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F2 - - - 250 - - - F4 - - - - - - - c101a01a-7e5f-4d2c-8b3a-1c2d3e4f5a79 - create drop zone;mark drop zone - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F1 - - - - - c101a01b-7e5f-4d2c-8b3a-1c2d3e4f5a7a - smoke green;green smoke - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F2 - - - 250 - - - F1 - - - - - c101a01c-7e5f-4d2c-8b3a-1c2d3e4f5a7b - smoke red;red smoke - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F2 - - - 250 - - - F2 - - - - - c101a01d-7e5f-4d2c-8b3a-1c2d3e4f5a7c - smoke white;white smoke - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F2 - - - 250 - - - F3 - - - - - c101a01e-7e5f-4d2c-8b3a-1c2d3e4f5a7d - smoke orange;orange smoke - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F2 - - - 250 - - - F4 - - - - - c101a01f-7e5f-4d2c-8b3a-1c2d3e4f5a7e - smoke blue;blue smoke - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F3 - - - 250 - - - F2 - - - 250 - - - F5 - - - - - - - c101a020-7e5f-4d2c-8b3a-1c2d3e4f5a7f - vectors to crate;find crate - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F1 - - - - - c101a021-7e5f-4d2c-8b3a-1c2d3e4f5a80 - vectors to pickup zone;find pickup zone - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F2 - - - - - c101a022-7e5f-4d2c-8b3a-1c2d3e4f5a81 - smoke nearest zone;mark nearest zone - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F3 - - - - - c101a023-7e5f-4d2c-8b3a-1c2d3e4f5a82 - smoke all zones;mark all zones - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F4 - - - - - c101a024-7e5f-4d2c-8b3a-1c2d3e4f5a83 - vectors to medevac crew;find medevac crew - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F5 - - - - - c101a025-7e5f-4d2c-8b3a-1c2d3e4f5a84 - vectors to mash;find mash - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F6 - - - - - c101a026-7e5f-4d2c-8b3a-1c2d3e4f5a85 - enable hover coach;hover coach on - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F7 - - - - - c101a027-7e5f-4d2c-8b3a-1c2d3e4f5a86 - disable hover coach;hover coach off - - - RALT+BACKSLASH - - - 200 - - - F10 - - - 250 - - - F2 - - - 250 - - - F4 - - - 250 - - - F8 - - - - - diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_F10_commands.html b/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_F10_commands.html deleted file mode 100644 index cb0ead3..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_F10_commands.html +++ /dev/null @@ -1,587 +0,0 @@ - - - - - CTLD VoiceAttack Profile — Command Reference - - - -
-
-

CTLD VoiceAttack Command Reference

-

All phrases below assume the VoiceAttack profile sends Right Alt + Backslash to open the radio menu, then F10 > F2 to enter the CTLD root. Speak any phrase shown to run the navigation sequence automatically.

-
- -
- Pro Tip: Fine-tune the pause durations inside VoiceAttack if your DCS instance needs more/less time for menus to populate. You can also add your own synonyms by editing the command string list for any entry. -
- -

Operations — Troop Transport

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhrasesActionMenu Path
- load troops - load infantry - Load default troop package.Operations → Troop Transport → Load Troops
- load assault squad - load assault team - Load Assault Squad preset (AS).Operations → Troop Transport → Load Troops (Type) → Assault Squad
- load manpads team - load aa squad - Load MANPADS Team preset (AA).Operations → Troop Transport → Load Troops (Type) → MANPADS Team
- load anti tank team - load at squad - Load Anti-Tank Team preset (AT).Operations → Troop Transport → Load Troops (Type) → AT Team
- load mortar team - load mortar squad - Load Mortar Team preset (AR).Operations → Troop Transport → Load Troops (Type) → Mortar Team
- deploy troops hold - deploy hold - Unload troops with Hold/Defend behavior.Operations → Troop Transport → Deploy [Hold Position]
- deploy troops attack - deploy attack - Unload troops with Attack/Advance behavior.Operations → Troop Transport → Deploy [Attack]
- -

Operations — Build

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhrasesActionMenu Path
- build here - build at position - Build using nearby crates (with confirm/cooldown rules).Operations → Build → Build Here
- open build advanced - build advanced menu - Open the dynamic build menu.Operations → Build → Build (Advanced)
- open buildable near you - show buildable list - Focus the “Buildable Near You” submenu.Operations → Build → Build (Advanced) → Buildable Near You
- refresh build list - refresh buildable list - Rescan crate availability for builds.Operations → Build → Refresh Buildable List
- -

Operations — MEDEVAC

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhrasesActionMenu Path
- list medevac requests - active medevac - Show all active MEDEVAC crews.Operations → MEDEVAC → List Active MEDEVAC Requests
- nearest medevac location - medevac location - Display nearest crew position.Operations → MEDEVAC → Nearest MEDEVAC Location
- check salvage points - show salvage - Report coalition salvage totals.Operations → MEDEVAC → Coalition Salvage Points
- vectors to medevac - medevac vectors - Provide bearing/range to nearest crew.Operations → MEDEVAC → Vectors to Nearest MEDEVAC
- show mash locations - list mash - List all MASH delivery zones.Operations → MEDEVAC → MASH Locations
- smoke crew locations - mark crews - Drop smoke on every active crew.Operations → MEDEVAC → Pop Smoke at Crew Locations
- smoke mash zones - mark mash - Drop smoke on all MASH zones.Operations → MEDEVAC → Pop Smoke at MASH Zones
- medevac guide - salvage guide - Show in-game MEDEVAC/salvage quick reference.Operations → MEDEVAC → MASH & Salvage System – Guide
- -

Logistics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhrasesActionMenu Path
- open request crate - request crate menu - Open the crate request submenu (choose item manually).Logistics → Request Crate
- open recipe info - recipe info menu - Open recipe info submenu.Logistics → Recipe Info
- drop one crate - drop crate - Drop a single loaded crate.Logistics → Crate Management → Drop One Loaded Crate
- drop all crates - drop cargo - Drop every loaded crate.Logistics → Crate Management → Drop All Loaded Crates
- remark nearest crate - smoke crate - Smoke the nearest friendly crate.Logistics → Crate Management → Re-mark Nearest Crate (Smoke)
- show zone inventory - check inventory - Show stock at nearest supply/FOB zone.Logistics → Show Inventory at Nearest Zone
- -

Field Tools

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhrasesActionMenu Path
- create drop zone - mark drop zone - Create a player drop zone (AO).Field Tools → Create Drop Zone (AO)
- smoke green - green smoke - Drop green smoke at your position.Field Tools → Smoke My Location → Green
- smoke red - red smoke - Drop red smoke at your position.Field Tools → Smoke My Location → Red
- smoke white - white smoke - Drop white smoke at your position.Field Tools → Smoke My Location → White
- smoke orange - orange smoke - Drop orange smoke at your position.Field Tools → Smoke My Location → Orange
- smoke blue - blue smoke - Drop blue smoke at your position.Field Tools → Smoke My Location → Blue
- -

Navigation & Hover Coach

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhrasesActionMenu Path
- vectors to crate - find crate - Show bearing/range to nearest friendly crate.Navigation → Request Vectors to Nearest Crate
- vectors to pickup zone - find pickup zone - Show bearing/range to nearest supply zone.Navigation → Vectors to Nearest Pickup Zone
- smoke nearest zone - mark nearest zone - Smoke the closest zone (pickup/drop/FOB/MASH).Navigation → Smoke Nearest Zone (Pickup/Drop/FOB/MASH)
- smoke all zones - mark all zones - Smoke every zone within 5 km.Navigation → Smoke All Nearby Zones (5km)
- vectors to medevac crew - find medevac crew - Show bearing/range to the nearest crew (shortcut).Navigation → Vectors to Nearest MEDEVAC Crew
- vectors to mash - find mash - Show bearing/range to nearest MASH.Navigation → Vectors to Nearest MASH
- enable hover coach - hover coach on - Enable hover coach prompts for this group.Navigation → Hover Coach: Enable
- disable hover coach - hover coach off - Disable hover coach prompts for this group.Navigation → Hover Coach: Disable
- -
- Generated for CTLD_VoiceAttack_Profile_F10.vap (Right Alt + Backslash → F10 → F2). Tweak phrases or delays directly inside VoiceAttack to match your mission's pace. -
-
- - diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_Fixed.vap b/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_Fixed.vap deleted file mode 100644 index 113a59d..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_Profile_Fixed.vap +++ /dev/null @@ -1,74 +0,0 @@ - - - DCS CTLD Menu Navigation - a8f7c9d2-4e6b-4c1a-9f3e-2a8d7c6b5e4f - - - - load troops - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c0d - PressKey - 0 - - 165 - - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c0e - Pause - 200 - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c0f - PressKey - 0 - - 220 - - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c10 - Pause - 300 - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c11 - PressKey - 0 - - 113 - - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c12 - Pause - 300 - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c13 - PressKey - 0 - - 112 - - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c14 - Pause - 300 - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c15 - PressKey - 0 - - 112 - - - - 3a7f2b1e-8c4d-4f9a-b2e1-5d6c7a8b9c0d - - - diff --git a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_QuickRef.md b/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_QuickRef.md deleted file mode 100644 index 22777f7..0000000 --- a/Moose_CTLD_Pure/Voice Attack/CTLD_VoiceAttack_QuickRef.md +++ /dev/null @@ -1,174 +0,0 @@ -# CTLD Voice Attack - Quick Reference Card - -## Essential Commands (Most Used) - -### Troop Operations -``` -"load troops" → Load troops at supply zone -"deploy hold" → Deploy troops (defensive) -"deploy attack" → Deploy troops (offensive) -``` - -### Logistics -``` -"build here" → Build crates at position -"drop all crates" → Drop all loaded cargo -"show inventory" → Check zone stock -``` - -### Navigation -``` -"vectors to pickup" → Find supply zone -"vectors to crate" → Find dropped crate -"smoke nearest zone" → Mark closest zone -``` - -### MEDEVAC (if enabled) -``` -"list medevac" → Show active requests -"vectors to medevac" → Find crew -"vectors to mash" → Find hospital -"salvage points" → Check rewards -``` - -### Status -``` -"show status" → CTLD system status -"hover coach on/off" → Toggle pickup guidance -``` - ---- - -## Full Command List - -### OPERATIONS -| Command | Action | -|---------|--------| -| load troops | Board passengers | -| deploy hold / deploy defend | Unload defensive | -| deploy attack / troops attack | Unload offensive | -| build here / build at position | Build collected crates | -| refresh buildable list | Update build options | - -### MEDEVAC (if enabled) -| Command | Action | -|---------|--------| -| list medevac / active medevac requests | List all missions | -| nearest medevac location | Find closest crew | -| salvage points / check salvage | Show points | -| vectors to medevac / medevac vectors | Bearing to crew | -| mash locations / show mash | List hospitals | -| smoke crew locations / mark crews | Mark crews | -| smoke mash zones / mark mash | Mark hospitals | - -### LOGISTICS -| Command | Action | -|---------|--------| -| drop one crate / drop crate | Drop single crate | -| drop all crates / drop cargo | Drop all crates | -| mark nearest crate / smoke crate | Re-mark crate | -| show inventory / check inventory | Zone stock | - -### FIELD TOOLS -| Command | Action | -|---------|--------| -| create drop zone / mark drop zone | New drop zone | -| smoke green / green smoke | Green smoke | -| smoke red / red smoke | Red smoke | -| smoke white / white smoke | White smoke | -| smoke orange / orange smoke | Orange smoke | -| smoke blue / blue smoke | Blue smoke | - -### NAVIGATION -| Command | Action | -|---------|--------| -| vectors to crate / find crate | Find crate | -| vectors to pickup / find pickup zone | Find supply | -| smoke nearest zone / mark nearest zone | Mark nearest | -| smoke all zones / smoke nearby zones | Mark all <5km | -| vectors to mash / find mash | Find MASH | -| enable hover coach / hover coach on | Coach ON | -| disable hover coach / hover coach off | Coach OFF | - -### STATUS & ADMIN -| Command | Action | -|---------|--------| -| show status / ctld status | System status | -| draw zones on map / show zones | Draw zones | -| clear map drawings | Clear drawings | -| medevac statistics / medevac stats | MEDEVAC stats | - -### QUICK ACCESS -| Command | Same As | -|---------|---------| -| quick pickup / pickup mode | load troops | -| quick deploy / fast deploy | deploy hold | -| quick build / fast build | build here | - ---- - -## F10 Key Binding - -**DCS Default (No config needed):** -- On ground: `\` key opens F10 -- In air: `RAlt + \` required (backslash alone disabled) - -**Voice Attack Profile:** -- All commands use `RAlt + \` (works everywhere) -- Example: "load troops" → **RAlt \ F2 F1 F1** - ---- - -## Common Workflows - -### Troop Transport -1. "vectors to pickup" -2. "load troops" -3. Fly to LZ -4. "deploy hold" or "deploy attack" - -### Crate Delivery -1. "vectors to pickup" -2. Request crates (manual F10) -3. "vectors to crate" -4. Pick up & deliver -5. "build here" - -### MEDEVAC -1. "list medevac" -2. "vectors to medevac" -3. Land near crew (auto-load) -4. "vectors to mash" -5. Land at MASH (auto-unload) -6. "salvage points" - -### Zone Recon -1. "smoke all zones" (mark <5km) -2. "draw zones on map" (F10 view) -3. "vectors to pickup" (navigate) -4. "clear map drawings" (cleanup) - ---- - -## Tips -✓ Speak clearly at normal volume -✓ Use alternate phrases if not recognized -✓ Train Voice Attack with your voice -✓ Best when flying stable, not in combat -✗ Don't use for crate requests (too many types) - ---- - -## Troubleshooting -- **Not recognized:** Train profile, try alternate phrase -- **Wrong menu:** Check F10 key (RAlt vs slash) -- **Doesn't navigate:** DCS must be active window -- **MEDEVAC missing:** System not enabled in mission - ---- - -**Print this card for cockpit reference!** - -Profile: CTLD_VoiceAttack_Profile.xml -Guide: CTLD_VoiceAttack_Guide.md -CTLD Version: 0.1.0-alpha diff --git a/Moose_CTLD_Pure/Voice Attack/README_VoiceAttack.md b/Moose_CTLD_Pure/Voice Attack/README_VoiceAttack.md deleted file mode 100644 index bfa835c..0000000 --- a/Moose_CTLD_Pure/Voice Attack/README_VoiceAttack.md +++ /dev/null @@ -1,283 +0,0 @@ -# CTLD Voice Attack Integration - -This directory contains a complete Voice Attack profile for hands-free navigation of the Moose CTLD (Combat Troop and Logistics Deployment) menu system in DCS World. - -## Files in This Package - -| File | Purpose | -|------|---------| -| **CTLD_VoiceAttack_Profile.xml** | Voice Attack profile (import this) | -| **CTLD_VoiceAttack_Guide.md** | Complete user guide with all commands | -| **CTLD_VoiceAttack_QuickRef.md** | Quick reference card (print for cockpit) | -| **CTLD_Menu_Structure.md** | Full F10 menu tree diagram | -| **Moose_CTLD.lua** | Source CTLD system (menu structure defined here) | - -## Quick Start - -### 1. Install -1. Open Voice Attack -2. Import `CTLD_VoiceAttack_Profile.xml` -3. Activate the profile - -### 2. F10 Key Binding (Already Configured!) - -**DCS Default Behavior:** -- On ground: `\` (backslash) opens F10 menu -- In air: `RAlt + \` required (backslash alone disabled) - -**Voice Attack Profile:** -- Uses `RAlt + \` for all commands -- Works both on ground and in air -- **No DCS configuration needed!** - -### 3. Test -In DCS, say: **"show status"** -- Should open: F10 → CTLD → Admin/Help → Show CTLD Status - -## Most Useful Commands - -``` -"load troops" → Load passengers -"deploy hold" → Unload defensive -"build here" → Build crates -"drop all crates" → Drop cargo -"vectors to pickup" → Find supply zone -"vectors to crate" → Find crate -"smoke nearest zone" → Mark zone -"show status" → System info -``` - -## Command Categories - -- **Troop Operations:** Load, deploy (defensive/offensive) -- **Build Operations:** Build here, refresh list -- **MEDEVAC:** List requests, vectors, MASH locations, salvage points -- **Logistics:** Drop crates, re-mark crate, check inventory -- **Navigation:** Vectors to zones/crates/MASH, smoke zones -- **Field Tools:** Create drop zone, smoke colors -- **Status:** Show status, draw zones, statistics - -See `CTLD_VoiceAttack_Guide.md` for complete command list. - -## Documentation - -### For New Users -Start here: **CTLD_VoiceAttack_Guide.md** -- Installation instructions -- All commands with examples -- Common workflows -- Troubleshooting - -### For Flying -Print this: **CTLD_VoiceAttack_QuickRef.md** -- One-page command list -- Essential workflows -- Tips for in-flight use - -### For Developers -Reference: **CTLD_Menu_Structure.md** -- Complete F10 menu tree -- Key path tables -- Menu behavior notes -- Source code references - -## How It Works - -### Direct Navigation -All commands use **direct navigation** - one voice command executes the entire menu path: - -``` -Say: "load troops" -Sends: RAlt + \ + F2 + F1 + F1 -Result: Operations → Troop Transport → Load Troops -``` - -No step-by-step navigation, no waiting between keys. - -### No TTS Feedback -Commands execute silently - DCS provides on-screen feedback. - -### All Non-Admin Functions Included -Profile includes: -- ✓ All operational commands -- ✓ All status/info commands -- ✓ Navigation and smoke -- ✓ MEDEVAC operations -- ✗ Specific crate requests (too many types - use manual F10) -- ✗ Debug/admin functions (intentionally excluded) - -## Voice Attack Tips - -### Improve Recognition -1. Train profile with your voice (Tools → Train Profile) -2. Speak clearly at normal volume -3. Use alternate phrases if not recognized -4. Reduce background noise - -### Best Practices -- ✓ Use during stable flight -- ✓ Keep hands free for controls -- ✓ Combine with manual F10 for crate requests -- ✗ Don't use during combat maneuvers -- ✗ Don't use during emergency procedures - -## Menu Structure Overview - -``` -CTLD (F2) -├── Operations (F1) -│ ├── Troop Transport -│ ├── Build -│ └── MEDEVAC -├── Logistics (F2) -│ ├── Request Crate -│ ├── Recipe Info -│ ├── Crate Management -│ └── Show Inventory -├── Field Tools (F3) -├── Navigation (F4) -└── Admin/Help (F5) -``` - -Full structure: `CTLD_Menu_Structure.md` - -## Limitations - -### Not Included -1. **Crate Requests:** Too many types (dozens of vehicles, SAMs, etc.) - - Use manual F10: CTLD → Logistics → Request Crate - -2. **Typed Troop Loading:** Submenu with 4+ troop types - - Use manual F10: CTLD → Operations → Troop Transport → Load Troops (Type) - -3. **Advanced Build Menu:** Dynamic list of buildable items - - Use manual F10: CTLD → Operations → Build → Build (Advanced) - -4. **Debug Commands:** Admin logging controls - - Not needed for normal operations - -### Why These Are Excluded -- **Crate requests:** Mission-specific, too many variations -- **Typed troops:** Rare use case, 4+ submenu items -- **Advanced build:** Dynamic content, better with manual selection -- **Debug:** Admin-only, not for regular flight ops - -Use voice commands for quick actions, manual F10 for detailed selections. - -## Compatibility - -- **CTLD Version:** 0.1.0-alpha (Moose_CTLD_Pure) -- **Voice Attack:** 1.8+ (tested on 1.10) -- **DCS World:** Current stable/open beta -- **Menu Type:** Per-player (MENU_GROUP) - -## Customization - -### Add New Commands -1. Open profile in Voice Attack -2. Study menu structure: `CTLD_Menu_Structure.md` -3. Create command with key sequence -4. Test in DCS - -### Update for Menu Changes -1. Check `Moose_CTLD.lua` function `BuildGroupMenus()` (~line 2616) -2. Update key sequences in Voice Attack -3. Update documentation files -4. Test all modified commands - -## Troubleshooting - -| Problem | Solution | -|---------|----------| -| Command not recognized | Train profile, try alternate phrase | -| Wrong menu opens | Verify DCS default binding (RAlt + \), check Controls settings | -| Menu doesn't navigate | DCS must be active window, F10 not already open | -| MEDEVAC missing | System not enabled in mission | -| Works on ground but not in air | Expected! Profile uses RAlt + \ (works in air) | - -Full troubleshooting: `CTLD_VoiceAttack_Guide.md` - -## Examples - -### Troop Transport Mission -``` -1. Say: "vectors to pickup" → Find supply zone -2. Fly to zone -3. Say: "load troops" → Board passengers -4. Fly to LZ -5. Say: "deploy hold" → Unload defensive -``` - -### Crate Logistics Mission -``` -1. Say: "vectors to pickup" → Find supply zone -2. Manual F10 to request crates → (Too many types for voice) -3. Say: "vectors to crate" → Find spawned crate -4. Pick up and fly to target -5. Say: "build here" → Deploy at destination -``` - -### MEDEVAC Mission -``` -1. Say: "list medevac" → Check active requests -2. Say: "vectors to medevac" → Find nearest crew -3. Land nearby (auto-load) -4. Say: "vectors to mash" → Find hospital -5. Land at MASH (auto-unload) -6. Say: "salvage points" → Check rewards -``` - -### Reconnaissance -``` -1. Say: "smoke all zones" → Mark nearby zones -2. Say: "draw zones on map" → See all zones on F10 -3. Manual F10 map navigation -4. Say: "clear map drawings" → Clean up -``` - -More workflows: `CTLD_VoiceAttack_Guide.md` - -## Support - -### If Menu Structure Changes -Menu structure is defined in `Moose_CTLD.lua`: -- Function: `CTLD:BuildGroupMenus(group)` -- Line: ~2616 - -Compare with `CTLD_Menu_Structure.md` to identify changes. - -### Profile Updates -1. Check code for menu changes -2. Update Voice Attack key sequences -3. Update documentation -4. Test all commands - -### Help Resources -- CTLD source code: `Moose_CTLD.lua` -- Menu diagram: `CTLD_Menu_Structure.md` -- Full guide: `CTLD_VoiceAttack_Guide.md` -- Quick ref: `CTLD_VoiceAttack_QuickRef.md` - -## Version History - -### Version 1.0 (Current) -- Initial release -- 40+ voice commands -- Direct navigation (no step-by-step) -- No TTS feedback -- Supports RAlt or slash key for F10 -- All non-admin functions included -- Comprehensive documentation - -## Credits - -- **CTLD System:** Moose_CTLD_Pure custom implementation -- **Voice Attack:** VoiceAttack by VoiceAttack.com -- **DCS World:** Eagle Dynamics -- **MOOSE Framework:** FlightControl-Master - ---- - -**Ready to fly hands-free? Import the profile and start with "show status"!** - -Questions? See `CTLD_VoiceAttack_Guide.md` for detailed help. diff --git a/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua b/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua deleted file mode 100644 index 940e181..0000000 --- a/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog.lua +++ /dev/null @@ -1,334 +0,0 @@ --- CrateCatalog_CTLD_Extract.lua --- Auto-generated from CTLD.lua (Operation_Polar_Shield) spawnableCrates config --- Returns a table of crate definitions suitable for CTLD:MergeCatalog() --- Notes: --- - Each entry has keys: description/menu, dcsCargoType, required or requires (composite), side, category, build(point, headingDeg) --- - Single-unit entries spawn one unit by DCS type. Composite "SITE" entries spawn a multi-unit group approximating system components. - -local function singleUnit(unitType) - return function(point, headingDeg) - local name = string.format('%s-%d', unitType, math.random(100000,999999)) - local hdg = math.rad(headingDeg or 0) - return { - visible=false, lateActivation=false, tasks={}, task='Ground Nothing', route={}, - units={ { type=unitType, name=name, x=point.x, y=point.z, heading=hdg } }, - name = 'CTLD_'..name - } - end -end - --- Build a single AIR unit that spawns in the air at a configured altitude/speed. --- Falls back gracefully to singleUnit behavior if config is unavailable/disabled. -local function singleAirUnit(unitType) - return function(point, headingDeg) - local cfg = (rawget(_G, 'CTLD') and CTLD.Config and CTLD.Config.DroneAirSpawn) or nil - if not cfg or cfg.Enabled == false then - return singleUnit(unitType)(point, headingDeg) - end - - local name = string.format('%s-%d', unitType, math.random(100000,999999)) - local hdgDeg = headingDeg or 0 - local hdg = math.rad(hdgDeg) - local alt = tonumber(cfg.AltitudeMeters) or 1200 - local spd = tonumber(cfg.SpeedMps) or 120 - - -- Create a tiny 2-point route to ensure forward flight at the chosen altitude. - local function fwdOffset(px, pz, meters, headingRadians) - return px + math.sin(headingRadians) * meters, pz + math.cos(headingRadians) * meters - end - local p1x, p1z = point.x, point.z - local p2x, p2z = fwdOffset(point.x, point.z, 1000, hdg) -- 1 km ahead - - local group = { - visible=false, - lateActivation=false, - tasks={}, - task='CAS', - route={ - points={ - { - alt = alt, alt_type = 'BARO', - type = 'Turning Point', action = 'Turning Point', - x = p1x, y = p1z, - speed = spd, ETA = 0, ETA_locked = false, - task = {} - }, - { - alt = alt, alt_type = 'BARO', - type = 'Turning Point', action = 'Turning Point', - x = p2x, y = p2z, - speed = spd, ETA = 0, ETA_locked = false, - task = {} - } - } - }, - units={ - { - type=unitType, name=name, - x=p1x, y=p1z, - heading=hdg, - speed = spd, - alt = alt, alt_type = 'BARO' - } - }, - name = 'CTLD_'..name - } - return group - end -end - -local function multiUnits(units) - -- units: array of { type, dx, dz } - return function(point, headingDeg) - local hdg = math.rad(headingDeg or 0) - local function off(dx, dz) return { x = point.x + dx, z = point.z + dz } end - local list = {} - for i,u in ipairs(units) do - local p = off(u.dx or 0, u.dz or 3*i) - table.insert(list, { - type = u.type, name = string.format('CTLD-%s-%d', u.type, math.random(100000,999999)), - x = p.x, y = p.z, heading = hdg - }) - end - return { visible=false, lateActivation=false, tasks={}, task='Ground Nothing', route={}, units=list, name=string.format('CTLD_SITE_%d', math.random(100000,999999)) } - end -end - -local BLUE = coalition.side.BLUE -local RED = coalition.side.RED - -local cat = {} - -cat['BLUE_M1128_STRYKER_MGS_CRATE'] = { hidden=true, description='M1128 Stryker MGS crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1128_STRYKER_MGS'] = { menuCategory='Combat Vehicles', menu='M1128 Stryker MGS', description='M1128 Stryker MGS', dcsCargoType='container_cargo', requires={ BLUE_M1128_STRYKER_MGS_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1128 Stryker MGS'), unitType='M1128 Stryker MGS', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_M60A3_PATTON_CRATE'] = { hidden=true, description='M-60A3 Patton crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M60A3_PATTON'] = { menuCategory='Combat Vehicles', menu='M-60A3 Patton', description='M-60A3 Patton', dcsCargoType='container_cargo', requires={ BLUE_M60A3_PATTON_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-60'), unitType='M-60', MEDEVAC=true, salvageValue=3, crewSize=4 } -cat['BLUE_HMMWV_TOW_CRATE'] = { hidden=true, description='Humvee - TOW crate', dcsCargoType='container_cargo', required=1, initialStock=36, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_HMMWV_TOW'] = { menuCategory='Combat Vehicles', menu='Humvee - TOW', description='Humvee - TOW', dcsCargoType='container_cargo', requires={ BLUE_HMMWV_TOW_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1045 HMMWV TOW'), unitType='M1045 HMMWV TOW', MEDEVAC=true, salvageValue=3, crewSize=2 } -cat['BLUE_M1134_STRYKER_ATGM_CRATE']= { hidden=true, description='M1134 Stryker ATGM crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1134_STRYKER_ATGM'] = { menuCategory='Combat Vehicles', menu='M1134 Stryker ATGM', description='M1134 Stryker ATGM', dcsCargoType='container_cargo', requires={ BLUE_M1134_STRYKER_ATGM_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1134 Stryker ATGM'), unitType='M1134 Stryker ATGM', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_LAV25_CRATE'] = { hidden=true, description='LAV-25 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_LAV25'] = { menuCategory='Combat Vehicles', menu='LAV-25', description='LAV-25', dcsCargoType='container_cargo', requires={ BLUE_LAV25_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('LAV-25'), unitType='LAV-25', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_M2A2_BRADLEY_CRATE'] = { hidden=true, description='M2A2 Bradley crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M2A2_BRADLEY'] = { menuCategory='Combat Vehicles', menu='M2A2 Bradley', description='M2A2 Bradley', dcsCargoType='container_cargo', requires={ BLUE_M2A2_BRADLEY_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-2 Bradley'), unitType='M-2 Bradley', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_VAB_MEPHISTO_CRATE'] = { hidden=true, description='ATGM VAB Mephisto crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_VAB_MEPHISTO'] = { menuCategory='Combat Vehicles', menu='ATGM VAB Mephisto', description='ATGM VAB Mephisto', dcsCargoType='container_cargo', requires={ BLUE_VAB_MEPHISTO_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('VAB_Mephisto'), unitType='VAB_Mephisto', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_M1A2C_ABRAMS_CRATE'] = { hidden=true, description='M1A2C Abrams crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1A2C_ABRAMS'] = { menuCategory='Combat Vehicles', menu='M1A2C Abrams', description='M1A2C Abrams', dcsCargoType='container_cargo', requires={ BLUE_M1A2C_ABRAMS_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1A2C_SEP_V3'), unitType='M1A2C_SEP_V3', MEDEVAC=true, salvageValue=3, crewSize=4 } - --- Combat Vehicles (RED) -cat['RED_BTR82A_CRATE'] = { hidden=true, description='BTR-82A crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BTR82A'] = { menuCategory='Combat Vehicles', menu='BTR-82A', description='BTR-82A', dcsCargoType='container_cargo', requires={ RED_BTR82A_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR-82A'), unitType='BTR-82A', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_BRDM2_CRATE'] = { hidden=true, description='BRDM-2 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BRDM2'] = { menuCategory='Combat Vehicles', menu='BRDM-2', description='BRDM-2', dcsCargoType='container_cargo', requires={ RED_BRDM2_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BRDM-2'), unitType='BRDM-2', MEDEVAC=true, salvageValue=2, crewSize=2 } -cat['RED_BMP3_CRATE'] = { hidden=true, description='BMP-3 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BMP3'] = { menuCategory='Combat Vehicles', menu='BMP-3', description='BMP-3', dcsCargoType='container_cargo', requires={ RED_BMP3_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BMP-3'), unitType='BMP-3', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_BMP2_CRATE'] = { hidden=true, description='BMP-2 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BMP2'] = { menuCategory='Combat Vehicles', menu='BMP-2', description='BMP-2', dcsCargoType='container_cargo', requires={ RED_BMP2_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BMP-2'), unitType='BMP-2', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_BTR80_CRATE'] = { hidden=true, description='BTR-80 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BTR80'] = { menuCategory='Combat Vehicles', menu='BTR-80', description='BTR-80', dcsCargoType='container_cargo', requires={ RED_BTR80_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR-80'), unitType='BTR-80', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_T72B3_CRATE'] = { hidden=true, description='T-72B3 crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=RED, category=Group.Category.GROUND } -cat['RED_T72B3'] = { menuCategory='Combat Vehicles', menu='T-72B3', description='T-72B3', dcsCargoType='container_cargo', requires={ RED_T72B3_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('T-72B3'), unitType='T-72B3', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['RED_T90M_CRATE'] = { hidden=true, description='T-90M crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=RED, category=Group.Category.GROUND } -cat['RED_T90M'] = { menuCategory='Combat Vehicles', menu='T-90M', description='T-90M', dcsCargoType='container_cargo', requires={ RED_T90M_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('CHAP_T90M'), unitType='CHAP_T90M', MEDEVAC=true, salvageValue=3, crewSize=3 } - --- Support (BLUE) -cat['BLUE_MRAP_JTAC'] = { menuCategory='Support', menu='MRAP - JTAC', description='JTAC MRAP', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND, build=singleUnit('MaxxPro_MRAP'), MEDEVAC=true, salvageValue=1, crewSize=4, roles={'JTAC'}, jtac={ platform='ground' } } -cat['BLUE_M818_AMMO'] = { menuCategory='Support', menu='M-818 Ammo Truck', description='M-818 Ammo Truck', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M 818'), salvageValue=1, crewSize=2 } -cat['BLUE_M978_TANKER'] = { menuCategory='Support', menu='M-978 Tanker', description='M-978 Tanker', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M978 HEMTT Tanker'), salvageValue=1, crewSize=2 } -cat['BLUE_EWR_FPS117'] = { menuCategory='Support', menu='EWR Radar FPS-117', description='EWR Radar FPS-117', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('FPS-117'), salvageValue=1, crewSize=3 } - --- Support (RED) -cat['RED_TIGR_JTAC'] = { menuCategory='Support', menu='Tigr - JTAC', description='JTAC Tigr', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND, build=singleUnit('Tigr_233036'), MEDEVAC=true, salvageValue=1, crewSize=4, roles={'JTAC'}, jtac={ platform='ground' } } -cat['RED_URAL4320_AMMO'] = { menuCategory='Support', menu='Ural-4320-31 Ammo Truck', description='Ural-4320-31 Ammo Truck', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND, build=singleUnit('Ural-4320-31'), salvageValue=1, crewSize=2 } -cat['RED_ATZ10_TANKER'] = { menuCategory='Support', menu='ATZ-10 Refueler', description='ATZ-10 Refueler', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('ATZ-10'), salvageValue=1, crewSize=2 } -cat['RED_EWR_1L13'] = { menuCategory='Support', menu='EWR Radar 1L13', description='EWR Radar 1L13', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('1L13 EWR'), salvageValue=1, crewSize=3 } - --- Artillery (BLUE) -cat['BLUE_MLRS_CRATE'] = { hidden=true, description='MLRS crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_MLRS'] = { menuCategory='Artillery', menu='MLRS', description='MLRS', dcsCargoType='container_cargo', requires={ BLUE_MLRS_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('MLRS'), salvageValue=2, crewSize=3 } -cat['BLUE_SMERCH_CM_CRATE'] = { hidden=true, description='Smerch (CM) crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_SMERCH_CM'] = { menuCategory='Artillery', menu='Smerch_CM', description='Smerch (CM)', dcsCargoType='container_cargo', requires={ BLUE_SMERCH_CM_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Smerch'), salvageValue=2, crewSize=3 } -cat['BLUE_L118_105MM'] = { menuCategory='Artillery', menu='L118 Light Artillery 105mm', description='L118 105mm', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('L118_Unit'), salvageValue=1, crewSize=5 } -cat['BLUE_SMERCH_HE_CRATE'] = { hidden=true, description='Smerch (HE) crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_SMERCH_HE'] = { menuCategory='Artillery', menu='Smerch_HE', description='Smerch (HE)', dcsCargoType='container_cargo', requires={ BLUE_SMERCH_HE_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Smerch_HE'), salvageValue=2, crewSize=3 } -cat['BLUE_M109_CRATE'] = { hidden=true, description='M-109 crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M109'] = { menuCategory='Artillery', menu='M-109', description='M-109', dcsCargoType='container_cargo', requires={ BLUE_M109_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-109'), salvageValue=2, crewSize=4 } - --- Artillery (RED) -cat['RED_GVOZDIKA_CRATE'] = { hidden=true, description='SAU Gvozdika crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_GVOZDika'] = { menuCategory='Artillery', menu='SAU Gvozdika', description='SAU Gvozdika', dcsCargoType='container_cargo', requires={ RED_GVOZDIKA_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('SAU Gvozdika'), salvageValue=2, crewSize=3 } -cat['RED_2S19_MSTA_CRATE'] = { hidden=true, description='SPH 2S19 Msta crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_2S19_MSTA'] = { menuCategory='Artillery', menu='SPH 2S19 Msta', description='SPH 2S19 Msta', dcsCargoType='container_cargo', requires={ RED_2S19_MSTA_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('SAU Msta'), salvageValue=2, crewSize=4 } -cat['RED_URAGAN_BM27_CRATE'] = { hidden=true, description='Uragan BM-27 crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND } -cat['RED_URAGAN_BM27'] = { menuCategory='Artillery', menu='Uragan_BM-27', description='Uragan BM-27', dcsCargoType='container_cargo', requires={ RED_URAGAN_BM27_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Uragan_BM-27'), salvageValue=2, crewSize=3 } -cat['RED_BM21_GRAD_CRATE'] = { hidden=true, description='BM-21 Grad crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_BM21_GRAD'] = { menuCategory='Artillery', menu='BM-21 Grad Ural', description='BM-21 Grad Ural', dcsCargoType='container_cargo', requires={ RED_BM21_GRAD_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Grad-URAL'), salvageValue=2, crewSize=3 } -cat['RED_PLZ05_CRATE'] = { hidden=true, description='PLZ-05 crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND } -cat['RED_PLZ05'] = { menuCategory='Artillery', menu='PLZ-05 Mobile Artillery', description='PLZ-05', dcsCargoType='container_cargo', requires={ RED_PLZ05_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('PLZ05'), salvageValue=2, crewSize=4 } - --- AAA (BLUE) -cat['BLUE_GEPARD'] = { menuCategory='AAA', menu='Gepard AAA', description='Gepard AAA', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Gepard'), salvageValue=1, crewSize=3 } -cat['BLUE_CRAM'] = { menuCategory='AAA', menu='LPWS C-RAM', description='LPWS C-RAM', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('HEMTT_C-RAM_Phalanx'), salvageValue=1, crewSize=2 } -cat['BLUE_VULCAN_M163'] = { menuCategory='AAA', menu='SPAAA Vulcan M163', description='Vulcan M163', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Vulcan'), salvageValue=1, crewSize=2 } -cat['BLUE_BOFORS40'] = { menuCategory='AAA', menu='Bofors 40mm', description='Bofors 40mm', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND, build=singleUnit('bofors40'), salvageValue=1, crewSize=4 } - --- AAA (RED) -cat['RED_URAL_ZU23'] = { menuCategory='AAA', menu='Ural-375 ZU-23', description='Ural-375 ZU-23', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND, build=singleUnit('Ural-375 ZU-23'), salvageValue=1, crewSize=3 } -cat['RED_SHILKA'] = { menuCategory='AAA', menu='ZSU-23-4 Shilka', description='ZSU-23-4 Shilka', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('ZSU-23-4 Shilka'), salvageValue=1, crewSize=3 } -cat['RED_ZSU57_2'] = { menuCategory='AAA', menu='ZSU_57_2', description='ZSU_57_2', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('ZSU_57_2'), salvageValue=1, crewSize=3 } - -cat['BLUE_M1097_AVENGER_CRATE'] = { hidden=true, description='M1097 Avenger crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1097_AVENGER'] = { menuCategory='SAM short range', menu='M1097 Avenger', description='M1097 Avenger', dcsCargoType='container_cargo', requires={ BLUE_M1097_AVENGER_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1097 Avenger') } -cat['BLUE_M48_CHAPARRAL_CRATE'] = { hidden=true, description='M48 Chaparral crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M48_CHAPARRAL'] = { menuCategory='SAM short range', menu='M48 Chaparral', description='M48 Chaparral', dcsCargoType='container_cargo', requires={ BLUE_M48_CHAPARRAL_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M48 Chaparral') } -cat['BLUE_ROLAND_ADS_CRATE'] = { hidden=true, description='Roland ADS crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_ROLAND_ADS'] = { menuCategory='SAM short range', menu='Roland ADS', description='Roland ADS', dcsCargoType='container_cargo', requires={ BLUE_ROLAND_ADS_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Roland ADS') } -cat['BLUE_M6_LINEBACKER'] = { menuCategory='SAM short range', menu='M6 Linebacker', description='M6 Linebacker', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M6 Linebacker') } -cat['BLUE_RAPIER_LN'] = { menuCategory='SAM short range', menu='Rapier Launcher', description='Rapier Launcher', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('rapier_fsa_launcher') } -cat['BLUE_RAPIER_SR'] = { menuCategory='SAM short range', menu='Rapier SR', description='Rapier SR', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('rapier_fsa_blindfire_radar') } -cat['BLUE_RAPIER_TR'] = { menuCategory='SAM short range', menu='Rapier Tracker', description='Rapier Tracker', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('rapier_fsa_optical_tracker_unit') } -cat['BLUE_RAPIER_SITE'] = { menuCategory='SAM short range', menu='Rapier - All crates', description='Rapier Site', dcsCargoType='container_cargo', requires={ BLUE_RAPIER_LN=1, BLUE_RAPIER_SR=1, BLUE_RAPIER_TR=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='rapier_fsa_launcher'}, {type='rapier_fsa_blindfire_radar', dx=12, dz=6}, {type='rapier_fsa_optical_tracker_unit', dx=-12, dz=6} }) } - --- SAM short range (RED) -cat['RED_OSA_9K33_CRATE'] = { hidden=true, description='9K33 Osa crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_OSA_9K33'] = { menuCategory='SAM short range', menu='9K33 Osa', description='9K33 Osa', dcsCargoType='container_cargo', requires={ RED_OSA_9K33_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Osa 9A33 ln') } -cat['RED_STRELA1_9P31_CRATE'] = { hidden=true, description='9P31 Strela-1 crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_STRELA1_9P31'] = { menuCategory='SAM short range', menu='9P31 Strela-1', description='9P31 Strela-1', dcsCargoType='container_cargo', requires={ RED_STRELA1_9P31_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Strela-1 9P31') } -cat['RED_TUNGUSKA_2S6_CRATE'] = { hidden=true, description='2K22 Tunguska crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_TUNGUSKA_2S6'] = { menuCategory='SAM short range', menu='2K22 Tunguska', description='2K22 Tunguska', dcsCargoType='container_cargo', requires={ RED_TUNGUSKA_2S6_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('2S6 Tunguska') } -cat['RED_STRELA10M3_CRATE'] = { hidden=true, description='SA-13 Strela-10M3 crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_STRELA10M3'] = { menuCategory='SAM short range', menu='SA-13 Strela-10M3', description='SA-13 Strela-10M3', dcsCargoType='container_cargo', requires={ RED_STRELA10M3_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Strela-10M3') } --- HQ-7 components and site -cat['RED_HQ7_LN_CRATE'] = { hidden=true, description='HQ-7 Launcher crate', dcsCargoType='container_cargo', required=1, initialStock=20, side=RED, category=Group.Category.GROUND } -cat['RED_HQ7_LN'] = { menuCategory='SAM short range', menu='HQ-7_Launcher', description='HQ-7 Launcher', dcsCargoType='container_cargo', requires={ RED_HQ7_LN_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('HQ-7_LN_SP') } -cat['RED_HQ7_STR'] = { menuCategory='SAM short range', menu='HQ-7_STR_SP', description='HQ-7 STR', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('HQ-7_STR_SP') } -cat['RED_HQ7_SITE'] = { menuCategory='SAM short range', menu='HQ-7 - All crates', description='HQ-7 Site', dcsCargoType='container_cargo', requires={ RED_HQ7_LN=1, RED_HQ7_STR=1 }, initialStock=0, side=RED, category=Group.Category.GROUND, - build=multiUnits({ {type='HQ-7_LN_SP'}, {type='HQ-7_STR_SP', dx=10, dz=8} }) } - --- SAM mid range (BLUE) HAWK + NASAMS -cat['BLUE_HAWK_LN'] = { menuCategory='SAM mid range', menu='HAWK Launcher', description='HAWK Launcher', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk ln') } -cat['BLUE_HAWK_SR'] = { menuCategory='SAM mid range', menu='HAWK Search Radar', description='HAWK SR', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk sr') } -cat['BLUE_HAWK_TR'] = { menuCategory='SAM mid range', menu='HAWK Track Radar', description='HAWK TR', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk tr') } -cat['BLUE_HAWK_PCP'] = { menuCategory='SAM mid range', menu='HAWK PCP', description='HAWK PCP', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk pcp') } -cat['BLUE_HAWK_CWAR'] = { menuCategory='SAM mid range', menu='HAWK CWAR', description='HAWK CWAR', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk cwar') } -cat['BLUE_HAWK_SITE'] = { menuCategory='SAM mid range', menu='HAWK - All crates', description='HAWK Site', dcsCargoType='container_cargo', requires={ BLUE_HAWK_LN=1, BLUE_HAWK_SR=1, BLUE_HAWK_TR=1, BLUE_HAWK_PCP=1, BLUE_HAWK_CWAR=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='Hawk ln'}, {type='Hawk sr', dx=12, dz=8}, {type='Hawk tr', dx=-12, dz=8}, {type='Hawk pcp', dx=18, dz=12}, {type='Hawk cwar', dx=-18, dz=12} }) } - --- HAWK site repair/augment (adds +1 launcher, repairs site by respawn) -cat['BLUE_HAWK_REPAIR'] = { menuCategory='SAM mid range', menu='HAWK Repair/Launcher +1', description='HAWK Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - -- Build is handled specially in CTLD:BuildSpecificAtGroup for isRepair entries - return singleUnit('Ural-375')(point, headingDeg) -end } - -cat['BLUE_NASAMS_LN'] = { menuCategory='SAM mid range', menu='NASAMS Launcher 120C', description='NASAMS LN 120C', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('NASAMS_LN_C') } -cat['BLUE_NASAMS_RADAR'] = { menuCategory='SAM mid range', menu='NASAMS Search/Track Radar', description='NASAMS Radar', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('NASAMS_Radar_MPQ64F1') } -cat['BLUE_NASAMS_CP'] = { menuCategory='SAM mid range', menu='NASAMS Command Post', description='NASAMS CP', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('NASAMS_Command_Post') } -cat['BLUE_NASAMS_SITE'] = { menuCategory='SAM mid range', menu='NASAMS - All crates', description='NASAMS Site', dcsCargoType='container_cargo', requires={ BLUE_NASAMS_LN=1, BLUE_NASAMS_RADAR=1, BLUE_NASAMS_CP=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='NASAMS_LN_C'}, {type='NASAMS_Radar_MPQ64F1', dx=12, dz=8}, {type='NASAMS_Command_Post', dx=-12, dz=8} }) } - --- SAM mid range (RED) KUB -cat['RED_KUB_LN'] = { menuCategory='SAM mid range', menu='KUB Launcher', description='KUB Launcher', dcsCargoType='container_cargo', required=1, initialStock=8, side=RED, category=Group.Category.GROUND, build=singleUnit('Kub 2P25 ln') } -cat['RED_KUB_RADAR'] = { menuCategory='SAM mid range', menu='KUB Radar', description='KUB Radar', dcsCargoType='container_cargo', required=1, initialStock=8, side=RED, category=Group.Category.GROUND, build=singleUnit('Kub 1S91 str') } -cat['RED_KUB_SITE'] = { menuCategory='SAM mid range', menu='KUB - All crates', description='KUB Site', dcsCargoType='container_cargo', requires={ RED_KUB_LN=1, RED_KUB_RADAR=1 }, initialStock=0, side=RED, category=Group.Category.GROUND, - build=multiUnits({ {type='Kub 2P25 ln'}, {type='Kub 1S91 str', dx=12, dz=8} }) } - --- KUB site repair/augment (adds +1 launcher, repairs site by respawn) -cat['RED_KUB_REPAIR'] = { menuCategory='SAM mid range', menu='KUB Repair/Launcher +1', description='KUB Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=8, side=RED, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - return singleUnit('Ural-375')(point, headingDeg) -end } - --- SAM long range (BLUE) Patriot -cat['BLUE_PATRIOT_LN'] = { menuCategory='SAM long range', menu='Patriot Launcher', description='Patriot Launcher', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Patriot ln') } -cat['BLUE_PATRIOT_RADAR'] = { menuCategory='SAM long range', menu='Patriot Radar', description='Patriot Radar', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Patriot str') } -cat['BLUE_PATRIOT_ECS'] = { menuCategory='SAM long range', menu='Patriot ECS', description='Patriot ECS', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Patriot ECS') } -cat['BLUE_PATRIOT_SITE'] = { menuCategory='SAM long range', menu='Patriot - All crates', description='Patriot Site', dcsCargoType='container_cargo', requires={ BLUE_PATRIOT_LN=1, BLUE_PATRIOT_RADAR=1, BLUE_PATRIOT_ECS=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='Patriot ln'}, {type='Patriot str', dx=14, dz=10}, {type='Patriot ECS', dx=-14, dz=10} }) } - --- Patriot site repair/augment (adds +1 launcher, repairs site by respawn) -cat['BLUE_PATRIOT_REPAIR'] = { menuCategory='SAM long range', menu='Patriot Repair/Launcher +1', description='Patriot Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - return singleUnit('Ural-375')(point, headingDeg) -end } - --- SAM long range (RED) BUK -cat['RED_BUK_LN'] = { menuCategory='SAM long range', menu='BUK Launcher', description='BUK Launcher', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('SA-11 Buk LN 9A310M1') } -cat['RED_BUK_SR'] = { menuCategory='SAM long range', menu='BUK Search Radar', description='BUK Search Radar', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('SA-11 Buk SR 9S18M1') } -cat['RED_BUK_CC'] = { menuCategory='SAM long range', menu='BUK CC Radar', description='BUK CC Radar', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('SA-11 Buk CC 9S470M1') } -cat['RED_BUK_SITE'] = { menuCategory='SAM long range', menu='BUK - All crates', description='BUK Site', dcsCargoType='container_cargo', requires={ RED_BUK_LN=1, RED_BUK_SR=1, RED_BUK_CC=1 }, initialStock=0, side=RED, category=Group.Category.GROUND, - build=multiUnits({ {type='SA-11 Buk LN 9A310M1'}, {type='SA-11 Buk SR 9S18M1', dx=12, dz=8}, {type='SA-11 Buk CC 9S470M1', dx=-12, dz=8} }) } - --- BUK site repair/augment (adds +1 launcher, repairs site by respawn) -cat['RED_BUK_REPAIR'] = { menuCategory='SAM long range', menu='BUK Repair/Launcher +1', description='BUK Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - return singleUnit('Ural-375')(point, headingDeg) -end } - --- Drones (JTAC) -cat['BLUE_MQ9'] = { menuCategory='Drones', menu='MQ-9 Reaper - JTAC', description='MQ-9 JTAC', dcsCargoType='container_cargo', required=1, initialStock=3, side=BLUE, category=Group.Category.AIRPLANE, build=singleAirUnit('MQ-9 Reaper'), roles={'JTAC'}, jtac={ platform='air' } } -cat['RED_WINGLOONG'] = { menuCategory='Drones', menu='WingLoong-I - JTAC', description='WingLoong-I JTAC', dcsCargoType='container_cargo', required=1, initialStock=3, side=RED, category=Group.Category.AIRPLANE, build=singleAirUnit('WingLoong-I'), roles={'JTAC'}, jtac={ platform='air' } } - --- FOB crates (Support) — three small crates build a FOB site -cat['FOB_SMALL'] = { hidden=true, description='FOB small crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=nil, category=Group.Category.GROUND, build=function(point, headingDeg) - -- spawns a harmless placeholder truck for visibility; consumed by FOB_SITE build - return singleUnit('Ural-375')(point, headingDeg) -end } -cat['FOB_SITE'] = { menuCategory='Support', menu='FOB Crates - All', description='FOB Site', isFOB=true, dcsCargoType='container_cargo', requires={ FOB_SMALL=3 }, initialStock=0, side=nil, category=Group.Category.GROUND, - build=multiUnits({ {type='HEMTT TFFT'}, {type='Ural-375 PBU', dx=10, dz=8}, {type='Ural-375', dx=-10, dz=8} }) } - --- Mobile MASH (Support) — three crates build a Mobile MASH unit -cat['MOBILE_MASH_SMALL'] = { hidden=true, description='Mobile MASH crate', dcsCargoType='container_cargo', required=1, initialStock=6, side=nil, category=Group.Category.GROUND, build=function(point, headingDeg) - -- spawns placeholder truck for visibility; consumed by MOBILE_MASH build - return singleUnit('Ural-375')(point, headingDeg) -end } -cat['BLUE_MOBILE_MASH'] = { menuCategory='Support', menu='Mobile MASH - All', description='Blue Mobile MASH Unit', isMobileMASH=true, dcsCargoType='container_cargo', requires={ MOBILE_MASH_SMALL=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-113') } -cat['RED_MOBILE_MASH'] = { menuCategory='Support', menu='Mobile MASH - All', description='Red Mobile MASH Unit', isMobileMASH=true, dcsCargoType='container_cargo', requires={ MOBILE_MASH_SMALL=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR_D') } - --- ========================= --- Troop Type Definitions --- ========================= --- These define the composition of troop squads for Load/Unload Troops (NOT crates) --- Structure: { label, size, unitsBlue, unitsRed, units (fallback) } -local troops = {} - --- Assault Squad: general-purpose rifles/MG -troops['AS'] = { - label = 'Assault Squad', - size = 8, - unitsBlue = { 'Soldier M4', 'Soldier M249' }, - unitsRed = { 'Infantry AK', 'Infantry AK ver3' }, - units = { 'Infantry AK' }, -} - --- MANPADS Team: Anti-air element -troops['AA'] = { - label = 'MANPADS Team', - size = 4, - unitsBlue = { 'Soldier stinger', 'Stinger comm' }, - unitsRed = { 'SA-18 Igla-S manpad', 'SA-18 Igla comm' }, - units = { 'Infantry AK' }, -} - --- AT Team: Anti-tank element -troops['AT'] = { - label = 'AT Team', - size = 4, - unitsBlue = { 'Soldier RPG', 'Soldier RPG' }, - unitsRed = { 'Soldier RPG', 'Soldier RPG' }, - units = { 'Infantry AK' }, -} - --- Mortar Team: Indirect fire element -troops['AR'] = { - label = 'Mortar Team', - size = 4, - unitsBlue = { '2B11 mortar' }, - unitsRed = { '2B11 mortar' }, - units = { '2B11 mortar' }, -} - --- Export troop types -_CTLD_TROOP_TYPES = troops - --- Also export as a global for mission setups that load via DO SCRIPT FILE (no return capture) -_CTLD_EXTRACTED_CATALOG = cat -return cat diff --git a/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog_LowCounts.lua b/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog_LowCounts.lua deleted file mode 100644 index 940e181..0000000 --- a/Moose_CTLD_Pure/catalogs/Moose_CTLD_Catalog_LowCounts.lua +++ /dev/null @@ -1,334 +0,0 @@ --- CrateCatalog_CTLD_Extract.lua --- Auto-generated from CTLD.lua (Operation_Polar_Shield) spawnableCrates config --- Returns a table of crate definitions suitable for CTLD:MergeCatalog() --- Notes: --- - Each entry has keys: description/menu, dcsCargoType, required or requires (composite), side, category, build(point, headingDeg) --- - Single-unit entries spawn one unit by DCS type. Composite "SITE" entries spawn a multi-unit group approximating system components. - -local function singleUnit(unitType) - return function(point, headingDeg) - local name = string.format('%s-%d', unitType, math.random(100000,999999)) - local hdg = math.rad(headingDeg or 0) - return { - visible=false, lateActivation=false, tasks={}, task='Ground Nothing', route={}, - units={ { type=unitType, name=name, x=point.x, y=point.z, heading=hdg } }, - name = 'CTLD_'..name - } - end -end - --- Build a single AIR unit that spawns in the air at a configured altitude/speed. --- Falls back gracefully to singleUnit behavior if config is unavailable/disabled. -local function singleAirUnit(unitType) - return function(point, headingDeg) - local cfg = (rawget(_G, 'CTLD') and CTLD.Config and CTLD.Config.DroneAirSpawn) or nil - if not cfg or cfg.Enabled == false then - return singleUnit(unitType)(point, headingDeg) - end - - local name = string.format('%s-%d', unitType, math.random(100000,999999)) - local hdgDeg = headingDeg or 0 - local hdg = math.rad(hdgDeg) - local alt = tonumber(cfg.AltitudeMeters) or 1200 - local spd = tonumber(cfg.SpeedMps) or 120 - - -- Create a tiny 2-point route to ensure forward flight at the chosen altitude. - local function fwdOffset(px, pz, meters, headingRadians) - return px + math.sin(headingRadians) * meters, pz + math.cos(headingRadians) * meters - end - local p1x, p1z = point.x, point.z - local p2x, p2z = fwdOffset(point.x, point.z, 1000, hdg) -- 1 km ahead - - local group = { - visible=false, - lateActivation=false, - tasks={}, - task='CAS', - route={ - points={ - { - alt = alt, alt_type = 'BARO', - type = 'Turning Point', action = 'Turning Point', - x = p1x, y = p1z, - speed = spd, ETA = 0, ETA_locked = false, - task = {} - }, - { - alt = alt, alt_type = 'BARO', - type = 'Turning Point', action = 'Turning Point', - x = p2x, y = p2z, - speed = spd, ETA = 0, ETA_locked = false, - task = {} - } - } - }, - units={ - { - type=unitType, name=name, - x=p1x, y=p1z, - heading=hdg, - speed = spd, - alt = alt, alt_type = 'BARO' - } - }, - name = 'CTLD_'..name - } - return group - end -end - -local function multiUnits(units) - -- units: array of { type, dx, dz } - return function(point, headingDeg) - local hdg = math.rad(headingDeg or 0) - local function off(dx, dz) return { x = point.x + dx, z = point.z + dz } end - local list = {} - for i,u in ipairs(units) do - local p = off(u.dx or 0, u.dz or 3*i) - table.insert(list, { - type = u.type, name = string.format('CTLD-%s-%d', u.type, math.random(100000,999999)), - x = p.x, y = p.z, heading = hdg - }) - end - return { visible=false, lateActivation=false, tasks={}, task='Ground Nothing', route={}, units=list, name=string.format('CTLD_SITE_%d', math.random(100000,999999)) } - end -end - -local BLUE = coalition.side.BLUE -local RED = coalition.side.RED - -local cat = {} - -cat['BLUE_M1128_STRYKER_MGS_CRATE'] = { hidden=true, description='M1128 Stryker MGS crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1128_STRYKER_MGS'] = { menuCategory='Combat Vehicles', menu='M1128 Stryker MGS', description='M1128 Stryker MGS', dcsCargoType='container_cargo', requires={ BLUE_M1128_STRYKER_MGS_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1128 Stryker MGS'), unitType='M1128 Stryker MGS', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_M60A3_PATTON_CRATE'] = { hidden=true, description='M-60A3 Patton crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M60A3_PATTON'] = { menuCategory='Combat Vehicles', menu='M-60A3 Patton', description='M-60A3 Patton', dcsCargoType='container_cargo', requires={ BLUE_M60A3_PATTON_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-60'), unitType='M-60', MEDEVAC=true, salvageValue=3, crewSize=4 } -cat['BLUE_HMMWV_TOW_CRATE'] = { hidden=true, description='Humvee - TOW crate', dcsCargoType='container_cargo', required=1, initialStock=36, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_HMMWV_TOW'] = { menuCategory='Combat Vehicles', menu='Humvee - TOW', description='Humvee - TOW', dcsCargoType='container_cargo', requires={ BLUE_HMMWV_TOW_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1045 HMMWV TOW'), unitType='M1045 HMMWV TOW', MEDEVAC=true, salvageValue=3, crewSize=2 } -cat['BLUE_M1134_STRYKER_ATGM_CRATE']= { hidden=true, description='M1134 Stryker ATGM crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1134_STRYKER_ATGM'] = { menuCategory='Combat Vehicles', menu='M1134 Stryker ATGM', description='M1134 Stryker ATGM', dcsCargoType='container_cargo', requires={ BLUE_M1134_STRYKER_ATGM_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1134 Stryker ATGM'), unitType='M1134 Stryker ATGM', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_LAV25_CRATE'] = { hidden=true, description='LAV-25 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_LAV25'] = { menuCategory='Combat Vehicles', menu='LAV-25', description='LAV-25', dcsCargoType='container_cargo', requires={ BLUE_LAV25_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('LAV-25'), unitType='LAV-25', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_M2A2_BRADLEY_CRATE'] = { hidden=true, description='M2A2 Bradley crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M2A2_BRADLEY'] = { menuCategory='Combat Vehicles', menu='M2A2 Bradley', description='M2A2 Bradley', dcsCargoType='container_cargo', requires={ BLUE_M2A2_BRADLEY_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-2 Bradley'), unitType='M-2 Bradley', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_VAB_MEPHISTO_CRATE'] = { hidden=true, description='ATGM VAB Mephisto crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_VAB_MEPHISTO'] = { menuCategory='Combat Vehicles', menu='ATGM VAB Mephisto', description='ATGM VAB Mephisto', dcsCargoType='container_cargo', requires={ BLUE_VAB_MEPHISTO_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('VAB_Mephisto'), unitType='VAB_Mephisto', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['BLUE_M1A2C_ABRAMS_CRATE'] = { hidden=true, description='M1A2C Abrams crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1A2C_ABRAMS'] = { menuCategory='Combat Vehicles', menu='M1A2C Abrams', description='M1A2C Abrams', dcsCargoType='container_cargo', requires={ BLUE_M1A2C_ABRAMS_CRATE=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1A2C_SEP_V3'), unitType='M1A2C_SEP_V3', MEDEVAC=true, salvageValue=3, crewSize=4 } - --- Combat Vehicles (RED) -cat['RED_BTR82A_CRATE'] = { hidden=true, description='BTR-82A crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BTR82A'] = { menuCategory='Combat Vehicles', menu='BTR-82A', description='BTR-82A', dcsCargoType='container_cargo', requires={ RED_BTR82A_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR-82A'), unitType='BTR-82A', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_BRDM2_CRATE'] = { hidden=true, description='BRDM-2 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BRDM2'] = { menuCategory='Combat Vehicles', menu='BRDM-2', description='BRDM-2', dcsCargoType='container_cargo', requires={ RED_BRDM2_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BRDM-2'), unitType='BRDM-2', MEDEVAC=true, salvageValue=2, crewSize=2 } -cat['RED_BMP3_CRATE'] = { hidden=true, description='BMP-3 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BMP3'] = { menuCategory='Combat Vehicles', menu='BMP-3', description='BMP-3', dcsCargoType='container_cargo', requires={ RED_BMP3_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BMP-3'), unitType='BMP-3', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_BMP2_CRATE'] = { hidden=true, description='BMP-2 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BMP2'] = { menuCategory='Combat Vehicles', menu='BMP-2', description='BMP-2', dcsCargoType='container_cargo', requires={ RED_BMP2_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BMP-2'), unitType='BMP-2', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_BTR80_CRATE'] = { hidden=true, description='BTR-80 crate', dcsCargoType='container_cargo', required=1, initialStock=30, side=RED, category=Group.Category.GROUND } -cat['RED_BTR80'] = { menuCategory='Combat Vehicles', menu='BTR-80', description='BTR-80', dcsCargoType='container_cargo', requires={ RED_BTR80_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR-80'), unitType='BTR-80', MEDEVAC=true, salvageValue=2, crewSize=3 } -cat['RED_T72B3_CRATE'] = { hidden=true, description='T-72B3 crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=RED, category=Group.Category.GROUND } -cat['RED_T72B3'] = { menuCategory='Combat Vehicles', menu='T-72B3', description='T-72B3', dcsCargoType='container_cargo', requires={ RED_T72B3_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('T-72B3'), unitType='T-72B3', MEDEVAC=true, salvageValue=3, crewSize=3 } -cat['RED_T90M_CRATE'] = { hidden=true, description='T-90M crate', dcsCargoType='container_cargo', required=1, initialStock=24, side=RED, category=Group.Category.GROUND } -cat['RED_T90M'] = { menuCategory='Combat Vehicles', menu='T-90M', description='T-90M', dcsCargoType='container_cargo', requires={ RED_T90M_CRATE=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('CHAP_T90M'), unitType='CHAP_T90M', MEDEVAC=true, salvageValue=3, crewSize=3 } - --- Support (BLUE) -cat['BLUE_MRAP_JTAC'] = { menuCategory='Support', menu='MRAP - JTAC', description='JTAC MRAP', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND, build=singleUnit('MaxxPro_MRAP'), MEDEVAC=true, salvageValue=1, crewSize=4, roles={'JTAC'}, jtac={ platform='ground' } } -cat['BLUE_M818_AMMO'] = { menuCategory='Support', menu='M-818 Ammo Truck', description='M-818 Ammo Truck', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M 818'), salvageValue=1, crewSize=2 } -cat['BLUE_M978_TANKER'] = { menuCategory='Support', menu='M-978 Tanker', description='M-978 Tanker', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M978 HEMTT Tanker'), salvageValue=1, crewSize=2 } -cat['BLUE_EWR_FPS117'] = { menuCategory='Support', menu='EWR Radar FPS-117', description='EWR Radar FPS-117', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('FPS-117'), salvageValue=1, crewSize=3 } - --- Support (RED) -cat['RED_TIGR_JTAC'] = { menuCategory='Support', menu='Tigr - JTAC', description='JTAC Tigr', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND, build=singleUnit('Tigr_233036'), MEDEVAC=true, salvageValue=1, crewSize=4, roles={'JTAC'}, jtac={ platform='ground' } } -cat['RED_URAL4320_AMMO'] = { menuCategory='Support', menu='Ural-4320-31 Ammo Truck', description='Ural-4320-31 Ammo Truck', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND, build=singleUnit('Ural-4320-31'), salvageValue=1, crewSize=2 } -cat['RED_ATZ10_TANKER'] = { menuCategory='Support', menu='ATZ-10 Refueler', description='ATZ-10 Refueler', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('ATZ-10'), salvageValue=1, crewSize=2 } -cat['RED_EWR_1L13'] = { menuCategory='Support', menu='EWR Radar 1L13', description='EWR Radar 1L13', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('1L13 EWR'), salvageValue=1, crewSize=3 } - --- Artillery (BLUE) -cat['BLUE_MLRS_CRATE'] = { hidden=true, description='MLRS crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_MLRS'] = { menuCategory='Artillery', menu='MLRS', description='MLRS', dcsCargoType='container_cargo', requires={ BLUE_MLRS_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('MLRS'), salvageValue=2, crewSize=3 } -cat['BLUE_SMERCH_CM_CRATE'] = { hidden=true, description='Smerch (CM) crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_SMERCH_CM'] = { menuCategory='Artillery', menu='Smerch_CM', description='Smerch (CM)', dcsCargoType='container_cargo', requires={ BLUE_SMERCH_CM_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Smerch'), salvageValue=2, crewSize=3 } -cat['BLUE_L118_105MM'] = { menuCategory='Artillery', menu='L118 Light Artillery 105mm', description='L118 105mm', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('L118_Unit'), salvageValue=1, crewSize=5 } -cat['BLUE_SMERCH_HE_CRATE'] = { hidden=true, description='Smerch (HE) crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_SMERCH_HE'] = { menuCategory='Artillery', menu='Smerch_HE', description='Smerch (HE)', dcsCargoType='container_cargo', requires={ BLUE_SMERCH_HE_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Smerch_HE'), salvageValue=2, crewSize=3 } -cat['BLUE_M109_CRATE'] = { hidden=true, description='M-109 crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M109'] = { menuCategory='Artillery', menu='M-109', description='M-109', dcsCargoType='container_cargo', requires={ BLUE_M109_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-109'), salvageValue=2, crewSize=4 } - --- Artillery (RED) -cat['RED_GVOZDIKA_CRATE'] = { hidden=true, description='SAU Gvozdika crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_GVOZDika'] = { menuCategory='Artillery', menu='SAU Gvozdika', description='SAU Gvozdika', dcsCargoType='container_cargo', requires={ RED_GVOZDIKA_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('SAU Gvozdika'), salvageValue=2, crewSize=3 } -cat['RED_2S19_MSTA_CRATE'] = { hidden=true, description='SPH 2S19 Msta crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_2S19_MSTA'] = { menuCategory='Artillery', menu='SPH 2S19 Msta', description='SPH 2S19 Msta', dcsCargoType='container_cargo', requires={ RED_2S19_MSTA_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('SAU Msta'), salvageValue=2, crewSize=4 } -cat['RED_URAGAN_BM27_CRATE'] = { hidden=true, description='Uragan BM-27 crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND } -cat['RED_URAGAN_BM27'] = { menuCategory='Artillery', menu='Uragan_BM-27', description='Uragan BM-27', dcsCargoType='container_cargo', requires={ RED_URAGAN_BM27_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Uragan_BM-27'), salvageValue=2, crewSize=3 } -cat['RED_BM21_GRAD_CRATE'] = { hidden=true, description='BM-21 Grad crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_BM21_GRAD'] = { menuCategory='Artillery', menu='BM-21 Grad Ural', description='BM-21 Grad Ural', dcsCargoType='container_cargo', requires={ RED_BM21_GRAD_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Grad-URAL'), salvageValue=2, crewSize=3 } -cat['RED_PLZ05_CRATE'] = { hidden=true, description='PLZ-05 crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND } -cat['RED_PLZ05'] = { menuCategory='Artillery', menu='PLZ-05 Mobile Artillery', description='PLZ-05', dcsCargoType='container_cargo', requires={ RED_PLZ05_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('PLZ05'), salvageValue=2, crewSize=4 } - --- AAA (BLUE) -cat['BLUE_GEPARD'] = { menuCategory='AAA', menu='Gepard AAA', description='Gepard AAA', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Gepard'), salvageValue=1, crewSize=3 } -cat['BLUE_CRAM'] = { menuCategory='AAA', menu='LPWS C-RAM', description='LPWS C-RAM', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('HEMTT_C-RAM_Phalanx'), salvageValue=1, crewSize=2 } -cat['BLUE_VULCAN_M163'] = { menuCategory='AAA', menu='SPAAA Vulcan M163', description='Vulcan M163', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Vulcan'), salvageValue=1, crewSize=2 } -cat['BLUE_BOFORS40'] = { menuCategory='AAA', menu='Bofors 40mm', description='Bofors 40mm', dcsCargoType='container_cargo', required=1, initialStock=12, side=BLUE, category=Group.Category.GROUND, build=singleUnit('bofors40'), salvageValue=1, crewSize=4 } - --- AAA (RED) -cat['RED_URAL_ZU23'] = { menuCategory='AAA', menu='Ural-375 ZU-23', description='Ural-375 ZU-23', dcsCargoType='container_cargo', required=1, initialStock=12, side=RED, category=Group.Category.GROUND, build=singleUnit('Ural-375 ZU-23'), salvageValue=1, crewSize=3 } -cat['RED_SHILKA'] = { menuCategory='AAA', menu='ZSU-23-4 Shilka', description='ZSU-23-4 Shilka', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('ZSU-23-4 Shilka'), salvageValue=1, crewSize=3 } -cat['RED_ZSU57_2'] = { menuCategory='AAA', menu='ZSU_57_2', description='ZSU_57_2', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('ZSU_57_2'), salvageValue=1, crewSize=3 } - -cat['BLUE_M1097_AVENGER_CRATE'] = { hidden=true, description='M1097 Avenger crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M1097_AVENGER'] = { menuCategory='SAM short range', menu='M1097 Avenger', description='M1097 Avenger', dcsCargoType='container_cargo', requires={ BLUE_M1097_AVENGER_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M1097 Avenger') } -cat['BLUE_M48_CHAPARRAL_CRATE'] = { hidden=true, description='M48 Chaparral crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_M48_CHAPARRAL'] = { menuCategory='SAM short range', menu='M48 Chaparral', description='M48 Chaparral', dcsCargoType='container_cargo', requires={ BLUE_M48_CHAPARRAL_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M48 Chaparral') } -cat['BLUE_ROLAND_ADS_CRATE'] = { hidden=true, description='Roland ADS crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=BLUE, category=Group.Category.GROUND } -cat['BLUE_ROLAND_ADS'] = { menuCategory='SAM short range', menu='Roland ADS', description='Roland ADS', dcsCargoType='container_cargo', requires={ BLUE_ROLAND_ADS_CRATE=2 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Roland ADS') } -cat['BLUE_M6_LINEBACKER'] = { menuCategory='SAM short range', menu='M6 Linebacker', description='M6 Linebacker', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M6 Linebacker') } -cat['BLUE_RAPIER_LN'] = { menuCategory='SAM short range', menu='Rapier Launcher', description='Rapier Launcher', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('rapier_fsa_launcher') } -cat['BLUE_RAPIER_SR'] = { menuCategory='SAM short range', menu='Rapier SR', description='Rapier SR', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('rapier_fsa_blindfire_radar') } -cat['BLUE_RAPIER_TR'] = { menuCategory='SAM short range', menu='Rapier Tracker', description='Rapier Tracker', dcsCargoType='container_cargo', required=1, initialStock=10, side=BLUE, category=Group.Category.GROUND, build=singleUnit('rapier_fsa_optical_tracker_unit') } -cat['BLUE_RAPIER_SITE'] = { menuCategory='SAM short range', menu='Rapier - All crates', description='Rapier Site', dcsCargoType='container_cargo', requires={ BLUE_RAPIER_LN=1, BLUE_RAPIER_SR=1, BLUE_RAPIER_TR=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='rapier_fsa_launcher'}, {type='rapier_fsa_blindfire_radar', dx=12, dz=6}, {type='rapier_fsa_optical_tracker_unit', dx=-12, dz=6} }) } - --- SAM short range (RED) -cat['RED_OSA_9K33_CRATE'] = { hidden=true, description='9K33 Osa crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_OSA_9K33'] = { menuCategory='SAM short range', menu='9K33 Osa', description='9K33 Osa', dcsCargoType='container_cargo', requires={ RED_OSA_9K33_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Osa 9A33 ln') } -cat['RED_STRELA1_9P31_CRATE'] = { hidden=true, description='9P31 Strela-1 crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_STRELA1_9P31'] = { menuCategory='SAM short range', menu='9P31 Strela-1', description='9P31 Strela-1', dcsCargoType='container_cargo', requires={ RED_STRELA1_9P31_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Strela-1 9P31') } -cat['RED_TUNGUSKA_2S6_CRATE'] = { hidden=true, description='2K22 Tunguska crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_TUNGUSKA_2S6'] = { menuCategory='SAM short range', menu='2K22 Tunguska', description='2K22 Tunguska', dcsCargoType='container_cargo', requires={ RED_TUNGUSKA_2S6_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('2S6 Tunguska') } -cat['RED_STRELA10M3_CRATE'] = { hidden=true, description='SA-13 Strela-10M3 crate', dcsCargoType='container_cargo', required=1, initialStock=16, side=RED, category=Group.Category.GROUND } -cat['RED_STRELA10M3'] = { menuCategory='SAM short range', menu='SA-13 Strela-10M3', description='SA-13 Strela-10M3', dcsCargoType='container_cargo', requires={ RED_STRELA10M3_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('Strela-10M3') } --- HQ-7 components and site -cat['RED_HQ7_LN_CRATE'] = { hidden=true, description='HQ-7 Launcher crate', dcsCargoType='container_cargo', required=1, initialStock=20, side=RED, category=Group.Category.GROUND } -cat['RED_HQ7_LN'] = { menuCategory='SAM short range', menu='HQ-7_Launcher', description='HQ-7 Launcher', dcsCargoType='container_cargo', requires={ RED_HQ7_LN_CRATE=2 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('HQ-7_LN_SP') } -cat['RED_HQ7_STR'] = { menuCategory='SAM short range', menu='HQ-7_STR_SP', description='HQ-7 STR', dcsCargoType='container_cargo', required=1, initialStock=10, side=RED, category=Group.Category.GROUND, build=singleUnit('HQ-7_STR_SP') } -cat['RED_HQ7_SITE'] = { menuCategory='SAM short range', menu='HQ-7 - All crates', description='HQ-7 Site', dcsCargoType='container_cargo', requires={ RED_HQ7_LN=1, RED_HQ7_STR=1 }, initialStock=0, side=RED, category=Group.Category.GROUND, - build=multiUnits({ {type='HQ-7_LN_SP'}, {type='HQ-7_STR_SP', dx=10, dz=8} }) } - --- SAM mid range (BLUE) HAWK + NASAMS -cat['BLUE_HAWK_LN'] = { menuCategory='SAM mid range', menu='HAWK Launcher', description='HAWK Launcher', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk ln') } -cat['BLUE_HAWK_SR'] = { menuCategory='SAM mid range', menu='HAWK Search Radar', description='HAWK SR', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk sr') } -cat['BLUE_HAWK_TR'] = { menuCategory='SAM mid range', menu='HAWK Track Radar', description='HAWK TR', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk tr') } -cat['BLUE_HAWK_PCP'] = { menuCategory='SAM mid range', menu='HAWK PCP', description='HAWK PCP', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk pcp') } -cat['BLUE_HAWK_CWAR'] = { menuCategory='SAM mid range', menu='HAWK CWAR', description='HAWK CWAR', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Hawk cwar') } -cat['BLUE_HAWK_SITE'] = { menuCategory='SAM mid range', menu='HAWK - All crates', description='HAWK Site', dcsCargoType='container_cargo', requires={ BLUE_HAWK_LN=1, BLUE_HAWK_SR=1, BLUE_HAWK_TR=1, BLUE_HAWK_PCP=1, BLUE_HAWK_CWAR=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='Hawk ln'}, {type='Hawk sr', dx=12, dz=8}, {type='Hawk tr', dx=-12, dz=8}, {type='Hawk pcp', dx=18, dz=12}, {type='Hawk cwar', dx=-18, dz=12} }) } - --- HAWK site repair/augment (adds +1 launcher, repairs site by respawn) -cat['BLUE_HAWK_REPAIR'] = { menuCategory='SAM mid range', menu='HAWK Repair/Launcher +1', description='HAWK Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - -- Build is handled specially in CTLD:BuildSpecificAtGroup for isRepair entries - return singleUnit('Ural-375')(point, headingDeg) -end } - -cat['BLUE_NASAMS_LN'] = { menuCategory='SAM mid range', menu='NASAMS Launcher 120C', description='NASAMS LN 120C', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('NASAMS_LN_C') } -cat['BLUE_NASAMS_RADAR'] = { menuCategory='SAM mid range', menu='NASAMS Search/Track Radar', description='NASAMS Radar', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('NASAMS_Radar_MPQ64F1') } -cat['BLUE_NASAMS_CP'] = { menuCategory='SAM mid range', menu='NASAMS Command Post', description='NASAMS CP', dcsCargoType='container_cargo', required=1, initialStock=8, side=BLUE, category=Group.Category.GROUND, build=singleUnit('NASAMS_Command_Post') } -cat['BLUE_NASAMS_SITE'] = { menuCategory='SAM mid range', menu='NASAMS - All crates', description='NASAMS Site', dcsCargoType='container_cargo', requires={ BLUE_NASAMS_LN=1, BLUE_NASAMS_RADAR=1, BLUE_NASAMS_CP=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='NASAMS_LN_C'}, {type='NASAMS_Radar_MPQ64F1', dx=12, dz=8}, {type='NASAMS_Command_Post', dx=-12, dz=8} }) } - --- SAM mid range (RED) KUB -cat['RED_KUB_LN'] = { menuCategory='SAM mid range', menu='KUB Launcher', description='KUB Launcher', dcsCargoType='container_cargo', required=1, initialStock=8, side=RED, category=Group.Category.GROUND, build=singleUnit('Kub 2P25 ln') } -cat['RED_KUB_RADAR'] = { menuCategory='SAM mid range', menu='KUB Radar', description='KUB Radar', dcsCargoType='container_cargo', required=1, initialStock=8, side=RED, category=Group.Category.GROUND, build=singleUnit('Kub 1S91 str') } -cat['RED_KUB_SITE'] = { menuCategory='SAM mid range', menu='KUB - All crates', description='KUB Site', dcsCargoType='container_cargo', requires={ RED_KUB_LN=1, RED_KUB_RADAR=1 }, initialStock=0, side=RED, category=Group.Category.GROUND, - build=multiUnits({ {type='Kub 2P25 ln'}, {type='Kub 1S91 str', dx=12, dz=8} }) } - --- KUB site repair/augment (adds +1 launcher, repairs site by respawn) -cat['RED_KUB_REPAIR'] = { menuCategory='SAM mid range', menu='KUB Repair/Launcher +1', description='KUB Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=8, side=RED, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - return singleUnit('Ural-375')(point, headingDeg) -end } - --- SAM long range (BLUE) Patriot -cat['BLUE_PATRIOT_LN'] = { menuCategory='SAM long range', menu='Patriot Launcher', description='Patriot Launcher', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Patriot ln') } -cat['BLUE_PATRIOT_RADAR'] = { menuCategory='SAM long range', menu='Patriot Radar', description='Patriot Radar', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Patriot str') } -cat['BLUE_PATRIOT_ECS'] = { menuCategory='SAM long range', menu='Patriot ECS', description='Patriot ECS', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, build=singleUnit('Patriot ECS') } -cat['BLUE_PATRIOT_SITE'] = { menuCategory='SAM long range', menu='Patriot - All crates', description='Patriot Site', dcsCargoType='container_cargo', requires={ BLUE_PATRIOT_LN=1, BLUE_PATRIOT_RADAR=1, BLUE_PATRIOT_ECS=1 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, - build=multiUnits({ {type='Patriot ln'}, {type='Patriot str', dx=14, dz=10}, {type='Patriot ECS', dx=-14, dz=10} }) } - --- Patriot site repair/augment (adds +1 launcher, repairs site by respawn) -cat['BLUE_PATRIOT_REPAIR'] = { menuCategory='SAM long range', menu='Patriot Repair/Launcher +1', description='Patriot Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=6, side=BLUE, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - return singleUnit('Ural-375')(point, headingDeg) -end } - --- SAM long range (RED) BUK -cat['RED_BUK_LN'] = { menuCategory='SAM long range', menu='BUK Launcher', description='BUK Launcher', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('SA-11 Buk LN 9A310M1') } -cat['RED_BUK_SR'] = { menuCategory='SAM long range', menu='BUK Search Radar', description='BUK Search Radar', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('SA-11 Buk SR 9S18M1') } -cat['RED_BUK_CC'] = { menuCategory='SAM long range', menu='BUK CC Radar', description='BUK CC Radar', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, build=singleUnit('SA-11 Buk CC 9S470M1') } -cat['RED_BUK_SITE'] = { menuCategory='SAM long range', menu='BUK - All crates', description='BUK Site', dcsCargoType='container_cargo', requires={ RED_BUK_LN=1, RED_BUK_SR=1, RED_BUK_CC=1 }, initialStock=0, side=RED, category=Group.Category.GROUND, - build=multiUnits({ {type='SA-11 Buk LN 9A310M1'}, {type='SA-11 Buk SR 9S18M1', dx=12, dz=8}, {type='SA-11 Buk CC 9S470M1', dx=-12, dz=8} }) } - --- BUK site repair/augment (adds +1 launcher, repairs site by respawn) -cat['RED_BUK_REPAIR'] = { menuCategory='SAM long range', menu='BUK Repair/Launcher +1', description='BUK Repair (adds launcher)', dcsCargoType='container_cargo', required=1, initialStock=6, side=RED, category=Group.Category.GROUND, isRepair=true, build=function(point, headingDeg) - return singleUnit('Ural-375')(point, headingDeg) -end } - --- Drones (JTAC) -cat['BLUE_MQ9'] = { menuCategory='Drones', menu='MQ-9 Reaper - JTAC', description='MQ-9 JTAC', dcsCargoType='container_cargo', required=1, initialStock=3, side=BLUE, category=Group.Category.AIRPLANE, build=singleAirUnit('MQ-9 Reaper'), roles={'JTAC'}, jtac={ platform='air' } } -cat['RED_WINGLOONG'] = { menuCategory='Drones', menu='WingLoong-I - JTAC', description='WingLoong-I JTAC', dcsCargoType='container_cargo', required=1, initialStock=3, side=RED, category=Group.Category.AIRPLANE, build=singleAirUnit('WingLoong-I'), roles={'JTAC'}, jtac={ platform='air' } } - --- FOB crates (Support) — three small crates build a FOB site -cat['FOB_SMALL'] = { hidden=true, description='FOB small crate', dcsCargoType='container_cargo', required=1, initialStock=12, side=nil, category=Group.Category.GROUND, build=function(point, headingDeg) - -- spawns a harmless placeholder truck for visibility; consumed by FOB_SITE build - return singleUnit('Ural-375')(point, headingDeg) -end } -cat['FOB_SITE'] = { menuCategory='Support', menu='FOB Crates - All', description='FOB Site', isFOB=true, dcsCargoType='container_cargo', requires={ FOB_SMALL=3 }, initialStock=0, side=nil, category=Group.Category.GROUND, - build=multiUnits({ {type='HEMTT TFFT'}, {type='Ural-375 PBU', dx=10, dz=8}, {type='Ural-375', dx=-10, dz=8} }) } - --- Mobile MASH (Support) — three crates build a Mobile MASH unit -cat['MOBILE_MASH_SMALL'] = { hidden=true, description='Mobile MASH crate', dcsCargoType='container_cargo', required=1, initialStock=6, side=nil, category=Group.Category.GROUND, build=function(point, headingDeg) - -- spawns placeholder truck for visibility; consumed by MOBILE_MASH build - return singleUnit('Ural-375')(point, headingDeg) -end } -cat['BLUE_MOBILE_MASH'] = { menuCategory='Support', menu='Mobile MASH - All', description='Blue Mobile MASH Unit', isMobileMASH=true, dcsCargoType='container_cargo', requires={ MOBILE_MASH_SMALL=3 }, initialStock=0, side=BLUE, category=Group.Category.GROUND, build=singleUnit('M-113') } -cat['RED_MOBILE_MASH'] = { menuCategory='Support', menu='Mobile MASH - All', description='Red Mobile MASH Unit', isMobileMASH=true, dcsCargoType='container_cargo', requires={ MOBILE_MASH_SMALL=3 }, initialStock=0, side=RED, category=Group.Category.GROUND, build=singleUnit('BTR_D') } - --- ========================= --- Troop Type Definitions --- ========================= --- These define the composition of troop squads for Load/Unload Troops (NOT crates) --- Structure: { label, size, unitsBlue, unitsRed, units (fallback) } -local troops = {} - --- Assault Squad: general-purpose rifles/MG -troops['AS'] = { - label = 'Assault Squad', - size = 8, - unitsBlue = { 'Soldier M4', 'Soldier M249' }, - unitsRed = { 'Infantry AK', 'Infantry AK ver3' }, - units = { 'Infantry AK' }, -} - --- MANPADS Team: Anti-air element -troops['AA'] = { - label = 'MANPADS Team', - size = 4, - unitsBlue = { 'Soldier stinger', 'Stinger comm' }, - unitsRed = { 'SA-18 Igla-S manpad', 'SA-18 Igla comm' }, - units = { 'Infantry AK' }, -} - --- AT Team: Anti-tank element -troops['AT'] = { - label = 'AT Team', - size = 4, - unitsBlue = { 'Soldier RPG', 'Soldier RPG' }, - unitsRed = { 'Soldier RPG', 'Soldier RPG' }, - units = { 'Infantry AK' }, -} - --- Mortar Team: Indirect fire element -troops['AR'] = { - label = 'Mortar Team', - size = 4, - unitsBlue = { '2B11 mortar' }, - unitsRed = { '2B11 mortar' }, - units = { '2B11 mortar' }, -} - --- Export troop types -_CTLD_TROOP_TYPES = troops - --- Also export as a global for mission setups that load via DO SCRIPT FILE (no return capture) -_CTLD_EXTRACTED_CATALOG = cat -return cat diff --git a/Moose_DualCoalitionZoneCapture/Docs/1ownership.png b/Moose_DualCoalitionZoneCapture/Docs/1ownership.png deleted file mode 100644 index b58409d..0000000 Binary files a/Moose_DualCoalitionZoneCapture/Docs/1ownership.png and /dev/null differ diff --git a/Moose_DualCoalitionZoneCapture/Docs/2captured.png b/Moose_DualCoalitionZoneCapture/Docs/2captured.png deleted file mode 100644 index 44cbe44..0000000 Binary files a/Moose_DualCoalitionZoneCapture/Docs/2captured.png and /dev/null differ diff --git a/Moose_DualCoalitionZoneCapture/Docs/3.attacked.png b/Moose_DualCoalitionZoneCapture/Docs/3.attacked.png deleted file mode 100644 index 4da67ef..0000000 Binary files a/Moose_DualCoalitionZoneCapture/Docs/3.attacked.png and /dev/null differ diff --git a/Moose_DualCoalitionZoneCapture/Docs/4mgrs.png b/Moose_DualCoalitionZoneCapture/Docs/4mgrs.png deleted file mode 100644 index cd5f30e..0000000 Binary files a/Moose_DualCoalitionZoneCapture/Docs/4mgrs.png and /dev/null differ diff --git a/Moose_DualCoalitionZoneCapture/Docs/Example_Mission_Description.txt b/Moose_DualCoalitionZoneCapture/Docs/Example_Mission_Description.txt deleted file mode 100644 index 162d78c..0000000 --- a/Moose_DualCoalitionZoneCapture/Docs/Example_Mission_Description.txt +++ /dev/null @@ -1,48 +0,0 @@ -MOOSE Dual Coalition Zone Capture - Example Mission -=================================================== - -MISSION OVERVIEW: -This is a demonstration mission showcasing the MOOSE Dual Coalition Zone Capture system's -dynamic behavior and visual feedback mechanisms. - -SCENARIO: -Four strategic zones have been marked across the battlefield: -• Zone 1: Initially controlled by RED forces -• Zone 2: Initially controlled by BLUE forces -• Zone 3 & 4: Neutral territory, awaiting capture - -DEMONSTRATION FEATURES: -Ground units from both coalitions patrol the battlefield in a continuous cycle, moving between -zones to demonstrate the system's real-time response to territorial changes. Units are configured -in a non-combat mode to clearly showcase zone state transitions without interference from combat. - -WHAT YOU'LL SEE: -✓ Color-coded zone boundaries changing as units enter/exit (Red/Blue/Green/Orange) -✓ Tactical information markers updating with force compositions -✓ Smoke signals marking zone status changes -✓ Automatic messaging system announcing captures and attacks -✓ F10 radio menu commands for zone status queries -✓ Victory condition tracking as zones are captured - -OBSERVING THE DEMONSTRATION: -• Use F10 Map to view zone boundaries and tactical markers -• Monitor chat messages for zone status updates -• Access F10 → Zone Control → "Get Zone Status Report" for detailed information -• Watch as zones transition between Empty → Captured → Attacked → Guarded states -• Victory condition triggers when one coalition controls all four zones - -PURPOSE: -This mission serves as both a tutorial and testing environment for mission makers looking to -implement the zone capture system in their own scenarios. It demonstrates proper configuration, -visual feedback, and system behavior without the chaos of active combat. - -MISSION MAKER NOTES: -Examine the mission file to see: -- Proper trigger zone naming conventions -- BLUEHQ and REDHQ group placement -- Script loading order in triggers -- Zone configuration in the Lua file -- Unit waypoint setup for continuous patrol demonstration - -This is a reference implementation - feel free to modify, expand, or use as a template for your -own mission designs! diff --git a/Moose_DualCoalitionZoneCapture/Docs/Mission_Maker_Guide.html b/Moose_DualCoalitionZoneCapture/Docs/Mission_Maker_Guide.html deleted file mode 100644 index 778eedf..0000000 --- a/Moose_DualCoalitionZoneCapture/Docs/Mission_Maker_Guide.html +++ /dev/null @@ -1,845 +0,0 @@ - - - - - - MOOSE Dual Coalition Zone Capture - Mission Maker Guide - - - -
-
-

🎯 MOOSE Dual Coalition Zone Capture

-
Complete Mission Maker Implementation Guide
-
- -
- -
-

📖 Introduction

-

- The MOOSE Dual Coalition Zone Capture system is a fully-featured, balanced territorial control framework for DCS World missions. - This script creates dynamic capture zones that both RED and BLUE coalitions can fight over, with automatic victory detection, - tactical information displays, and comprehensive player feedback systems. -

- -
-

✨ Key Features

-
    -
  • Easy Configuration: Define zones with simple Lua tables - no complex coding required
  • -
  • Dual Coalition Support: Both RED and BLUE can capture zones and win
  • -
  • Dynamic Visual Feedback: Color-coded zone boundaries, smoke markers, and flares
  • -
  • Tactical Information: Real-time unit counts and MGRS coordinates for small enemy forces
  • -
  • F10 Radio Menu: Players can check status, progress, and refresh visuals
  • -
  • Automatic Victory Detection: First coalition to capture all zones wins
  • -
  • Flexible Initial Ownership: Set zones to start under RED, BLUE, or NEUTRAL control
  • -
  • Comprehensive Logging: Detailed debug output for troubleshooting
  • -
-
-
- - - - - -
-

📋 Requirements

-

Essential Components

-
    -
  1. DCS World - Any recent version
  2. -
  3. MOOSE Framework - Latest version recommended - -
  4. -
  5. This Script - Moose_DualCoalitionZoneCapture.lua
  6. -
- -

Mission Prerequisites

-
-

⚠️ Required Mission Elements

-

Your mission MUST contain the following groups (case-sensitive):

-
    -
  • BLUEHQ - A BLUE coalition ground unit group (can be a single unit)
  • -
  • REDHQ - A RED coalition ground unit group (can be a single unit)
  • -
-

Why? These groups serve as command centers for the messaging system. They can be placed anywhere, - even hidden or spawned late. Without them, the script will fail to initialize.

-
-
- - -
-

🚀 Quick Start Guide

-

Get up and running in 5 minutes:

- -

1Mission Editor Setup

-
    -
  1. Create trigger zones at locations you want to be capturable (e.g., airbases, towns)
  2. -
  3. Name each zone starting with Capture - for example: -
      -
    • Capture Severomorsk
    • -
    • Capture Murmansk
    • -
    • Capture Zone-1
    • -
    -
  4. -
  5. Create two ground unit groups named BLUEHQ and REDHQ
  6. -
- -

2Load MOOSE Framework

-
    -
  1. In Mission Editor → Triggers → New Trigger
  2. -
  3. Type: MISSION START
  4. -
  5. Actions → DO SCRIPT FILE → Select Moose_.lua
  6. -
- -

3Configure Zone Ownership

-

Open Moose_DualCoalitionZoneCapture.lua in a text editor and edit the ZONE_CONFIG section:

-
local ZONE_CONFIG = {
-  RED = {
-    "Capture Severomorsk",
-    "Capture Murmansk"
-  },
-  BLUE = {
-    "Capture Banak"
-  },
-  NEUTRAL = {
-    "Capture Contested Valley"
-  }
-}
- -

4Load the Script

-
    -
  1. In the same trigger, add another action
  2. -
  3. Actions → DO SCRIPT FILE → Select Moose_DualCoalitionZoneCapture.lua
  4. -
- -
-

✅ Done!

-

Save your mission, start it, and the zone capture system will automatically initialize. - Check the DCS.log file to verify successful zone creation.

-
-
- - -
-

📐 Detailed Setup Instructions

- -

Step 1: Creating Trigger Zones

-

In DCS Mission Editor:

-
    -
  1. Click the Trigger Zones button (or press F5)
  2. -
  3. Click New to create a zone
  4. -
  5. Set the zone type to Circular or Polygon
  6. -
  7. Position the zone over the area you want to be capturable
  8. -
  9. CRITICAL: Name the zone with any name you choose (e.g., "Capture Severomorsk")
  10. -
  11. Adjust the size to encompass the tactical area
  12. -
  13. Repeat for all capture locations
  14. -
- -
-

⚠️ Zone Naming Rules

-
    -
  • Zone names in the mission editor MUST EXACTLY match the names in your Lua config
  • -
  • Names are case-sensitive: Capture Zone-1capture zone-1
  • -
  • Spaces matter: Capture Zone-1CaptureZone-1
  • -
  • Best practice: Use the "Capture [Location]" format for clarity
  • -
-
- -

Step 2: Creating Command Centers

-

The script requires two "command center" groups to function:

- -

BLUEHQ Setup:

-
    -
  1. Place any BLUE ground unit (e.g., M-1 Abrams, Infantry, HMMWV)
  2. -
  3. Name the GROUP (not the unit): BLUEHQ
  4. -
  5. You can make it immortal via triggers if desired
  6. -
  7. Location doesn't matter - can even be in an unreachable area
  8. -
- -

REDHQ Setup:

-
    -
  1. Place any RED ground unit (e.g., T-90, BTR-80, Infantry)
  2. -
  3. Name the GROUP: REDHQ
  4. -
  5. Same rules as BLUEHQ
  6. -
- -
-

💡 Pro Tip: Hidden Command Centers

-

You can hide these units by:

-
    -
  • Placing them far off-map
  • -
  • Setting them to "UNCONTROLLED" start state
  • -
  • Using the "Late Activation" option
  • -
  • Adding a trigger to activate them after mission start
  • -
-

They only need to exist in the mission file - they don't need to be active or visible.

-
- -

Step 3: Script Loading Order

-

Create a MISSION START trigger with these actions IN ORDER:

-
    -
  1. DO SCRIPT FILE: Moose_.lua (MUST be first)
  2. -
  3. DO SCRIPT FILE: Moose_DualCoalitionZoneCapture.lua (MUST be after MOOSE)
  4. -
  5. (Optional) Any other scripts that depend on this system
  6. -
- -
-

❌ Common Loading Errors

-
    -
  • Script loaded before MOOSE: Will crash with "attempt to index a nil value"
  • -
  • Wrong trigger type: Must be MISSION START, not TIME MORE or ONCE
  • -
  • DO SCRIPT instead of DO SCRIPT FILE: Use FILE to load external Lua files
  • -
-
-
- - -
-

⚙️ Configuration Options

- -

Zone Ownership Configuration

-

Edit the ZONE_CONFIG table at the top of the script:

- -
local ZONE_CONFIG = {
-  -- Zones that start under RED coalition control
-  RED = {
-    "Capture Severomorsk-1",
-    "Capture Severomorsk-3",
-    "Capture Murmansk International"
-  },
-  
-  -- Zones that start under BLUE coalition control
-  BLUE = {
-    "Capture Banak",
-    "Capture Kirkenes"
-  },
-  
-  -- Zones that start neutral (empty/uncontrolled)
-  NEUTRAL = {
-    "Capture Contested Valley",
-    "Capture No Man's Land"
-  }
-}
- -
-

⚠️ Important: Initial Ownership vs. Unit Presence

-

The ownership you set here is the starting state of the zone. However:

-
    -
  • If you place RED units in a zone configured as BLUE, the zone will immediately flip to RED when the mission starts
  • -
  • Empty zones (no units) will respect your configured ownership
  • -
  • The script scans for units every 30 seconds (configurable)
  • -
-

Best Practice: Either start zones empty/neutral, or ensure ground units match the configured ownership.

-
- -

Advanced Settings

-
local ZONE_SETTINGS = {
-  guardDelay = 1,        -- Seconds before entering Guard state after capture
-  scanInterval = 30,     -- How often to scan for units in zones (seconds)
-  captureScore = 200     -- Points awarded for capturing a zone
-}
- - - - - - - - - - - - - - - - - - - - - - -
SettingDefaultDescription
guardDelay1Delay (in seconds) before a captured zone enters the "Guarded" state. Shorter = faster transitions.
scanInterval30How frequently the script checks for units in zones. Lower = more responsive but more CPU usage.
captureScore200Points awarded when a zone is captured (requires MOOSE scoring system to be active).
-
- - -
-

🎨 Understanding Zone States

-

Zones can be in one of four states, each with distinct visual indicators:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StateColorSmokeDescription
RED ControlledRed BorderRed SmokeZone is secured by RED coalition forces
BLUE ControlledBlue BorderBlue SmokeZone is secured by BLUE coalition forces
Neutral/EmptyGreen BorderGreen SmokeZone is uncontrolled and can be captured by either side
Contested/AttackedOrange BorderWhite SmokeZone is under attack - both coalitions have units present
- -

State Transitions

-
-

How Zones Change Ownership:

-
    -
  1. Empty → Captured: Move ground units into an empty zone
  2. -
  3. Captured → Attacked: Enemy forces enter a controlled zone
  4. -
  5. Attacked → Captured: One side eliminates all enemy forces
  6. -
  7. Captured → Empty: All units leave the zone
  8. -
  9. Captured → Guard: Zone remains secured after a brief delay
  10. -
-
- -

Tactical Information Markers

-

Each zone displays a tactical marker with real-time information:

-
    -
  • Force Counts: Shows R: (RED units), B: (BLUE units)
  • -
  • MGRS Coordinates: When ≤10 enemy units, shows their exact positions
  • -
  • Coalition-Specific: Each side sees their enemies marked
  • -
  • Auto-Refresh: Updates every 60 seconds
  • -
- -

Example tactical marker:

-
TACTICAL: Capture Severomorsk-1
-Forces: R:5 B:12
-TGTS: T-90@38U LV 12345 67890, BTR-80@38U LV 12346 67891
-
- - -
-

👥 Player Features

- -

F10 Radio Menu Commands

-

Players from both coalitions have access to F10 radio menu commands under "Zone Control":

- - - - - - - - - - - - - - - - - - -
CommandDescription
Get Zone Status ReportDisplays current ownership of all zones with detailed breakdown
Check Victory ProgressShows percentage toward victory and zones remaining
Refresh Zone ColorsManually redraws all zone boundaries (troubleshooting tool)
- -

Automatic Status Updates

-

The script provides automatic notifications:

-
    -
  • Every 5 minutes: Zone control report broadcast to both coalitions
  • -
  • On zone capture: Both sides notified when a zone changes hands
  • -
  • On zone attack: Alerts when a zone comes under attack
  • -
  • At 80% victory: Warning that one side is close to winning
  • -
  • On victory: Dramatic announcement with 60-second countdown
  • -
- -

Victory Conditions

-
-

🏆 How to Win

-

The first coalition to capture ALL zones wins the mission.

-
    -
  • Total zones must be controlled by one coalition
  • -
  • Victory triggers a 60-second countdown
  • -
  • Celebratory effects: smoke, flares, messages
  • -
  • Mission ends automatically with appropriate user flag set
  • -
-
-
- - -
-

🔧 Troubleshooting

- -

Script Won't Load

-
-

❌ Problem: "attempt to index a nil value"

-

Cause: MOOSE framework not loaded before this script

-

Solution: Ensure MOOSE is loaded FIRST in your MISSION START trigger

-
- -
-

❌ Problem: "GROUP:FindByName() returned nil"

-

Cause: BLUEHQ or REDHQ groups don't exist or are misnamed

-

Solution: Verify you have groups (not units) named exactly BLUEHQ and REDHQ

-
- -

Zones Not Working

-
-

❌ Problem: "Zone 'X' not found in mission editor!"

-

Cause: Zone name mismatch between Lua config and mission editor

-

Solution: -

    -
  1. Check DCS.log for the exact error message
  2. -
  3. Open mission editor and verify trigger zone names
  4. -
  5. Ensure names match EXACTLY (case-sensitive, spaces matter)
  6. -
  7. Update either the mission or Lua config to match
  8. -
-

-
- -

Zones Not Capturing

-
-

⚠️ Problem: Units in zone but ownership not changing

-

Possible Causes:

-
    -
  • Wrong unit types: Only ground units, planes, and helicopters are scanned
  • -
  • Dead units: Script only counts alive units
  • -
  • Scan timing: Wait 30 seconds for the next scan cycle
  • -
  • Both coalitions present: Zone enters "Attacked" state, doesn't flip ownership
  • -
-

Solution: Eliminate all enemy forces to capture the zone

-
- -

Visual Issues

-
-

💡 Problem: Zone colors wrong or not showing

-

Solutions:

-
    -
  • Use F10 → Zone Control → "Refresh Zone Colors"
  • -
  • Zone colors auto-refresh every 2 minutes
  • -
  • Check DCS graphics settings (markers must be enabled)
  • -
  • Restart mission if issue persists
  • -
-
- -

Checking Logs

-

The script provides extensive logging. To view:

-
    -
  1. Open DCS.log file in your Saved Games\DCS folder
  2. -
  3. Search for [CAPTURE Module] or [INIT]
  4. -
  5. Look for initialization messages and error reports
  6. -
- -

Successful initialization looks like:

-
[CAPTURE Module] [INIT] Starting zone initialization...
-[CAPTURE Module] [INIT] Creating zone: Capture Severomorsk-1 (Coalition: RED)
-[CAPTURE Module] [INIT] ✓ Zone 'Capture Severomorsk-1' initialized successfully
-[CAPTURE Module] [INIT] Zone initialization complete. Total zones created: 11
-
- - -
-

🔬 Advanced Customization

- -

Adjusting Scan Performance

-

If you experience performance issues with many units:

-
local ZONE_SETTINGS = {
-  scanInterval = 60,  -- Scan less frequently (every 60 seconds)
-}
- -

For fast-paced action:

-
local ZONE_SETTINGS = {
-  scanInterval = 15,  -- Scan more frequently (every 15 seconds)
-}
- -

Disabling Logging

-

To reduce log spam, add this BEFORE loading the script:

-
CAPTURE_ZONE_LOGGING = { enabled = false }
- -

Mission Integration

-

The script sets user flags on victory:

-
    -
  • BLUE_VICTORY = 1 when BLUE wins
  • -
  • RED_VICTORY = 1 when RED wins
  • -
-

You can use these flags in mission triggers to:

-
    -
  • End the mission
  • -
  • Trigger victory cutscenes
  • -
  • Award points or bonuses
  • -
  • Transition to next phase
  • -
- -

Modifying Messages

-

All player messages are in the event handler functions. Search for:

-
    -
  • OnEnterGuarded - Zone secured messages
  • -
  • OnEnterCaptured - Zone captured messages
  • -
  • OnEnterAttacked - Zone under attack messages
  • -
  • CheckVictoryCondition - Victory messages
  • -
- -

Zone-Specific Behavior

-

To create different behaviors for specific zones, modify the event handlers to check zone names:

-
local function OnEnterCaptured(ZoneCapture)
-  local zoneName = ZoneCapture:GetZoneName()
-  
-  if zoneName == "Capture MainBase" then
-    -- Special behavior for main base capture
-    US_CC:MessageTypeToCoalition("CRITICAL: Main base captured!", MESSAGE.Type.Information)
-  else
-    -- Standard behavior for other zones
-  end
-end
- -

Integration with Other Scripts

-

Access zone data from other scripts:

-
-- Get current ownership status
-local status = GetZoneOwnershipStatus()
--- Returns: { blue = X, red = Y, neutral = Z, total = N, zones = {...} }
-
--- Broadcast status manually
-BroadcastZoneStatus()
-
--- Refresh visuals manually
-RefreshAllZoneColors()
-
- - -
-

💡 Best Practices & Tips

- -
-

✅ Mission Design Tips

-
    -
  • Zone Size: Make zones large enough to encompass tactical areas but not so large they overlap
  • -
  • Zone Placement: Position over airbases, FOBs, or strategic terrain features
  • -
  • Starting Balance: Consider giving RED more zones for defensive scenarios, or split evenly for balanced play
  • -
  • Ground Units: Populate zones with defending forces appropriate to difficulty level
  • -
  • Respawning: Consider using MOOSE's spawn system to continuously reinforce zones
  • -
  • AI Behavior: Set AI ground units to "Ground Hold" or "Ground On Road" for best results
  • -
-
- -
-

🎮 Player Experience

-
    -
  • Brief players on F10 radio menu commands before mission start
  • -
  • Place zones at recognizable landmarks for easy navigation
  • -
  • Consider adding custom mission briefing with zone locations
  • -
  • Test zone sizes with different unit counts to ensure good balance
  • -
  • Use neutral zones as "no man's land" for dynamic front lines
  • -
-
- -
-

🚀 Quick Reference Card

-

Required Groups: BLUEHQ, REDHQ

-

Zone Naming: Must match exactly between mission and Lua

-

Load Order: MOOSE → This Script

-

Victory Condition: Capture all zones

-

F10 Menu: Zone Control → Status/Progress/Refresh

-

Log Location: Saved Games\DCS\Logs\DCS.log

-
-
- - -
-

📞 Support & Resources

- -

Script Author

-
-

Author: F99th-TracerFacer

-

Discord Community: https://discord.gg/7wBVWKK3

-

Join the Discord for support, updates, and discussion about this script and other DCS mission development topics.

-
- -

Additional Resources

- - -
-

✨ Version Information

-

Script Version: 2.0 (Dual Coalition)

-

Author: F99th-TracerFacer

-

Last Updated: October 2025

-

Compatibility: DCS World 2.9+, MOOSE Latest

-
-
-
- -
-

MOOSE Dual Coalition Zone Capture System

-

Created by F99th-TracerFacer for the DCS World Community | Powered by MOOSE Framework

-

Discord: https://discord.gg/7wBVWKK3

-

© 2025 | This guide is provided as-is for educational purposes

-
-
- - \ No newline at end of file diff --git a/Moose_DualCoalitionZoneCapture/Moose_DualCoalitionZoneCapture.lua b/Moose_DualCoalitionZoneCapture/Moose_DualCoalitionZoneCapture.lua deleted file mode 100644 index 3b3c739..0000000 --- a/Moose_DualCoalitionZoneCapture/Moose_DualCoalitionZoneCapture.lua +++ /dev/null @@ -1,1143 +0,0 @@ --- Refactored version with configurable zone ownership - --- ========================================== --- MESSAGE AND TIMING CONFIGURATION --- ========================================== -local MESSAGE_CONFIG = { - STATUS_BROADCAST_FREQUENCY = 3602, -- Zone status broadcast cadence (seconds) - STATUS_BROADCAST_START_DELAY = 10, -- Delay before first broadcast (seconds) - COLOR_VERIFICATION_FREQUENCY = 240, -- Zone color verification cadence (seconds) - COLOR_VERIFICATION_START_DELAY = 60, -- Delay before first color check (seconds) - TACTICAL_UPDATE_FREQUENCY = 180, -- Tactical marker update cadence (seconds) - TACTICAL_UPDATE_START_DELAY = 30, -- Delay before first tactical update (seconds) - STATUS_MESSAGE_DURATION = 15, -- How long general status messages stay onscreen - VICTORY_MESSAGE_DURATION = 300, -- How long victory/defeat alerts stay onscreen - CAPTURE_MESSAGE_DURATION = 15, -- Duration for capture/guard/empty notices - ATTACK_MESSAGE_DURATION = 15 -- Duration for attack alerts -} - --- ========================================== --- ZONE COLOR CONFIGURATION (Centralized) --- ========================================== --- Colors are in RGB format: {Red, Green, Blue} where each value is 0.0 to 1.0 -local ZONE_COLORS = { - -- Blue coalition zones - BLUE_CAPTURED = {0, 0, 1}, -- Blue (owned by Blue) - BLUE_ATTACKED = {0, 1, 1}, -- Cyan (owned by Blue, under attack) - - -- Red coalition zones - RED_CAPTURED = {1, 0, 0}, -- Red (owned by Red) - RED_ATTACKED = {1, 0.5, 0}, -- Orange (owned by Red, under attack) - - -- Neutral/Empty zones - EMPTY = {0, 1, 0} -- Green (no owner) -} - --- Helper to get the appropriate color for a zone based on state/ownership -local function GetZoneColor(zoneCapture) - local zoneCoalition = zoneCapture:GetCoalition() - local state = zoneCapture:GetCurrentState() - - -- Priority 1: Attacked overrides ownership color - if state == "Attacked" then - if zoneCoalition == coalition.side.BLUE then - return ZONE_COLORS.BLUE_ATTACKED - elseif zoneCoalition == coalition.side.RED then - return ZONE_COLORS.RED_ATTACKED - end - end - - -- Priority 2: Empty/neutral - if state == "Empty" then - return ZONE_COLORS.EMPTY - end - - -- Priority 3: Ownership color - if zoneCoalition == coalition.side.BLUE then - return ZONE_COLORS.BLUE_CAPTURED - elseif zoneCoalition == coalition.side.RED then - return ZONE_COLORS.RED_CAPTURED - end - - -- Fallback - return ZONE_COLORS.EMPTY -end - --- ========================================== --- ZONE CONFIGURATION --- ========================================== --- Mission makers: Edit this table to define zones and their initial ownership --- Just list the zone names under RED, BLUE, or NEUTRAL coalition --- The script will automatically create and configure all zones --- Make sure the zone names match exactly with those defined in the mission editor --- Zones must be defined in the mission editor as trigger zones named "Capture " --- Note: Red/Blue/Neutral zones defined below are only setting their initial ownership state. --- If there are existing units in the zone at mission start, ownership may change based on unit presence. - - -local ZONE_CONFIG = { - -- Zones that start under RED coalition control - -- IMPORTANT: Use the EXACT zone names from the mission editor (including "Capture " prefix if present) - RED = { - "Capture Zone-1", - "Capture Zone-2", - "Capture Zone-3", - - -- Add more zone names here for RED starting zones - }, - - -- Zones that start under BLUE coalition control - BLUE = { - "Capture Zone-4", - "Capture Zone-5", - "Capture Zone-6", - }, - - -- Zones that start neutral (empty/uncontrolled) - NEUTRAL = { - - } -} - --- Advanced settings (usually don't need to change these) -local ZONE_SETTINGS = { - guardDelay = 1, -- Delay before entering Guard state after capture - scanInterval = 30, -- How often to scan for units in the zone (seconds) - captureScore = 200 -- Points awarded for capturing a zone -} - --- ========================================== --- END OF CONFIGURATION --- ========================================== - --- Build Command Center and Mission for Blue Coalition -local blueHQ = GROUP:FindByName("BLUEHQ") -if blueHQ then - US_CC = COMMANDCENTER:New(blueHQ, "USA HQ") - US_Mission = MISSION:New(US_CC, "Zone Capture Example Mission", "Primary", "", coalition.side.BLUE) - US_Score = SCORING:New("Zone Capture Example Mission") - --US_Mission:AddScoring(US_Score) - --US_Mission:Start() - env.info("Blue Coalition Command Center and Mission started successfully") -else - env.info("ERROR: BLUEHQ group not found! Blue mission will not start.") -end - ---Build Command Center and Mission Red -local redHQ = GROUP:FindByName("REDHQ") -if redHQ then - RU_CC = COMMANDCENTER:New(redHQ, "Russia HQ") - RU_Mission = MISSION:New(RU_CC, "Zone Capture Example Mission", "Primary", "Hold what we have, take what we don't.", coalition.side.RED) - --RU_Score = SCORING:New("Zone Capture Example Mission") - --RU_Mission:AddScoring(RU_Score) - RU_Mission:Start() - env.info("Red Coalition Command Center and Mission started successfully") -else - env.info("ERROR: REDHQ group not found! Red mission will not start.") -end - - --- Setup BLUE Missions -do -- BLUE Mission - - US_Mission_Capture_Airfields = MISSION:New( US_CC, "Capture the Zones", "Primary", - "Capture the Zones marked on your F10 map.\n" .. - "Destroy enemy ground forces in the surrounding area, " .. - "then occupy each capture zone with a platoon.\n " .. - "Your orders are to hold position until all capture zones are taken.\n" .. - "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. - "Note that heavy resistance can be expected at the airbases!\n" - , coalition.side.BLUE) - - --US_Score = SCORING:New( "Capture Airfields" ) - - --US_Mission_Capture_Airfields:AddScoring( US_Score ) - - US_Mission_Capture_Airfields:Start() - -end - --- Setup RED Missions -do -- RED Mission - - RU_Mission_Capture_Airfields = MISSION:New( RU_CC, "Defend the Motherland", "Primary", - "Defend Russian airfields and recapture lost territory.\n" .. - "Eliminate enemy forces in capture zones and " .. - "maintain control with ground units.\n" .. - "Your orders are to prevent the enemy from capturing all strategic zones.\n" .. - "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. - "Expect heavy NATO resistance!\n" - , coalition.side.RED) - - --RU_Score = SCORING:New( "Defend Territory" ) - - --RU_Mission_Capture_Airfields:AddScoring( RU_Score ) - - RU_Mission_Capture_Airfields:Start() - -end - - --- Logging configuration: toggle logging behavior for this module --- Set `CAPTURE_ZONE_LOGGING.enabled = false` to silence module logs -if not CAPTURE_ZONE_LOGGING then - CAPTURE_ZONE_LOGGING = { enabled = false, prefix = "[CAPTURE Module]" } -end - -local function log(message, detailed) - if CAPTURE_ZONE_LOGGING.enabled then - -- Preserve the previous prefixing used across the module - if CAPTURE_ZONE_LOGGING.prefix then - env.info(tostring(CAPTURE_ZONE_LOGGING.prefix) .. " " .. tostring(message)) - else - env.info(tostring(message)) - end - end -end - - --- ========================================== --- ZONE INITIALIZATION SYSTEM --- ========================================== - --- Storage for all zone capture objects and metadata --- NOTE: These are exported as globals for plugin compatibility (e.g., Moose_DynamicGroundBattle_Plugin.lua) -zoneCaptureObjects = {} -- Global: accessible by other scripts -zoneNames = {} -- Global: accessible by other scripts -local zoneMetadata = {} -- Stores coalition ownership info - --- Function to initialize all zones from configuration -local function InitializeZones() - log("[INIT] Starting zone initialization from configuration...") - - local totalZones = 0 - - -- Process each coalition's zones - for coalitionName, zones in pairs(ZONE_CONFIG) do - local coalitionSide = nil - - -- Map coalition name to DCS coalition constant - if coalitionName == "RED" then - coalitionSide = coalition.side.RED - elseif coalitionName == "BLUE" then - coalitionSide = coalition.side.BLUE - elseif coalitionName == "NEUTRAL" then - coalitionSide = coalition.side.NEUTRAL - else - log(string.format("[INIT] WARNING: Unknown coalition '%s' in ZONE_CONFIG", coalitionName)) - end - - if coalitionSide then - for _, zoneName in ipairs(zones) do - log(string.format("[INIT] Creating zone: %s (Coalition: %s)", zoneName, coalitionName)) - - -- Create the MOOSE zone object (using exact name from config) - local zone = ZONE:New(zoneName) - - if zone then - -- Create the zone capture coalition object - local zoneCapture = ZONE_CAPTURE_COALITION:New(zone, coalitionSide) - - if zoneCapture then - -- Configure the zone - zoneCapture:__Guard(ZONE_SETTINGS.guardDelay) - zoneCapture:Start(ZONE_SETTINGS.scanInterval, ZONE_SETTINGS.scanInterval) - - -- Store in our data structures - table.insert(zoneCaptureObjects, zoneCapture) - table.insert(zoneNames, zoneName) - zoneMetadata[zoneName] = { - coalition = coalitionSide, - index = #zoneCaptureObjects - } - - totalZones = totalZones + 1 - log(string.format("[INIT] ✓ Zone '%s' initialized successfully", zoneName)) - else - log(string.format("[INIT] ✗ ERROR: Failed to create ZONE_CAPTURE_COALITION for '%s'", zoneName)) - end - else - log(string.format("[INIT] ✗ ERROR: Zone '%s' not found in mission editor!", zoneName)) - log(string.format("[INIT] Make sure you have a trigger zone named exactly: '%s'", zoneName)) - end - end - end - end - - log(string.format("[INIT] Zone initialization complete. Total zones created: %d", totalZones)) - return totalZones -end - --- Initialize all zones -local totalZones = InitializeZones() - - --- Global cached unit set - created once and maintained automatically by MOOSE -local CachedUnitSet = nil - --- Utility guard to safely test whether a unit is inside a zone without throwing -local function IsUnitInZone(unit, zone) - if not unit or not zone then - return false - end - - local ok, point = pcall(function() - return unit:GetPointVec3() - end) - - if not ok or not point then - return false - end - - local inZone = false - pcall(function() - inZone = zone:IsPointVec3InZone(point) - end) - - return inZone -end - --- Initialize the cached unit set once -local function InitializeCachedUnitSet() - if not CachedUnitSet then - CachedUnitSet = SET_UNIT:New() - :FilterCategories({"ground", "plane", "helicopter"}) -- Only scan relevant unit types - :FilterStart() -- Keep the set updated by MOOSE without recreating it - log("[PERFORMANCE] Initialized cached unit set for zone scanning") - end -end - -local function GetZoneForceStrengths(ZoneCapture) - if not ZoneCapture then - return { red = 0, blue = 0, neutral = 0 } - end - - local success, zone = pcall(function() - return ZoneCapture:GetZone() - end) - - if not success or not zone then - return { red = 0, blue = 0, neutral = 0 } - end - - local redCount = 0 - local blueCount = 0 - local neutralCount = 0 - - InitializeCachedUnitSet() - - if CachedUnitSet then - CachedUnitSet:ForEachUnit(function(unit) - if unit and unit:IsAlive() and IsUnitInZone(unit, zone) then - local unitCoalition = unit:GetCoalition() - if unitCoalition == coalition.side.RED then - redCount = redCount + 1 - elseif unitCoalition == coalition.side.BLUE then - blueCount = blueCount + 1 - elseif unitCoalition == coalition.side.NEUTRAL then - neutralCount = neutralCount + 1 - end - end - end) - end - - log(string.format("[TACTICAL] Zone %s scan result: R:%d B:%d N:%d", - ZoneCapture:GetZoneName(), redCount, blueCount, neutralCount)) - - return { - red = redCount, - blue = blueCount, - neutral = neutralCount - } -end - -local function GetEnemyUnitMGRSCoords(ZoneCapture, enemyCoalition) - if not ZoneCapture or not enemyCoalition then - return {} - end - - local success, zone = pcall(function() - return ZoneCapture:GetZone() - end) - - if not success or not zone then - return {} - end - - InitializeCachedUnitSet() - - local coords = {} - local totalUnits = 0 - local enemyUnits = 0 - local unitsWithCoords = 0 - - if CachedUnitSet then - CachedUnitSet:ForEachUnit(function(unit) - if unit and unit:IsAlive() and IsUnitInZone(unit, zone) then - totalUnits = totalUnits + 1 - local unitCoalition = unit:GetCoalition() - - if unitCoalition == enemyCoalition then - enemyUnits = enemyUnits + 1 - local coord = unit:GetCoordinate() - - if coord then - local mgrs = nil - local success_mgrs = false - - success_mgrs, mgrs = pcall(function() - return coord:ToStringMGRS(5) - end) - - if not success_mgrs or not mgrs then - success_mgrs, mgrs = pcall(function() - return coord:ToStringMGRS() - end) - end - - if not success_mgrs or not mgrs then - success_mgrs, mgrs = pcall(function() - return coord:ToMGRS() - end) - end - - if not success_mgrs or not mgrs then - success_mgrs, mgrs = pcall(function() - local lat, lon = coord:GetLLDDM() - return string.format("N%s E%s", lat, lon) - end) - end - - if success_mgrs and mgrs then - unitsWithCoords = unitsWithCoords + 1 - local unitType = unit:GetTypeName() or "Unknown" - table.insert(coords, { - name = unit:GetName(), - type = unitType, - mgrs = mgrs - }) - else - log(string.format("[TACTICAL DEBUG] All coordinate methods failed for unit %s", unit:GetName() or "unknown")) - end - else - log(string.format("[TACTICAL DEBUG] No coordinate for unit %s", unit:GetName() or "unknown")) - end - end - end - end) - end - - log(string.format("[TACTICAL DEBUG] %s - Total units scanned: %d, Enemy units: %d, units with MGRS: %d", - ZoneCapture:GetZoneName(), totalUnits, enemyUnits, unitsWithCoords)) - - log(string.format("[TACTICAL] Found %d enemy units with coordinates in %s", - #coords, ZoneCapture:GetZoneName())) - - return coords -end - -local function CreateTacticalInfoMarker(ZoneCapture) - -- Validate ZoneCapture - if not ZoneCapture then - log("[TACTICAL ERROR] ZoneCapture object is nil") - return - end - - -- Safely get the zone with error handling - local ok, zone = pcall(function() return ZoneCapture:GetZone() end) - if not ok or not zone then - log("[TACTICAL ERROR] Failed to get zone from ZoneCapture object") - return - end - - local forces = GetZoneForceStrengths(ZoneCapture) - local zoneName = ZoneCapture:GetZoneName() - - -- Build coalition-specific tactical info text - local function buildTacticalText(viewerCoalition) - local text = string.format("TACTICAL: %s\nForces: R:%d B:%d", zoneName, forces.red, forces.blue) - if forces.neutral and forces.neutral > 0 then - text = text .. string.format(" C:%d", forces.neutral) - end - - -- Append TGTS for the enemy of the viewer, capped at 10 units - local enemyCoalition = (viewerCoalition == coalition.side.BLUE) and coalition.side.RED or coalition.side.BLUE - local enemyCount = (enemyCoalition == coalition.side.RED) and (forces.red or 0) or (forces.blue or 0) - if enemyCount > 0 and enemyCount <= 10 then - local enemyCoords = GetEnemyUnitMGRSCoords(ZoneCapture, enemyCoalition) - log(string.format("[TACTICAL DEBUG] Building marker text for %s viewer: %d enemy units", (viewerCoalition==coalition.side.BLUE and "BLUE" or "RED"), #enemyCoords)) - if #enemyCoords > 0 then - text = text .. "\nTGTS:" - for i, unit in ipairs(enemyCoords) do - if i <= 10 then - local shortType = (unit.type or "Unknown"):gsub("^%w+%-", ""):gsub("%s.*", "") - local cleanMgrs = (unit.mgrs or ""):gsub("^MGRS%s+", ""):gsub("%s+", " ") - if i == 1 then - text = text .. string.format(" %s@%s", shortType, cleanMgrs) - else - text = text .. string.format(", %s@%s", shortType, cleanMgrs) - end - end - end - if #enemyCoords > 10 then - text = text .. string.format(" (+%d)", #enemyCoords - 10) - end - end - end - - return text - end - - local tacticalTextBLUE = buildTacticalText(coalition.side.BLUE) - local tacticalTextRED = buildTacticalText(coalition.side.RED) - - -- Debug: Log what will be displayed - log(string.format("[TACTICAL DEBUG] Marker text (BLUE) for %s:\n%s", zoneName, tacticalTextBLUE)) - log(string.format("[TACTICAL DEBUG] Marker text (RED) for %s:\n%s", zoneName, tacticalTextRED)) - - -- Create tactical marker offset from zone center - local coord = zone:GetCoordinate() - if coord then - local offsetCoord = coord:Translate(200, 45) -- 200m NE - - local function removeMarker(markerID) - if not markerID then - return - end - - local removed = pcall(function() - offsetCoord:RemoveMark(markerID) - end) - - if not removed then - removed = pcall(function() - trigger.action.removeMark(markerID) - end) - end - - if not removed then - pcall(function() - coord:RemoveMark(markerID) - end) - end - end - - -- Remove legacy single marker if present - if ZoneCapture.TacticalMarkerID then - log(string.format("[TACTICAL] Removing old marker ID %d for %s", ZoneCapture.TacticalMarkerID, zoneName)) - removeMarker(ZoneCapture.TacticalMarkerID) - ZoneCapture.TacticalMarkerID = nil - end - - -- BLUE Coalition Marker - if ZoneCapture.TacticalMarkerID_BLUE then - log(string.format("[TACTICAL] Removing old BLUE marker ID %d for %s", ZoneCapture.TacticalMarkerID_BLUE, zoneName)) - removeMarker(ZoneCapture.TacticalMarkerID_BLUE) - ZoneCapture.TacticalMarkerID_BLUE = nil - end - local successBlue, markerIDBlue = pcall(function() - return offsetCoord:MarkToCoalition(tacticalTextBLUE, coalition.side.BLUE) - end) - if successBlue and markerIDBlue then - ZoneCapture.TacticalMarkerID_BLUE = markerIDBlue - pcall(function() offsetCoord:SetMarkReadOnly(markerIDBlue, true) end) - log(string.format("[TACTICAL] Created BLUE marker for %s", zoneName)) - else - log(string.format("[TACTICAL] Failed to create BLUE marker for %s", zoneName)) - end - - -- RED Coalition Marker - if ZoneCapture.TacticalMarkerID_RED then - log(string.format("[TACTICAL] Removing old RED marker ID %d for %s", ZoneCapture.TacticalMarkerID_RED, zoneName)) - removeMarker(ZoneCapture.TacticalMarkerID_RED) - ZoneCapture.TacticalMarkerID_RED = nil - end - local successRed, markerIDRed = pcall(function() - return offsetCoord:MarkToCoalition(tacticalTextRED, coalition.side.RED) - end) - if successRed and markerIDRed then - ZoneCapture.TacticalMarkerID_RED = markerIDRed - pcall(function() offsetCoord:SetMarkReadOnly(markerIDRed, true) end) - log(string.format("[TACTICAL] Created RED marker for %s", zoneName)) - else - log(string.format("[TACTICAL] Failed to create RED marker for %s", zoneName)) - end - end -end - --- Event handler functions - define them separately for each zone -local function OnEnterGuarded(ZoneCapture, From, Event, To) - if From ~= To then - local Coalition = ZoneCapture:GetCoalition() - if Coalition == coalition.side.BLUE then - ZoneCapture:Smoke( SMOKECOLOR.Blue ) - -- Update zone visual markers to BLUE - ZoneCapture:UndrawZone() - local color = ZONE_COLORS.BLUE_CAPTURED - ZoneCapture:DrawZone(-1, {0, 0, 0}, 1, color, 0.2, 2, true) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - else - ZoneCapture:Smoke( SMOKECOLOR.Red ) - -- Update zone visual markers to RED - ZoneCapture:UndrawZone() - local color = ZONE_COLORS.RED_CAPTURED - ZoneCapture:DrawZone(-1, {0, 0, 0}, 1, color, 0.2, 2, true) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - end - -- Create/update tactical information marker - CreateTacticalInfoMarker(ZoneCapture) - end -end - -local function OnEnterEmpty(ZoneCapture) - ZoneCapture:Smoke( SMOKECOLOR.Green ) - -- Update zone visual markers to GREEN (neutral) - ZoneCapture:UndrawZone() - local color = ZONE_COLORS.EMPTY - ZoneCapture:DrawZone(-1, {0, 0, 0}, 1, color, 0.2, 2, true) - US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - -- Create/update tactical information marker - CreateTacticalInfoMarker(ZoneCapture) -end - -local function OnEnterAttacked(ZoneCapture) - ZoneCapture:Smoke( SMOKECOLOR.White ) - -- Update zone visual markers based on owner (attacked state) - ZoneCapture:UndrawZone() - local Coalition = ZoneCapture:GetCoalition() - local color - if Coalition == coalition.side.BLUE then - color = ZONE_COLORS.BLUE_ATTACKED - US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.ATTACK_MESSAGE_DURATION ) - RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.ATTACK_MESSAGE_DURATION ) - else - color = ZONE_COLORS.RED_ATTACKED - RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.ATTACK_MESSAGE_DURATION ) - US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.ATTACK_MESSAGE_DURATION ) - end - ZoneCapture:DrawZone(-1, {0, 0, 0}, 1, color, 0.2, 2, true) - -- Create/update tactical information marker - CreateTacticalInfoMarker(ZoneCapture) -end - --- Victory condition monitoring for BOTH coalitions -local function CheckVictoryCondition() - local blueZonesCount = 0 - local redZonesCount = 0 - local totalZones = #zoneCaptureObjects - - for i, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - local zoneCoalition = zoneCapture:GetCoalition() - if zoneCoalition == coalition.side.BLUE then - blueZonesCount = blueZonesCount + 1 - elseif zoneCoalition == coalition.side.RED then - redZonesCount = redZonesCount + 1 - end - end - end - - log(string.format("[VICTORY CHECK] Blue owns %d/%d zones, Red owns %d/%d zones", - blueZonesCount, totalZones, redZonesCount, totalZones)) - - -- Check for BLUE victory - if blueZonesCount >= totalZones then - log("[VICTORY] All zones captured by BLUE! Triggering victory sequence...") - - US_CC:MessageTypeToCoalition( - "VICTORY! All capture zones have been secured by coalition forces!\n\n" .. - "Operation Polar Shield is complete. Outstanding work!\n" .. - "Mission will end in 60 seconds.", - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - - RU_CC:MessageTypeToCoalition( - "DEFEAT! All strategic positions have been lost to coalition forces.\n\n" .. - "Operation Polar Shield has failed. Mission ending in 60 seconds.", - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - - -- Add victory celebration effects - for _, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - zoneCapture:Smoke( SMOKECOLOR.Blue ) - local zone = zoneCapture:GetZone() - if zone then - zone:FlareZone( FLARECOLOR.Blue, 90, 60 ) - end - end - end - - SCHEDULER:New( nil, function() - log("[VICTORY] Ending mission due to complete zone capture by BLUE") - trigger.action.setUserFlag("BLUE_VICTORY", 1) - - US_CC:MessageTypeToCoalition( - string.format("Mission Complete! Congratulations on your victory!\nFinal Status: All %d strategic zones secured.", totalZones), - MESSAGE.Type.Information, 10 - ) - end, {}, 60 ) - - return true - end - - -- Check for RED victory - if redZonesCount >= totalZones then - log("[VICTORY] All zones captured by RED! Triggering victory sequence...") - - RU_CC:MessageTypeToCoalition( - "VICTORY! All strategic positions secured for the Motherland!\n\n" .. - "NATO forces have been repelled. Outstanding work!\n" .. - "Mission will end in 60 seconds.", - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - - US_CC:MessageTypeToCoalition( - "DEFEAT! All capture zones have been lost to Russian forces.\n\n" .. - "Operation Polar Shield has failed. Mission ending in 60 seconds.", - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - - -- Add victory celebration effects - for _, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - zoneCapture:Smoke( SMOKECOLOR.Red ) - local zone = zoneCapture:GetZone() - if zone then - zone:FlareZone( FLARECOLOR.Red, 90, 60 ) - end - end - end - - SCHEDULER:New( nil, function() - log("[VICTORY] Ending mission due to complete zone capture by RED") - trigger.action.setUserFlag("RED_VICTORY", 1) - - RU_CC:MessageTypeToCoalition( - string.format("Mission Complete! Congratulations on your victory!\nFinal Status: All %d strategic zones secured.", totalZones), - MESSAGE.Type.Information, 10 - ) - end, {}, 60 ) - - return true - end - - return false -- Victory not yet achieved by either side -end - -local function OnEnterCaptured(ZoneCapture) - local Coalition = ZoneCapture:GetCoalition() - if Coalition == coalition.side.BLUE then - -- Update zone visual markers to BLUE for captured - ZoneCapture:UndrawZone() - local color = ZONE_COLORS.BLUE_CAPTURED - ZoneCapture:DrawZone(-1, {0, 0, 0}, 1, color, 0.2, 2, true) - RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - else - -- Update zone visual markers to RED for captured - ZoneCapture:UndrawZone() - local color = ZONE_COLORS.RED_CAPTURED - ZoneCapture:DrawZone(-1, {0, 0, 0}, 1, color, 0.2, 2, true) - US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCapture:GetZoneName() ), MESSAGE.Type.Information, MESSAGE_CONFIG.CAPTURE_MESSAGE_DURATION ) - end - - ZoneCapture:AddScore( "Captured", "Zone captured: Extra points granted.", ZONE_SETTINGS.captureScore ) - ZoneCapture:__Guard( 30 ) - - -- Create/update tactical information marker - CreateTacticalInfoMarker(ZoneCapture) - - -- Check victory condition after any zone capture - CheckVictoryCondition() -end - --- Set up event handlers for each zone with proper MOOSE methods and debugging -for i, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - local zoneName = zoneNames[i] or ("Zone " .. i) - - -- Proper MOOSE event handlers for ZONE_CAPTURE_COALITION - zoneCapture.OnEnterGuarded = OnEnterGuarded - zoneCapture.OnEnterEmpty = OnEnterEmpty - zoneCapture.OnEnterAttacked = OnEnterAttacked - zoneCapture.OnEnterCaptured = OnEnterCaptured - - -- Debug: Check if the underlying zone exists - local success, zone = pcall(function() return zoneCapture:GetZone() end) - if success and zone then - log("✓ Zone '" .. zoneName .. "' successfully created and linked") - - -- Get initial coalition color for this zone - local initialCoalition = zoneCapture:GetCoalition() - local colorRGB = ZONE_COLORS.EMPTY - - if initialCoalition == coalition.side.RED then - colorRGB = ZONE_COLORS.RED_CAPTURED - elseif initialCoalition == coalition.side.BLUE then - colorRGB = ZONE_COLORS.BLUE_CAPTURED - end - - -- Initialize zone borders with appropriate initial color - local drawSuccess, drawError = pcall(function() - zone:DrawZone(-1, {0, 0, 0}, 1, colorRGB, 0.2, 2, true) - end) - - if not drawSuccess then - log("⚠ Zone 'Capture " .. zoneName .. "' border drawing failed: " .. tostring(drawError)) - -- Alternative: Try simpler zone marking - pcall(function() - if initialCoalition == coalition.side.RED then - zone:SmokeZone(SMOKECOLOR.Red, 30) - elseif initialCoalition == coalition.side.BLUE then - zone:SmokeZone(SMOKECOLOR.Blue, 30) - else - zone:SmokeZone(SMOKECOLOR.Green, 30) - end - end) - else - local coalitionName = "NEUTRAL" - if initialCoalition == coalition.side.RED then - coalitionName = "RED" - elseif initialCoalition == coalition.side.BLUE then - coalitionName = "BLUE" - end - log("✓ Zone '" .. zoneName .. "' border drawn successfully with " .. coalitionName .. " initial color") - end - else - log("✗ ERROR: Zone '" .. zoneName .. "' not found in mission editor!") - log(" Make sure you have a trigger zone named exactly: '" .. zoneName .. "'") - end - else - log("✗ ERROR: Zone capture object " .. i .. " (" .. (zoneNames[i] or "Unknown") .. ") is nil!") - end -end - --- ========================================== --- VICTORY MONITORING SYSTEM --- ========================================== - --- Function to get current zone ownership status -local function GetZoneOwnershipStatus() - local status = { - blue = 0, - red = 0, - neutral = 0, - total = #zoneCaptureObjects, - zones = {} - } - - -- Explicitly reference the global coalition table to avoid parameter shadowing - local coalitionTable = _G.coalition or coalition - - for i, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - local zoneCoalition = zoneCapture:GetCoalition() - local zoneName = zoneNames[i] or ("Zone " .. i) - - -- Get the current state of the zone - local currentState = zoneCapture:GetCurrentState() - local stateString = "" - - -- Determine status based on coalition and state - if zoneCoalition == coalitionTable.side.BLUE then - status.blue = status.blue + 1 - if currentState == "Attacked" then - status.zones[zoneName] = "BLUE (Under Attack)" - else - status.zones[zoneName] = "BLUE" - end - elseif zoneCoalition == coalitionTable.side.RED then - status.red = status.red + 1 - if currentState == "Attacked" then - status.zones[zoneName] = "RED (Under Attack)" - else - status.zones[zoneName] = "RED" - end - else - status.neutral = status.neutral + 1 - if currentState == "Attacked" then - status.zones[zoneName] = "NEUTRAL (Under Attack)" - else - status.zones[zoneName] = "NEUTRAL" - end - end - end - end - - return status -end - --- Function to broadcast zone status report to BOTH coalitions -local function BroadcastZoneStatus() - local status = GetZoneOwnershipStatus() - - -- Build coalition-neutral report - local reportMessage = string.format( - "ZONE CONTROL REPORT:\n" .. - "Blue Coalition: %d/%d zones\n" .. - "Red Coalition: %d/%d zones\n" .. - "Neutral: %d/%d zones", - status.blue, status.total, - status.red, status.total, - status.neutral, status.total - ) - - -- Add detailed zone status - local detailMessage = "\nZONE DETAILS:\n" - for zoneName, owner in pairs(status.zones) do - detailMessage = detailMessage .. string.format("• %s: %s\n", zoneName, owner) - end - - local fullMessage = reportMessage .. detailMessage - - -- Broadcast to BOTH coalitions with their specific victory progress - local totalZones = math.max(status.total, 1) - local blueProgressPercent = math.floor((status.blue / totalZones) * 100) - local blueFullMessage = fullMessage .. string.format("\n\nYour Progress to Victory: %d%%", blueProgressPercent) - US_CC:MessageTypeToCoalition( blueFullMessage, MESSAGE.Type.Information, MESSAGE_CONFIG.STATUS_MESSAGE_DURATION ) - - local redProgressPercent = math.floor((status.red / totalZones) * 100) - local redFullMessage = fullMessage .. string.format("\n\nYour Progress to Victory: %d%%", redProgressPercent) - RU_CC:MessageTypeToCoalition( redFullMessage, MESSAGE.Type.Information, MESSAGE_CONFIG.STATUS_MESSAGE_DURATION ) - - log("[ZONE STATUS] " .. reportMessage:gsub("\n", " | ")) - - return status -end - --- Periodic zone monitoring (every 5 minutes) for BOTH coalitions -local ZoneMonitorScheduler = SCHEDULER:New( nil, function() - local status = BroadcastZoneStatus() - - -- Check if BLUE is close to victory (80% or more zones captured) - if status.blue >= math.floor(status.total * 0.8) and status.blue < status.total then - US_CC:MessageTypeToCoalition( - string.format("APPROACHING VICTORY! %d more zone(s) needed for complete success!", - status.total - status.blue), - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - - RU_CC:MessageTypeToCoalition( - string.format("CRITICAL SITUATION! Coalition forces control %d/%d zones! We must recapture territory!", - status.blue, status.total), - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - end - - -- Check if RED is close to victory (80% or more zones captured) - if status.red >= math.floor(status.total * 0.8) and status.red < status.total then - RU_CC:MessageTypeToCoalition( - string.format("APPROACHING VICTORY! %d more zone(s) needed for complete success!", - status.total - status.red), - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - - US_CC:MessageTypeToCoalition( - string.format("CRITICAL SITUATION! Russian forces control %d/%d zones! We must recapture territory!", - status.red, status.total), - MESSAGE.Type.Information, MESSAGE_CONFIG.VICTORY_MESSAGE_DURATION - ) - end - -end, {}, MESSAGE_CONFIG.STATUS_BROADCAST_START_DELAY, MESSAGE_CONFIG.STATUS_BROADCAST_FREQUENCY ) - --- Periodic zone color verification system (every 2 minutes) -local ZoneColorVerificationScheduler = SCHEDULER:New( nil, function() - log("[ZONE COLORS] Running periodic zone color verification...") - - -- Verify each zone's visual marker matches its CURRENT STATE (not just coalition) - for i, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - local zoneCoalition = zoneCapture:GetCoalition() - local zoneName = zoneNames[i] or ("Zone " .. i) - local currentState = zoneCapture:GetCurrentState() - - local zoneColor = GetZoneColor(zoneCapture) - - -- Force redraw the zone with correct color based on CURRENT STATE - zoneCapture:UndrawZone() - zoneCapture:DrawZone(-1, {0, 0, 0}, 1, zoneColor, 0.2, 2, true) - - -- Log the color assignment for debugging - local colorName = "UNKNOWN" - if currentState == "Attacked" then - colorName = (zoneCoalition == coalition.side.BLUE) and "LIGHT BLUE (Blue Attacked)" or "ORANGE (Red Attacked)" - elseif currentState == "Empty" then - colorName = "GREEN (Empty)" - elseif zoneCoalition == coalition.side.BLUE then - colorName = "BLUE (Owned)" - elseif zoneCoalition == coalition.side.RED then - colorName = "RED (Owned)" - else - colorName = "GREEN (Fallback)" - end - log(string.format("[ZONE COLORS] %s: Set to %s", zoneName, colorName)) - end - end - -end, {}, MESSAGE_CONFIG.COLOR_VERIFICATION_START_DELAY, MESSAGE_CONFIG.COLOR_VERIFICATION_FREQUENCY ) - --- Periodic tactical marker update system with change detection -local __lastForceCountsByZone = {} -local TacticalMarkerUpdateScheduler = SCHEDULER:New( nil, function() - log("[TACTICAL] Running periodic tactical marker update (change-detected)...") - - for i, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - local zoneName = zoneCapture.GetZoneName and zoneCapture:GetZoneName() or (zoneNames[i] or ("Zone " .. i)) - local counts = GetZoneForceStrengths(zoneCapture) - local last = __lastForceCountsByZone[zoneName] - local changed = (not last) - or (last.red ~= counts.red) - or (last.blue ~= counts.blue) - or (last.neutral ~= counts.neutral) - - if changed then - __lastForceCountsByZone[zoneName] = { - red = counts.red, - blue = counts.blue, - neutral = counts.neutral - } - CreateTacticalInfoMarker(zoneCapture) - end - end - end - -end, {}, MESSAGE_CONFIG.TACTICAL_UPDATE_START_DELAY, MESSAGE_CONFIG.TACTICAL_UPDATE_FREQUENCY ) - --- Function to refresh all zone colors based on current ownership -local function RefreshAllZoneColors() - log("[ZONE COLORS] Refreshing all zone visual markers...") - - for i, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture then - local zoneCoalition = zoneCapture:GetCoalition() - local zoneName = zoneNames[i] or ("Zone " .. i) - local currentState = zoneCapture:GetCurrentState() - - -- Get color for current state/ownership - local zoneColor = GetZoneColor(zoneCapture) - - -- Clear existing drawings - zoneCapture:UndrawZone() - - -- Redraw with correct color - zoneCapture:DrawZone(-1, {0, 0, 0}, 1, zoneColor, 0.2, 2, true) - - -- Log the color assignment for debugging - local colorName = "UNKNOWN" - if currentState == "Attacked" then - colorName = (zoneCoalition == coalition.side.BLUE) and "LIGHT BLUE (Blue Attacked)" or "ORANGE (Red Attacked)" - elseif currentState == "Empty" then - colorName = "GREEN (Empty)" - elseif zoneCoalition == coalition.side.BLUE then - colorName = "BLUE (Owned)" - elseif zoneCoalition == coalition.side.RED then - colorName = "RED (Owned)" - else - colorName = "GREEN (Fallback)" - end - log(string.format("[ZONE COLORS] %s: Set to %s", zoneName, colorName)) - end - end - - -- Notify BOTH coalitions - US_CC:MessageTypeToCoalition("Zone visual markers have been refreshed!", MESSAGE.Type.Information, MESSAGE_CONFIG.STATUS_MESSAGE_DURATION) - RU_CC:MessageTypeToCoalition("Zone visual markers have been refreshed!", MESSAGE.Type.Information, MESSAGE_CONFIG.STATUS_MESSAGE_DURATION) -end - --- Manual zone status commands for players (F10 radio menu) - BOTH COALITIONS -local function SetupZoneStatusCommands() - -- Add F10 radio menu commands for BLUE coalition - if US_CC then - -- Use MenuManager to create zone control menu under Mission Options - local USMenu = MenuManager and MenuManager.CreateCoalitionMenu(coalition.side.BLUE, "Zone Control") - or MENU_COALITION:New( coalition.side.BLUE, "Zone Control" ) - MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Get Zone Status Report", USMenu, BroadcastZoneStatus ) - - MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Check Victory Progress", USMenu, function() - local status = GetZoneOwnershipStatus() - local totalZones = math.max(status.total, 1) - local progressPercent = math.floor((status.blue / totalZones) * 100) - - US_CC:MessageTypeToCoalition( - string.format( - "VICTORY PROGRESS: %d%%\n" .. - "Zones Captured: %d/%d\n" .. - "Remaining: %d zones\n\n" .. - "%s", - progressPercent, - status.blue, status.total, - status.total - status.blue, - progressPercent >= 100 and "MISSION COMPLETE!" or - progressPercent >= 80 and "ALMOST THERE!" or - progressPercent >= 50 and "GOOD PROGRESS!" or - "KEEP FIGHTING!" - ), - MESSAGE.Type.Information, MESSAGE_CONFIG.STATUS_MESSAGE_DURATION - ) - end ) - - -- Add command to refresh zone colors (troubleshooting tool) - MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Refresh Zone Colors", USMenu, RefreshAllZoneColors ) - end - - -- Add F10 radio menu commands for RED coalition - if RU_CC then - -- Use MenuManager to create zone control menu under Mission Options - local RUMenu = MenuManager and MenuManager.CreateCoalitionMenu(coalition.side.RED, "Zone Control") - or MENU_COALITION:New( coalition.side.RED, "Zone Control" ) - MENU_COALITION_COMMAND:New( coalition.side.RED, "Get Zone Status Report", RUMenu, BroadcastZoneStatus ) - - MENU_COALITION_COMMAND:New( coalition.side.RED, "Check Victory Progress", RUMenu, function() - local status = GetZoneOwnershipStatus() - local totalZones = math.max(status.total, 1) - local progressPercent = math.floor((status.red / totalZones) * 100) - - RU_CC:MessageTypeToCoalition( - string.format( - "VICTORY PROGRESS: %d%%\n" .. - "Zones Captured: %d/%d\n" .. - "Remaining: %d zones\n\n" .. - "%s", - progressPercent, - status.red, status.total, - status.total - status.red, - progressPercent >= 100 and "MISSION COMPLETE!" or - progressPercent >= 80 and "ALMOST THERE!" or - progressPercent >= 50 and "GOOD PROGRESS!" or - "KEEP FIGHTING!" - ), - MESSAGE.Type.Information, MESSAGE_CONFIG.STATUS_MESSAGE_DURATION - ) - end ) - - -- Add command to refresh zone colors (troubleshooting tool) - MENU_COALITION_COMMAND:New( coalition.side.RED, "Refresh Zone Colors", RUMenu, RefreshAllZoneColors ) - end -end - --- Initialize zone status monitoring -SCHEDULER:New( nil, function() - log("[VICTORY SYSTEM] Initializing zone monitoring system...") - - -- Initialize performance optimization caches - InitializeCachedUnitSet() - - SetupZoneStatusCommands() - - -- Initial status report - SCHEDULER:New( nil, function() - log("[VICTORY SYSTEM] Broadcasting initial zone status...") - BroadcastZoneStatus() - end, {}, 30 ) -- Initial report after 30 seconds - -end, {}, 5 ) -- Initialize after 5 seconds - -log("[VICTORY SYSTEM] Zone capture victory monitoring system loaded successfully!") -log(string.format("[CONFIG] Loaded %d zones from configuration", totalZones)) diff --git a/Moose_DualCoalitionZoneCapture/Moose_DualCoalitionZoneCapture.miz b/Moose_DualCoalitionZoneCapture/Moose_DualCoalitionZoneCapture.miz deleted file mode 100644 index 5b69833..0000000 Binary files a/Moose_DualCoalitionZoneCapture/Moose_DualCoalitionZoneCapture.miz and /dev/null differ diff --git a/Moose_DualCoalitionZoneCapture/README.md b/Moose_DualCoalitionZoneCapture/README.md deleted file mode 100644 index 9554990..0000000 --- a/Moose_DualCoalitionZoneCapture/README.md +++ /dev/null @@ -1,288 +0,0 @@ -# MOOSE Dual Coalition Zone Capture System - -A dynamic zone capture and control system for DCS World missions using the MOOSE framework. This script enables territory-based gameplay where RED and BLUE coalitions compete to capture and hold strategic zones across the battlefield. - -![Version](https://img.shields.io/badge/version-2.0-blue) -![DCS](https://img.shields.io/badge/DCS-2.9%2B-green) -![MOOSE](https://img.shields.io/badge/MOOSE-Latest-orange) -![License](https://img.shields.io/badge/license-MIT-lightgrey) - -## 🎯 Features - -- **🎨 Visual Feedback**: Color-coded zone boundaries (Red/Blue/Green/Orange) that change dynamically -- **💨 Smoke Signals**: Automatic smoke markers indicating zone status -- **📍 Tactical Information**: Real-time force composition and MGRS coordinates for enemies -- **🏆 Victory Conditions**: Automatic win detection when one coalition captures all zones -- **📻 F10 Radio Menu**: Player-accessible status reports and progress tracking -- **⚙️ Highly Configurable**: Simple zone ownership configuration via Lua tables -- **🔄 Dual Coalition**: Full support for both RED and BLUE coalitions -- **📊 Auto-Reporting**: Periodic status updates every 5 minutes -- **🎮 Player-Friendly**: Clear messaging and intuitive state transitions - -## 🚀 Quick Start - -### Prerequisites - -1. **DCS World** (version 2.9 or higher) -2. **MOOSE Framework** ([Download here](https://github.com/FlightControl-Master/MOOSE)) -3. Basic knowledge of DCS Mission Editor - -### Installation - -1. **Download the files:** - - `Moose_DualCoalitionZoneCapture.lua` - Main script - - `Moose_DualCoalitionZoneCapture.miz` - Example mission - - `Moose_.lua` - MOOSE framework (get latest version) - -2. **In DCS Mission Editor:** - - Create trigger zones for each capture point (e.g., "Capture Zone-1", "Capture Severomorsk") - - Create two groups: `BLUEHQ` (any BLUE ground unit) and `REDHQ` (any RED ground unit) - -3. **Configure zones** in `Moose_DualCoalitionZoneCapture.lua`: - -```lua -local ZONE_CONFIG = { - RED = { - "Capture Zone-1", - "Capture Zone-2" - }, - BLUE = { - "Capture Zone-3", - "Capture Zone-4" - }, - NEUTRAL = { - -- Empty zones at mission start - } -} -``` - -4. **Load scripts** via Mission Start trigger: - - Action 1: DO SCRIPT FILE → `Moose_.lua` - - Action 2: DO SCRIPT FILE → `Moose_DualCoalitionZoneCapture.lua` - -5. **Save and test** your mission! - -## 📖 How It Works - -### Zone States - -Zones transition between four distinct states: - -| State | Color | Smoke | Description | -|-------|-------|-------|-------------| -| **RED Controlled** | 🔴 Red Border | Red | Zone secured by RED coalition | -| **BLUE Controlled** | 🔵 Blue Border | Blue | Zone secured by BLUE coalition | -| **Neutral/Empty** | 🟢 Green Border | Green | Uncontrolled, ready for capture | -| **Contested** | 🟠 Orange Border | White | Multiple coalitions present - fighting for control | - -### Capture Mechanics - -- **To Capture**: Move ground units into a zone -- **To Hold**: Eliminate all enemy forces in the zone -- **To Win**: Capture ALL zones on the map - -The script automatically scans zones every 30 seconds (configurable) and updates ownership based on unit presence. - -### Tactical Information Markers - -Each zone displays real-time tactical data: - -``` -TACTICAL: Capture Severomorsk-1 -Forces: R:5 B:12 -TGTS: T-90@38U LV 12345 67890, BTR-80@38U LV 12346 67891 -``` - -- **Force Counts**: Number of units per coalition -- **MGRS Coordinates**: Precise enemy locations (when ≤10 units) -- **Coalition-Specific**: Each side sees their enemies marked - -## ⚙️ Configuration Options - -### Zone Settings - -```lua -local ZONE_SETTINGS = { - guardDelay = 1, -- Seconds before entering Guard state after capture - scanInterval = 30, -- How often to scan for units (seconds) - captureScore = 200 -- Points awarded for zone capture -} -``` - -### Performance Tuning - -For missions with many units: -```lua -scanInterval = 60 -- Scan less frequently -``` - -For fast-paced action: -```lua -scanInterval = 15 -- More responsive zone changes -``` - -### Logging Control - -Disable detailed logging: -```lua -CAPTURE_ZONE_LOGGING = { enabled = false } -``` - -## 👥 Player Features - -### F10 Radio Menu Commands - -Players access zone information via **F10 → Zone Control**: - -- **Get Zone Status Report**: Current ownership of all zones -- **Check Victory Progress**: Percentage toward victory -- **Refresh Zone Colors**: Manually redraw zone boundaries - -### Automatic Notifications - -- ✅ Zone capture/loss announcements -- ⚠️ Attack warnings when zones are contested -- 📊 Status reports every 5 minutes -- 🏆 Victory alerts at 80% and 100% completion -- 🎉 Victory countdown with celebratory effects - -## 🎮 Example Mission - -The included `Moose_DualCoalitionZoneCapture.miz` demonstrates: - -- Proper zone configuration -- HQ group placement -- Script loading order -- AI patrol patterns for testing -- All visual and messaging features - -**Use this mission as a template for your own scenarios!** - -## 🔧 Troubleshooting - -### Common Issues - -#### ❌ Script Won't Load -**Error**: "attempt to index a nil value" -- **Cause**: MOOSE not loaded first -- **Fix**: Ensure load order is MOOSE → Capture Script - -#### ❌ Zone Not Found -**Error**: "Zone 'X' not found in mission editor!" -- **Cause**: Zone name mismatch -- **Fix**: Verify zone names match EXACTLY (case-sensitive!) - -#### ⚠️ Zones Not Capturing -- Only ground units, planes, and helicopters are scanned -- Wait 30 seconds for scan cycle -- Eliminate ALL enemy forces to capture -- Check DCS.log for detailed information - -### Checking Logs - -Open `Saved Games\DCS\Logs\DCS.log` and search for: -- `[CAPTURE Module]` - General logging -- `[INIT]` - Initialization messages -- `[TACTICAL]` - Tactical marker updates -- `[VICTORY]` - Victory condition checks - -## 🏗️ Mission Design Tips - -### Best Practices - -- **Zone Size**: Large enough for tactical areas, avoid overlaps -- **Zone Placement**: Position over airbases, FOBs, strategic terrain -- **Starting Balance**: Consider defensive vs. offensive scenarios -- **AI Behavior**: Use "Ground Hold" or "Ground On Road" waypoints -- **Player Briefing**: Document F10 menu commands in mission brief - -### Integration with Other Scripts - -Access zone data from other scripts: - -```lua --- Get current ownership status -local status = GetZoneOwnershipStatus() --- Returns: { blue = X, red = Y, neutral = Z, total = N, zones = {...} } - --- Manual status broadcast -BroadcastZoneStatus() - --- Refresh zone visuals -RefreshAllZoneColors() -``` - -### Victory Flags - -The script sets user flags on victory: -- `BLUE_VICTORY = 1` when BLUE wins -- `RED_VICTORY = 1` when RED wins - -Use these in triggers to end missions or transition to next phase. - -## 📋 Requirements - -### Essential Components - -- ✅ DCS World 2.9 or higher -- ✅ MOOSE Framework (latest version) -- ✅ Trigger zones in mission editor -- ✅ BLUEHQ and REDHQ groups - -### Mission Prerequisites - -- At least one trigger zone per capture point -- Exact zone name matching between editor and Lua config -- Both HQ groups must exist (can be hidden/inactive) - -## 📞 Support & Resources - -### Get Help - -- **Discord Community**: [https://discord.gg/7wBVWKK3](https://discord.gg/7wBVWKK3) -- **Author**: F99th-TracerFacer -- **GitHub Issues**: Report bugs or request features - -### Additional Resources - -- [MOOSE Documentation](https://flightcontrol-master.github.io/MOOSE_DOCS/) -- [MOOSE Discord](https://discord.gg/gj68fm969S) -- [DCS Forums](https://forum.dcs.world) - -## 📄 License - -This script is provided free for use in DCS World missions. Feel free to modify and distribute. - -## 🙏 Credits - -- **Author**: F99th-TracerFacer -- **Framework**: MOOSE by FlightControl -- **Community**: DCS World Mission Makers - -## 🎯 Version History - -### Version 2.0 (Current) -- ✨ Full dual coalition support (RED & BLUE) -- ✨ Tactical information markers with MGRS coordinates -- ✨ Auto-victory detection and countdown -- ✨ F10 radio menu commands -- ✨ Periodic status reports -- ✨ Enhanced visual feedback system -- ✨ Configurable zone ownership via Lua tables - -### Version 1.0 -- Initial release -- Basic zone capture mechanics -- Single coalition focus - ---- - -
- -**🎮 Happy Mission Making! 🚁** - -*Created with ❤️ for the DCS World Community* - -[Discord](https://discord.gg/7wBVWKK3) • [Documentation](Mission_Maker_Guide.html) • [Report Issue](#) - -
diff --git a/Moose_DynamicGroundBattle/Moose_DynamicGroundBattle.lua b/Moose_DynamicGroundBattle/Moose_DynamicGroundBattle.lua deleted file mode 100644 index 34469a8..0000000 --- a/Moose_DynamicGroundBattle/Moose_DynamicGroundBattle.lua +++ /dev/null @@ -1,940 +0,0 @@ ---[[ - Script: Moose_DynamicGroundBattle.lua - Written by: [F99th-TracerFacer] - Version: 1.0.3 - Date: 11 November 2024 - Updated: 12 November 2024 - Description: This script creates a dynamic ground battle between Red and Blue coalitions - along a series of zones which can be arranged in a line or any other configuration creating a dynamic ground battle. - - Capture Zone Behavior - - Zone Capture states: Captured, Guarded, Empty, Attacked, Neutral - - Zone Colors: Red, Blue, Green, Orange - Red: Captured by Red - Blue: Captured by Blue - Orange: Contested - Green: Empty - - Spawning And Patrol Behavior: - - Infantry and armor groups for both sides spawn at random locations in their own zones. - - Each group then calculates the shortest distance to the nearest enemy zone and moves to that zone to patrol. - - Every ASSIGN_TASKS_SCHED seconds, the script will check the ZONE_CAPTURE states of all zones and assign tasks to groups accordingly. - - Any group NOT moving, will recieve orders to patrol the nearest enemy zone. Any unit already moving will be left alone. - - Any troops dropped off through CTLD in these zones will begin to obey these orders as well. - - Spawn frequency calculated based on the number of alive warehouses. - - Infantry can be disabled from moving patrols if desired. - - In the event of DCS assigning a ridiculous path to an object, simply stop the object and it will be reassigned a new patrol path next round. - - Warehouse System & Spawn Frequencey Behavior: - 1. Warehouses: - - Each side (Red and Blue) has a set of warehouses defined in the `redWarehouses` and `blueWarehouses` tables. - - The number of warehouses can be adjusted by adding or removing entries from these tables and ensuring there is a matching object in the mission editor. - - 2. Spawn Frequency Calculation: - - The function `CalculateSpawnFrequency` calculates the spawn frequency based on the number of alive warehouses. - - The spawn frequency is a ratio of alive warehouses to total warehouses. - - If all warehouses are alive, the spawn frequency is (100%) of the base setting. - - If half of the warehouses are alive, the spawn frequency is (50%). - - If no warehouses are alive, the spawn frequency is (0%) (no more spawns). - - So for example, if you set your spawn frequency to 300 seconds, and only 50% of your warehouses are alive, the actual spawn frequency will be 600 seconds. - - This dynamic adjustment ensures that the reinforcement rate is directly impacted by the number of operational warehouses. - - 3. Mark points are automatically added to the map for each warehouse. - - Include the warehouse name and a list of nearby ground units within a specified radius. - - Uppdated every `UPDATE_MARK_POINTS_SCHED` seconds. - - The maximum distance to search for units near a warehouse is defined by the `MAX_WAREHOUSE_UNIT_LIST_DISTANCE` variable. - - The mark points are displayed to all players on the map as a form of "intel" on the battlefield. - - Can be disabled by setting `ENABLE_WAREHOUSE_MARKERS` to false. - - General Setup Requirements: - - The script relies on the MOOSE framework for DCS World. Ensure that the MOOSE framework is installed and running on the mission. - - Ensure that all groups and zones mentioned below are created in the mission editor. You can adjust the names of the groups and zones as needed or - add more groups and zones to the script. Ensure that the names in this script match the names in the mission editor. - - - Groups and Zones to be created in the editor (all LATE ACTIVATE): - - Red Infantry Groups: RedInfantry1, RedInfantry2, RedInfantry3, RedInfantry4, RedInfantry5, RedInfantry6 - - Red Armor Groups: RedArmor1, RedArmor2, RedArmor3, RedArmor4, RedArmor5, RedArmor6 - - Blue Infantry Groups: BlueInfantry1, BlueInfantry2, BlueInfantry3, BlueInfantry4, BlueInfantry5, BlueInfantry6 - - Blue Armor Groups: BlueArmor1, BlueArmor2, BlueArmor3, BlueArmor4, BlueArmor5 - - - Red Zones: FrontLine1, FrontLine2, FrontLine3, FrontLine4, FrontLine5, FrontLine6 - - Blue Zones: FrontLine7, FrontLine8, FrontLine9, FrontLine10, FrontLine11, FrontLine12 - - - Red Warehouses: RedWarehouse1-1, RedWarehouse2-1, RedWarehouse3-1, RedWarehouse4-1, RedWarehouse5-1, RedWarehouse6-1 - - Blue Warehouses: BlueWarehouse1-1, BlueWarehouse2-1, BlueWarehouse3-1, BlueWarehouse4-1, BlueWarehouse5-1, BlueWarehouse6-1 - - ** Note Warehouse names are based on the static "unit name" in the mission editor. ** - ---]] - ---[[ - --If you don't have command centers setup in another file, uncommnent this section below: - -- Create Command Centers and Missions for each side - -- Must have a blue unit named "BLUEHQ" and a red unit named "REDHQ" in the mission editor. - - --Build Command Center and Mission for Blue - US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) - US_Mission = MISSION:New( US_CC, "Insurgent Sandstorm", "Primary", "Clear the front lines of enemy activity.", coalition.side.BLUE) - US_Score = SCORING:New( "Insurgent Sandstorm - Blue" ) - US_Mission:AddScoring( US_Score ) - US_Mission:Start() - US_Score:SetMessagesHit(false) - US_Score:SetMessagesDestroy(false) - US_Score:SetMessagesScore(false) - - --Build Command Center and Mission Red - RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" ) - RU_Mission = MISSION:New (RU_CC, "Insurgent Sandstorm", "Primary", "Destroy U.S. and NATO forces.", coalition.side.RED) - RU_Score = SCORING:New("Insurgent Sandstorm - Red") - RU_Mission:AddScoring( RU_Score) - RU_Mission:Start() - RU_Score:SetMessagesHit(false) - RU_Score:SetMessagesDestroy(false) - RU_Score:SetMessagesScore(false) - -]] - --- Infantry Patrol Settings --- Due to some maps or locations where infantry moving is either not desired or has problems with the terrain you can disable infantry moving patrols. --- Set to false, infantry units will spawn, and never move from their spawn location. This could be considered a defensive position and probably a good idea. -local MOVING_INFANTRY_PATROLS = false -local ENABLE_WAREHOUSE_MARKERS = true -- Enable or disable the warehouse markers on the map. -local UPDATE_MARK_POINTS_SCHED = 60 -- Update the map markers for warehouses every 300 seconds. ENABLE_WAREHOUSE_MARKERS must be set to true for this to work. -local MAX_WAREHOUSE_UNIT_LIST_DISTANCE = 5000 -- Maximum distance to search for units near a warehouse to display on map markers. - --- Control Spawn frequency and limits of ground units. -local INIT_RED_INFANTRY = 5 -- Initial number of Red Infantry groups -local MAX_RED_INFANTRY = 100 -- Maximum number of Red Infantry groups -local SPAWN_SCHED_RED_INFANTRY = 1800 -- Spawn Red Infantry groups every 1800 seconds - -local INIT_RED_ARMOR = 25 -- Initial number of Red Armor groups -local MAX_RED_ARMOR = 200 -- Maximum number of Red Armor groups -local SPAWN_SCHED_RED_ARMOR = 300 -- Spawn Red Armor groups every 300 seconds - -local INIT_BLUE_INFANTRY = 5 -- Initial number of Blue Infantry groups -local MAX_BLUE_INFANTRY = 100 -- Maximum number of Blue Infantry groups -local SPAWN_SCHED_BLUE_INFANTRY = 1800 -- Spawn Blue Infantry groups every 1800 seconds - -local INIT_BLUE_ARMOR = 25 -- Initial number of Blue Armor groups0 -local MAX_BLUE_ARMOR = 200 -- Maximum number of Blue Armor groups -local SPAWN_SCHED_BLUE_ARMOR = 300 -- Spawn Blue Armor groups every 300 seconds - -local ASSIGN_TASKS_SCHED = 600 -- Assign tasks to groups every 600 seconds. New groups added will wait this long before moving. - - - - --- Define capture zones for each side with a visible radius. --- These zones will be used to create capture zones for each side. The capture zones will be used to determine the state of each zone (captured, guarded, empty, attacked, neutral). --- The zones will also be used to spawn ground units for each side. --- The zones should be created in the mission editor and named accordingly. --- You can add more zones as needed. The script will create capture zones for each zone and assign tasks to groups based on the zone states. --- Maybe the zones are along a front line, or they follow a road, or they are scattered around the map. You can arrange the zones in any configuration you like. - -local redZones = { - ZONE:New("FrontLine1"), - ZONE:New("FrontLine2"), - ZONE:New("FrontLine3"), - ZONE:New("FrontLine4"), - ZONE:New("FrontLine5"), - ZONE:New("FrontLine6") -} - -local blueZones = { - ZONE:New("FrontLine7"), - ZONE:New("FrontLine8"), - ZONE:New("FrontLine9"), - ZONE:New("FrontLine10"), - ZONE:New("FrontLine11"), - ZONE:New("FrontLine12") -} - --- Define warehouses for each side. These warehouses will be used to calculate the spawn frequency of ground units. --- The warehouses should be created in the mission editor and named accordingly. -local redWarehouses = { - STATIC:FindByName("RedWarehouse1-1"), -- Static units key of off unit name in mission editor rather than just the name field. weird. =\ (hours wasted! ha!) - STATIC:FindByName("RedWarehouse2-1"), - STATIC:FindByName("RedWarehouse3-1"), - STATIC:FindByName("RedWarehouse4-1"), - STATIC:FindByName("RedWarehouse5-1"), - STATIC:FindByName("RedWarehouse6-1") -} - -local blueWarehouses = { - STATIC:FindByName("BlueWarehouse1-1"), - STATIC:FindByName("BlueWarehouse2-1"), - STATIC:FindByName("BlueWarehouse3-1"), - STATIC:FindByName("BlueWarehouse4-1"), - STATIC:FindByName("BlueWarehouse5-1"), - STATIC:FindByName("BlueWarehouse6-1") -} - --- Define templates for infantry and armor groups. These templates will be used to randomize the groups spawned in the zones. --- The templates should be created in the mission editor and named accordingly. --- You can add more templates as needed. The script will randomly select a template for each group spawned. --- The more templates you make, the more variety you can add to the groups that are spawned. -local redInfantryTemplates = { - "RedInfantry1", - "RedInfantry2", - "RedInfantry3", - "RedInfantry4", - "RedInfantry5", - "RedInfantry6" -} - -local redArmorTemplates = { - "RedArmor1", - "RedArmor2", - "RedArmor3", - "RedArmor4", - "RedArmor5", - "RedArmor6", - "RedArmor7", - "RedArmor8", - "RedArmor9", - "RedArmor10" - -} - -local blueInfantryTemplates = { - "BlueInfantry1", - "BlueInfantry2", - "BlueInfantry3", - "BlueInfantry4", - "BlueInfantry5", - "BlueInfantry6" -} - -local blueArmorTemplates = { - "BlueArmor1", - "BlueArmor2", - "BlueArmor3", - "BlueArmor4", - "BlueArmor5" -} - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- DO NOT EDIT BELOW THIS LINE ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Track active markers to prevent memory leaks -local activeMarkers = {} - --- Function to add mark points on the map for each warehouse in the provided list -local function addMarkPoints(warehouses, coalition) - for _, warehouse in ipairs(warehouses) do - if warehouse then - local warehousePos = warehouse:GetVec3() - local details - if coalition == 2 then - if warehouse:GetCoalition() == 2 then - details = "Warehouse: " .. warehouse:GetName() .. "\nThis warehouse needs to be protected.\n" - else - details = "Warehouse: " .. warehouse:GetName() .. "\nThis is a primary target as it is directly supplying enemy units.\n" - end - elseif coalition == 1 then - if warehouse:GetCoalition() == 1 then - details = "Warehouse: " .. warehouse:GetName() .. "\nThis warehouse needs to be protected.\nNearby Units:\n" - else - details = "Warehouse: " .. warehouse:GetName() .. "\nThis is a primary target as it is directly supplying enemy units.\n" - end - end - - local coordinate = COORDINATE:NewFromVec3(warehousePos) - local marker = MARKER:New(coordinate, details):ToCoalition(coalition):ReadOnly() - table.insert(activeMarkers, marker) - else - env.info("addMarkPoints: Warehouse not found or is nil") - end - end -end - -local function updateMarkPoints() - -- Clean up old markers first - for _, marker in ipairs(activeMarkers) do - if marker then - marker:Remove() - end - end - activeMarkers = {} - - addMarkPoints(redWarehouses, 2) -- Blue coalition sees red warehouses as targets - addMarkPoints(blueWarehouses, 2) -- Blue coalition sees blue warehouses as needing protection - addMarkPoints(redWarehouses, 1) -- Red coalition sees red warehouses as needing protection - addMarkPoints(blueWarehouses, 1) -- Red coalition sees blue warehouses as targets -end - --- If enabled, update the mark points for the warehouses every UPDATE_MARK_POINTS_SCHED seconds. -if ENABLE_WAREHOUSE_MARKERS then - SCHEDULER:New(nil, updateMarkPoints, {}, 10, UPDATE_MARK_POINTS_SCHED) -end - --- Table to keep track of zones and their statuses -local zoneStatuses = {} - --- Reusable SET_GROUP to prevent memory leaks from repeated creation -local cachedAllGroups = nil -local function getAllGroups() - if not cachedAllGroups then - cachedAllGroups = SET_GROUP:New():FilterActive():FilterStart() - end - return cachedAllGroups -end - --- Function to create a capture zone -local function CreateCaptureZone(zone, coalition) - local captureZone = ZONE_CAPTURE_COALITION:New(zone, coalition) - if captureZone then - local coordinate = captureZone:GetCoordinate() - if coordinate then - env.info("Created capture zone at coordinates: " .. coordinate:ToStringLLDMS()) - captureZone:Start(5, 30) -- Check every 5 seconds, capture after 30 seconds - else - env.error("Failed to get coordinates for zone: " .. zone:GetName() .. " Did you add the group to the editor?") - end - else - env.error("Failed to create capture zone for zone: " .. zone:GetName() .. " Did you add the group to the editor?") - end - return captureZone -end - --- Custom OnEnterCaptured method ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZONE_CAPTURE_COALITION:OnEnterCaptured(From, Event, To) - if From ~= To then - local Coalition = self:GetCoalition() - self:E({ Coalition = Coalition }) - local zoneName = self:GetZoneName() - zoneStatuses[zoneName] = { zone = self, coalition = Coalition } - if Coalition == coalition.side.BLUE then - self:Smoke(SMOKECOLOR.Blue) - self:UndrawZone() - self:DrawZone(-1, {0, 0, 1}, 2) -- Draw the zone on the map for 30 seconds, blue color, and thickness 2 - US_CC:MessageTypeToCoalition(string.format("%s has been captured by the USA", self:GetZoneName()), MESSAGE.Type.Information) - RU_CC:MessageTypeToCoalition(string.format("%s has been captured by the USA", self:GetZoneName()), MESSAGE.Type.Information) - else - self:Smoke(SMOKECOLOR.Red) - self:UndrawZone() - self:DrawZone(-1, {1, 0, 0}, 2) -- Draw the zone on the map for 30 seconds, red color, and thickness 2 - RU_CC:MessageTypeToCoalition(string.format("%s has been captured by Russia", self:GetZoneName()), MESSAGE.Type.Information) - US_CC:MessageTypeToCoalition(string.format("%s has been captured by Russia", self:GetZoneName()), MESSAGE.Type.Information) - end - end -end - --- Custom OnEnterGuarded method ---- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -function ZONE_CAPTURE_COALITION:OnEnterGuarded(From, Event, To) - if From ~= To then - local Coalition = self:GetCoalition() - self:E({ Coalition = Coalition }) - local zoneName = self:GetZoneName() - zoneStatuses[zoneName] = { zone = self, coalition = Coalition } - if Coalition == coalition.side.BLUE then - self:Smoke(SMOKECOLOR.Blue) - -- Draw zone DARK BLUE for guarded - self:UndrawZone() - self:DrawZone(-1, {0, 0, 0.5}, 2) -- Draw the zone on the map for 30 seconds, dark blue color, and thickness 2 - US_CC:MessageTypeToCoalition(string.format("%s is under protection of the USA", self:GetZoneName()), MESSAGE.Type.Information) - RU_CC:MessageTypeToCoalition(string.format("%s is under protection of the USA", self:GetZoneName()), MESSAGE.Type.Information) - else - self:Smoke(SMOKECOLOR.Red) - -- Draw zone DARK RED for guarded - self:UndrawZone() - self:DrawZone(-1, {0.5, 0, 0}, 2) -- Draw the zone on the map for 30 seconds, dark red color, and thickness 2 - RU_CC:MessageTypeToCoalition(string.format("%s is under protection of Russia", self:GetZoneName()), MESSAGE.Type.Information) - US_CC:MessageTypeToCoalition(string.format("%s is under protection of Russia", self:GetZoneName()), MESSAGE.Type.Information) - end - end -end - --- Custom OnEnterEmpty method ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZONE_CAPTURE_COALITION:OnEnterEmpty(From, Event, To) - if From ~= To then - self:E({ Coalition = "None" }) - local zoneName = self:GetZoneName() - zoneStatuses[zoneName] = { zone = self, coalition = "None" } - self:Smoke(SMOKECOLOR.Green) - self:UndrawZone() - self:DrawZone(-1, {0, 1, 0}, 2) -- Draw the zone on the map for 30 seconds, green color, and thickness 2 - US_CC:MessageTypeToCoalition(string.format("%s is now empty", self:GetZoneName()), MESSAGE.Type.Information) - RU_CC:MessageTypeToCoalition(string.format("%s is now empty", self:GetZoneName()), MESSAGE.Type.Information) - end -end - --- Custom OnEnterAttacked method ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZONE_CAPTURE_COALITION:OnEnterAttacked(From, Event, To) - if From ~= To then - local Coalition = self:GetCoalition() - self:E({ Coalition = Coalition }) - local zoneName = self:GetZoneName() - zoneStatuses[zoneName] = { zone = self, coalition = Coalition } - if Coalition == coalition.side.BLUE then - self:Smoke(SMOKECOLOR.Blue) - -- Draw the zone orange for contested - self:UndrawZone() - self:DrawZone(-1, {1, 0.5, 0}, 2) -- Draw the zone on the map for 30 seconds, orange color, and thickness 2 - US_CC:MessageTypeToCoalition(string.format("%s is under attack by Russia", self:GetZoneName()), MESSAGE.Type.Information) - RU_CC:MessageTypeToCoalition(string.format("%s is attacking the USA", self:GetZoneName()), MESSAGE.Type.Information) - else - self:Smoke(SMOKECOLOR.Red) - self:UndrawZone() - self:DrawZone(-1, {1, 0.5, 0}, 2) -- Draw the zone on the map for 30 seconds, orange color, and thickness 2 - RU_CC:MessageTypeToCoalition(string.format("%s is under attack by the USA", self:GetZoneName()), MESSAGE.Type.Information) - US_CC:MessageTypeToCoalition(string.format("%s is attacking Russia", self:GetZoneName()), MESSAGE.Type.Information) - end - end -end - --- Custom OnEnterNeutral method ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZONE_CAPTURE_COALITION:OnEnterNeutral(From, Event, To) - if From ~= To then - self:E({ Coalition = "Neutral" }) - local zoneName = self:GetZoneName() - zoneStatuses[zoneName] = { zone = self, coalition = "Neutral" } - self:Smoke(SMOKECOLOR.Green) - self:UndrawZone() - self:DrawZone(-1, {0, 1, 0}, 2) -- Draw the zone on the map for 30 seconds, green color, and thickness 2 - US_CC:MessageTypeToCoalition(string.format("%s is now neutral", self:GetZoneName()), MESSAGE.Type.Information) - RU_CC:MessageTypeToCoalition(string.format("%s is now neutral", self:GetZoneName()), MESSAGE.Type.Information) - end -end - --- Create capture zones for Red and Blue -local redCaptureZones = {} -local blueCaptureZones = {} - --- Iterate over all red zones to create capture zones -for _, zone in ipairs(redZones) do - -- Attempt to create a capture zone for the current red zone - local captureZone = CreateCaptureZone(zone, coalition.side.RED) - if captureZone then - -- If successful, add the capture zone to the redCaptureZones table - table.insert(redCaptureZones, captureZone) - -- Log the creation of the capture zone - env.info("Created Red capture zone: " .. zone:GetName()) - -- Draw the zone on the map with infinite duration, red color, and thickness 2 - zone:DrawZone(30, {1, 0, 0}, 2) - -- Initialize the zone status - zoneStatuses[zone:GetName()] = { zone = captureZone, coalition = coalition.side.RED } - else - -- If creation fails, log an error message - env.error("Failed to create Red capture zone: " .. zone:GetName()) - end -end - --- Iterate over all blue zones to create capture zones -for _, zone in ipairs(blueZones) do - -- Attempt to create a capture zone for the current blue zone - local captureZone = CreateCaptureZone(zone, coalition.side.BLUE) - if captureZone then - -- If successful, add the capture zone to the blueCaptureZones table - table.insert(blueCaptureZones, captureZone) - -- Log the creation of the capture zone - env.info("Created Blue capture zone: " .. zone:GetName()) - -- Draw the zone on the map with infinite duration, blue color, and thickness 2 - zone:DrawZone(30, {0, 0, 1}, 2) - -- Initialize the zone status - zoneStatuses[zone:GetName()] = { zone = captureZone, coalition = coalition.side.BLUE } - else - -- If creation fails, log an error message - env.error("Failed to create Blue capture zone: " .. zone:GetName()) - end -end - --- Function to handle zone capture -local function OnZoneCaptured(event) - local zone = event.zone - local coalition = event.coalition - - if zone and coalition then - env.info("OnZoneCaptured: Zone " .. zone:GetName() .. " captured by coalition " .. coalition) - - -- Update the zone state - if coalition == coalition.side.RED then - zoneStates[zone:GetName()] = "RED" - zone:SetCoalition(coalition.side.RED) - elseif coalition == coalition.side.BLUE then - zoneStates[zone:GetName()] = "BLUE" - zone:SetCoalition(coalition.side.BLUE) - else - zoneStates[zone:GetName()] = "NEUTRAL" - zone:SetCoalition(coalition.side.NEUTRAL) - end - else - env.error("OnZoneCaptured: Invalid zone or coalition") - end -end - --- Function to handle zone guarded events -local function OnZoneGuarded(event) - local zone = event.Zone - local coalition = event.Coalition - - if coalition == coalition.side.RED then - env.info("Red is guarding zone: " .. zone:GetName()) - elseif coalition == coalition.side.BLUE then - env.info("Blue is guarding zone: " .. zone:GetName()) - end -end - --- Function to handle zone empty events -local function OnZoneEmpty(event) - local zone = event.Zone - env.info("Zone is empty: " .. zone:GetName()) -end - --- Function to handle zone attacked events -local function OnZoneAttacked(event) - local zone = event.Zone - local attackingGroups = zone:GetGroups() - local makeup = {} - - for _, group in ipairs(attackingGroups) do - local groupName = group:GetName() - local unitTypes = {} - - for _, unit in ipairs(group:GetUnits()) do - local unitType = unit:GetTypeName() - unitTypes[unitType] = (unitTypes[unitType] or 0) + 1 - end - - table.insert(makeup, {groupName = groupName, unitTypes = unitTypes}) - end - - local makeupMessage = "" - for _, groupInfo in ipairs(makeup) do - makeupMessage = makeupMessage .. "Group: " .. groupInfo.groupName .. "\n" - for unitType, count in pairs(groupInfo.unitTypes) do - makeupMessage = makeupMessage .. " " .. unitType .. ": " .. count .. "\n" - end - end - - local messageText = "Zone is being attacked: " .. zone:GetName() .. "\n" .. makeupMessage - env.info(messageText) - - -- Announce to the player - MESSAGE:New(messageText, 15):ToAll() -end - --- Function to handle zone neutral events -local function OnZoneNeutral(event) - local zone = event.Zone - env.info("Zone is neutral: " .. zone:GetName()) -end - --- Function to check the ZONE_CAPTURE states of all zones -local function CheckZoneStates() - env.info("Checking zone states...") - - local zoneStates = {} - - local function processZones(zones, zoneType) - env.info("Processing " .. zoneType) - env.info("Number of zones: " .. #zones) - - local allGroups = getAllGroups() - - for _, zone in ipairs(zones) do - if zone then - env.info("processZones: Zone object is valid") - -- Check if the zone is of the correct type - if zone.ClassName == "ZONE_CAPTURE_COALITION" then - env.info("processZones: Zone is of type ZONE_CAPTURE_COALITION") - local coalition = zone:GetCoalition() - env.info("processZones: Zone coalition: " .. tostring(coalition)) - if coalition == 1 then - zoneStates[zone:GetZoneName()] = "RED" - env.info("processZones: Zone: " .. (zone:GetZoneName() or "nil") .. " State: RED") - elseif coalition == 2 then - zoneStates[zone:GetZoneName()] = "BLUE" - env.info("processZones: Zone: " .. (zone:GetZoneName() or "nil") .. " State: BLUE") - else - zoneStates[zone:GetZoneName()] = "NEUTRAL" - env.info("processZones: Zone: " .. (zone:GetZoneName() or "nil") .. " State: NEUTRAL") - end - - local groupsInZone = {} - allGroups:ForEachGroup(function(group) - if group then - env.info("processZones: Checking group: " .. group:GetName()) - if group.IsCompletelyInZone then - if group:IsCompletelyInZone(zone) then - table.insert(groupsInZone, group) - end - else - env.error("processZones: IsCompletelyInZone method not found in group: " .. group:GetName()) - -- Log available methods on the group object - for k, v in pairs(group) do - env.info("processZones: Group method: " .. tostring(k) .. " = " .. tostring(v)) - end - end - else - env.error("processZones: Invalid group") - end - end) - - env.info("processZones: Number of groups in zone: " .. #groupsInZone) - else - env.error("processZones: Zone is not of type ZONE_CAPTURE_COALITION") - -- Log available methods on the zone object - for k, v in pairs(zone) do - env.info("processZones: Zone method: " .. tostring(k) .. " = " .. tostring(v)) - end - end - if not zone.GetZoneName then - env.error("processZones: Missing GetZoneName method in " .. zoneType) - end - else - env.error("processZones: Invalid zone in " .. zoneType) - end - end - - end - - processZones(redCaptureZones, "redZones") - processZones(blueCaptureZones, "blueZones") - - -- Log the zoneStates table - for zoneName, state in pairs(zoneStates) do - env.info("CheckZoneStates: Zone: " .. zoneName .. " State: " .. state) - end - - return zoneStates -end - --- Function to assign tasks to groups -local function AssignTasks(group, zoneStates) - if not group or not group.GetCoalition or not group.GetCoordinate or not group.GetVelocity then - env.info("AssignTasks: Invalid group or missing methods") - return - end - - local velocity = group:GetVelocityVec3() - local speed = math.sqrt(velocity.x^2 + velocity.y^2 + velocity.z^2) - if speed > 0 then - env.info("AssignTasks: Group " .. group:GetName() .. " is already moving. No new orders sent.") - return - end - - env.info("Assigning tasks to group: " .. group:GetName()) - local groupCoalition = group:GetCoalition() - local groupCoordinate = group:GetCoordinate() - local closestZone = nil - local closestDistance = math.huge - - env.info("Group Coalition: " .. tostring(groupCoalition)) - env.info("Group Coordinate: " .. groupCoordinate:ToStringLLDMS()) - - for zoneName, state in pairs(zoneStates) do - env.info("Checking Zone: " .. zoneName .. " with state: " .. tostring(state)) - - -- Convert state to a number for comparison - local stateCoalition = (state == "RED" and 1) or (state == "BLUE" and 2) or nil - - if stateCoalition and stateCoalition ~= groupCoalition then - local zone = ZONE:FindByName(zoneName) - if zone then - local zoneCoordinate = zone:GetCoordinate() - local distance = groupCoordinate:Get2DDistance(zoneCoordinate) - --env.info("Zone Coordinate: " .. zoneCoordinate:ToStringLLDMS()) - --env.info("Distance to zone " .. zoneName .. ": " .. distance) - if distance < closestDistance then - closestDistance = distance - closestZone = zone - env.info("New closest zone: " .. zoneName .. " with distance: " .. distance) - end - else - env.info("AssignTasks: Zone not found - " .. zoneName) - end - else - env.info("Zone " .. zoneName .. " is already controlled by coalition: " .. tostring(state)) - end - end - - if closestZone then - env.info(group:GetName() .. " is moving to and patrolling zone " .. closestZone:GetName()) - --MESSAGE:New(group:GetName() .. " is moving to and patrolling zone " .. closestZone:GetName(), 10):ToAll() - - -- Create a patrol task using the GROUP:PatrolZones method - local patrolZones = {closestZone} - local speed = 20 -- Example speed, adjust as needed - local formation = "Cone" -- Example formation, adjust as needed - local delayMin = 30 -- Example minimum delay, adjust as needed - local delayMax = 60 -- Example maximum delay, adjust as needed - - group:PatrolZones(patrolZones, speed, formation, delayMin, delayMax) - else - env.info("AssignTasks: No suitable zone found for group " .. group:GetName()) - end -end - - --- Function to check if a group contains infantry units -local function IsInfantryGroup(group) - env.info("IsInfantryGroup: Checking group: " .. group:GetName()) - for _, unit in ipairs(group:GetUnits()) do - local unitTypeName = unit:GetTypeName() - env.info("IsInfantryGroup: Checking unit: " .. unit:GetName() .. " with type: " .. unitTypeName) - if unitTypeName:find("Infantry") or unitTypeName:find("Soldier") or unitTypeName:find("Paratrooper") then - env.info("IsInfantryGroup: Found infantry unit in group: " .. group:GetName()) - return true - end - end - return false -end - --- Function to assign tasks to groups -local function AssignTasksToGroups() - env.info("AssignTasksToGroups: Starting task assignments") - local zoneStates = CheckZoneStates() - local allGroups = getAllGroups() - - local function processZone(zone, zoneColor) - if zone then - env.info("AssignTasksToGroups: Processing " .. zoneColor .. " zone: " .. zone:GetName()) - local groupsInZone = {} - allGroups:ForEachGroup(function(group) - if group then - if group.IsCompletelyInZone then - if group:IsCompletelyInZone(zone) then - table.insert(groupsInZone, group) - end - else - env.error("AssignTasksToGroups: IsCompletelyInZone method not found in group: " .. group:GetName()) - for k, v in pairs(group) do - env.info("AssignTasksToGroups: Group method: " .. tostring(k) .. " = " .. tostring(v)) - end - end - else - env.error("AssignTasksToGroups: Invalid group") - end - end) - env.info("AssignTasksToGroups: Found " .. #groupsInZone .. " groups in " .. zoneColor .. " zone: " .. zone:GetName()) - for _, group in ipairs(groupsInZone) do - if IsInfantryGroup(group) == true then - if MOVING_INFANTRY_PATROLS == true then - env.info("AssignTasksToGroups: Assigning tasks to infantry group: " .. group:GetName()) - AssignTasks(group, zoneStates) - else - env.info("AssignTasksToGroups: Skipping infantry group: " .. group:GetName()) - end - else - env.info("AssignTasksToGroups: Assigning tasks to group: " .. group:GetName()) - AssignTasks(group, zoneStates) - end - end - else - env.info("AssignTasksToGroups: Invalid " .. zoneColor .. " zone") - end - end - - for _, zone in ipairs(redZones) do - processZone(zone, "red") - end - - for _, zone in ipairs(blueZones) do - processZone(zone, "blue") - end - - env.info("AssignTasksToGroups: Task assignments completed. Running again in " .. ASSIGN_TASKS_SCHED .. " seconds.") -end - - --- Function to calculate spawn frequency in seconds -local function CalculateSpawnFrequency(warehouses, baseFrequency) - local totalWarehouses = #warehouses - local aliveWarehouses = 0 - - for _, warehouse in ipairs(warehouses) do - local life = warehouse:GetLife() - if life and life > 0 then - aliveWarehouses = aliveWarehouses + 1 - end - end - - if totalWarehouses == 0 or aliveWarehouses == 0 then - return math.huge -- Stop spawning if there are no warehouses or no alive warehouses - end - - local frequency = baseFrequency * (totalWarehouses / aliveWarehouses) - - return frequency -end - -local function CalculateSpawnFrequencyPercentage(warehouses) - local totalWarehouses = #warehouses - local aliveWarehouses = 0 - - for _, warehouse in ipairs(warehouses) do - local life = warehouse:GetLife() - if life and life > 0 then - aliveWarehouses = aliveWarehouses + 1 - end - end - - if totalWarehouses == 0 then - return 0 -- Avoid division by zero - end - - local percentage = (aliveWarehouses / totalWarehouses) * 100 - return math.floor(percentage) -end - --- Add event handlers for zone capture -for _, captureZone in ipairs(redCaptureZones) do - captureZone:OnEnterCaptured(OnZoneCaptured) - captureZone:OnEnterGuarded(captureZone.OnEnterGuarded) - captureZone:OnEnterEmpty(OnZoneEmpty) - captureZone:OnEnterAttacked(OnZoneAttacked) - captureZone:OnEnterNeutral(OnZoneNeutral) -end - -for _, captureZone in ipairs(blueCaptureZones) do - captureZone:OnEnterCaptured(OnZoneCaptured) - captureZone:OnEnterGuarded(captureZone.OnEnterGuarded) - captureZone:OnEnterEmpty(OnZoneEmpty) - captureZone:OnEnterAttacked(OnZoneAttacked) - captureZone:OnEnterNeutral(OnZoneNeutral) -end - --- Calculate spawn frequencies -local redInfantrySpawnFrequency = CalculateSpawnFrequency(redWarehouses, SPAWN_SCHED_RED_INFANTRY) -local redArmorSpawnFrequency = CalculateSpawnFrequency(redWarehouses, SPAWN_SCHED_RED_ARMOR) -local blueInfantrySpawnFrequency = CalculateSpawnFrequency(blueWarehouses, SPAWN_SCHED_BLUE_INFANTRY) -local blueArmorSpawnFrequency = CalculateSpawnFrequency(blueWarehouses, SPAWN_SCHED_BLUE_ARMOR) - --- Calculate spawn frequency percentages -local redSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(redWarehouses, coalition.side.RED) -local blueSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(blueWarehouses, coalition.side.BLUE) - --- Display spawn frequency percentages to the user -MESSAGE:New("Red side spawn frequency: " .. redSpawnFrequencyPercentage .. "%", 30):ToRed() -MESSAGE:New("Blue side spawn frequency: " .. blueSpawnFrequencyPercentage .. "%", 30):ToBlue() - --- Schedule ground spawns using the calculated frequencies -redInfantrySpawn = SPAWN:New("RedInfantryGroup") - :InitRandomizeTemplate(redInfantryTemplates) - :InitRandomizeZones(redZones) - :InitLimit(INIT_RED_INFANTRY, MAX_RED_INFANTRY) - :SpawnScheduled(redInfantrySpawnFrequency, 0.5) - -redArmorSpawn = SPAWN:New("RedArmorGroup") - :InitRandomizeTemplate(redArmorTemplates) - :InitRandomizeZones(redZones) - :InitLimit(INIT_RED_ARMOR, MAX_RED_ARMOR) - :SpawnScheduled(redArmorSpawnFrequency, 0.5) - -blueInfantrySpawn = SPAWN:New("BlueInfantryGroup") - :InitRandomizeTemplate(blueInfantryTemplates) - :InitRandomizeZones(blueZones) - :InitLimit(INIT_BLUE_INFANTRY, MAX_BLUE_INFANTRY) - :SpawnScheduled(blueInfantrySpawnFrequency, 0.5) - -blueArmorSpawn = SPAWN:New("BlueArmorGroup") - :InitRandomizeTemplate(blueArmorTemplates) - :InitRandomizeZones(blueZones) - :InitLimit(INIT_BLUE_ARMOR, MAX_BLUE_ARMOR) - :SpawnScheduled(blueArmorSpawnFrequency, 0.5) - -env.info("Dynamic Ground Battle & Zone capture initialized.") - - --- Function to monitor and announce warehouse status -local function MonitorWarehouses() - local blueWarehousesAlive = 0 - local redWarehousesAlive = 0 - - for _, warehouse in ipairs(blueWarehouses) do - if warehouse:IsAlive() then - blueWarehousesAlive = blueWarehousesAlive + 1 - end - end - - for _, warehouse in ipairs(redWarehouses) do - if warehouse:IsAlive() then - redWarehousesAlive = redWarehousesAlive + 1 - end - end - - -- Debug messages to check values - env.info("MonitorWarehouses: blueWarehousesAlive = " .. blueWarehousesAlive) - env.info("MonitorWarehouses: redWarehousesAlive = " .. redWarehousesAlive) - - -- Calculate spawn frequencies - local redInfantrySpawnFrequency = CalculateSpawnFrequency(redWarehouses, SPAWN_SCHED_RED_INFANTRY) - local redArmorSpawnFrequency = CalculateSpawnFrequency(redWarehouses, SPAWN_SCHED_RED_ARMOR) - local blueInfantrySpawnFrequency = CalculateSpawnFrequency(blueWarehouses, SPAWN_SCHED_BLUE_INFANTRY) - local blueArmorSpawnFrequency = CalculateSpawnFrequency(blueWarehouses, SPAWN_SCHED_BLUE_ARMOR) - - -- Calculate spawn frequency percentages - local redSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(redWarehouses) - local blueSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(blueWarehouses) - - -- Log the values - env.info("MonitorWarehouses: redInfantrySpawnFrequency = " .. redInfantrySpawnFrequency) - env.info("MonitorWarehouses: redArmorSpawnFrequency = " .. redArmorSpawnFrequency) - env.info("MonitorWarehouses: blueInfantrySpawnFrequency = " .. blueInfantrySpawnFrequency) - env.info("MonitorWarehouses: blueArmorSpawnFrequency = " .. blueArmorSpawnFrequency) - env.info("MonitorWarehouses: redSpawnFrequencyPercentage = " .. redSpawnFrequencyPercentage) - env.info("MonitorWarehouses: blueSpawnFrequencyPercentage = " .. blueSpawnFrequencyPercentage) - - local msg = "[Warehouse status:]\n" - msg = msg .. "Red warehouses alive: " .. redWarehousesAlive .. " Reinforcements Capacity: " .. redSpawnFrequencyPercentage .. "%" .. "\n" - msg = msg .. "Blue warehouses alive: " .. blueWarehousesAlive .. " Reinforcements Capacity: " .. blueSpawnFrequencyPercentage .. "%" .. "\n" - MESSAGE:New(msg, 30):ToAll() - - -end - --- Function to check the wincondition. If either side owns all zones, mission ends. -local winConditionScheduler = nil -local function checkWinCondition() - local blueOwned = true - local redOwned = true - - for zoneName, owner in pairs(zoneStatuses) do - if owner ~= 1 then - redOwned = false - end - if owner ~= 2 then - blueOwned = false - end - end - - if blueOwned then - MESSAGE:New("Blue side wins! They own all the capture zones.", 60):ToAll() - SOUND:New("UsaTheme.ogg"):ToAll() - if winConditionScheduler then - winConditionScheduler:Stop() - end - return true - elseif redOwned then - MESSAGE:New("Red side wins! They own all the capture zones.", 60):ToAll() - SOUND:New("MotherRussia.ogg"):ToAll() - if winConditionScheduler then - winConditionScheduler:Stop() - end - return true - end - - return false - end - - -- Start monitoring the win condition with SCHEDULER instead of recursive TIMER - winConditionScheduler = SCHEDULER:New(nil, checkWinCondition, {}, 60, 60) - --- Scheduler to monitor warehouses every 120 seconds -SCHEDULER:New(nil, MonitorWarehouses, {}, 0, 120) - --- Scheduler to assign tasks to groups periodically -SCHEDULER:New(nil, AssignTasksToGroups, {}, 0, ASSIGN_TASKS_SCHED) -- Check every 600 seconds (10 minutes) - Adjust as needed - --- Create a mission menu -local missionMenu = MENU_MISSION:New("Warehouse Monitoring") - --- Add a menu item to run the MonitorWarehouses function -MENU_MISSION_COMMAND:New("Check Warehouse Status", missionMenu, MonitorWarehouses) diff --git a/Moose_DynamicGroundBattle/Moose_DynamicGroundBattle_Plugin.lua b/Moose_DynamicGroundBattle/Moose_DynamicGroundBattle_Plugin.lua deleted file mode 100644 index 85ca4a7..0000000 --- a/Moose_DynamicGroundBattle/Moose_DynamicGroundBattle_Plugin.lua +++ /dev/null @@ -1,1041 +0,0 @@ ---[[ - Script: Moose_DynamicGroundBattle_Plugin.lua - Written by: [F99th-TracerFacer] - Version: 1.0.0 - Date: 15 November 2024 - Description: Warehouse-driven ground unit spawning system that works as a plugin with Moose_DualCoalitionZoneCapture.lua - - This script handles: - - Warehouse-based reinforcement system - - Dynamic spawn frequency based on warehouse survival - - Automated AI tasking to patrol nearest enemy zones - - Zone garrison system (defenders stay in captured zones) - - Optional infantry patrol control - - Warehouse status intel markers - - CTLD troop integration - - What this script DOES NOT do: - - Zone capture logic (handled by Moose_DualCoalitionZoneCapture.lua) - - Win conditions (handled by Moose_DualCoalitionZoneCapture.lua) - - Zone coloring/messaging (handled by Moose_DualCoalitionZoneCapture.lua) - - Load Order (in Mission Editor Triggers): - 1. DO SCRIPT FILE Moose_.lua - 2. DO SCRIPT FILE Moose_DualCoalitionZoneCapture.lua - 3. DO SCRIPT FILE Moose_DynamicGroundBattle_Plugin.lua <-- This file - 4. DO SCRIPT FILE CTLD.lua (optional) - 5. DO SCRIPT FILE CSAR.lua (optional) - - Requirements: - - MOOSE framework must be loaded first - - Moose_DualCoalitionZoneCapture.lua must be loaded BEFORE this script - - Zone configuration comes from DualCoalitionZoneCapture's ZONE_CONFIG - - Groups and warehouses must exist in mission editor (see below) - - Warehouse System & Spawn Frequency Behavior: - 1. Each side has warehouses defined in `redWarehouses` and `blueWarehouses` tables - 2. Spawn frequency dynamically adjusts based on alive warehouses: - - 100% alive = 100% spawn rate (base frequency) - - 50% alive = 50% spawn rate (2x delay) - - 0% alive = no spawns (critical attrition) - 3. Map markers show warehouse locations and nearby units - 4. Updated every UPDATE_MARK_POINTS_SCHED seconds - - AI Task Assignment: - - Groups spawn in friendly zones - - Each zone maintains a minimum garrison (defenders) that patrol only their zone - - Non-defender groups patrol toward nearest enemy zone - - Election system assigns defenders automatically based on zone needs - - Defenders are never reassigned and stay permanently in their zone - - Reassignment occurs every ASSIGN_TASKS_SCHED seconds for non-defenders only - - Only stationary units get new orders (moving units are left alone) - - CTLD-dropped troops automatically integrate - - Groups to Create in Mission Editor (all LATE ACTIVATE): - RED SIDE: - - Infantry Templates: RedInfantry1, RedInfantry2, RedInfantry3, RedInfantry4, RedInfantry5, RedInfantry6 - - Armor Templates: RedArmor1, RedArmor2, RedArmor3, RedArmor4, RedArmor5, RedArmor6 - - Spawn Groups: Names defined by RED_INFANTRY_SPAWN_GROUP and RED_ARMOR_SPAWN_GROUP variables (default: RedInfantryGroup, RedArmorGroup) - - Warehouses (Static Objects): RedWarehouse1-1, RedWarehouse2-1, RedWarehouse3-1, etc. - - BLUE SIDE: - - Infantry Templates: BlueInfantry1, BlueInfantry2, BlueInfantry3, BlueInfantry4, BlueInfantry5, BlueInfantry6 - - Armor Templates: BlueArmor1, BlueArmor2, BlueArmor3, BlueArmor4, BlueArmor5 - - Spawn Groups: Names defined by BLUE_INFANTRY_SPAWN_GROUP and BLUE_ARMOR_SPAWN_GROUP variables (default: BlueInfantryGroup, BlueArmorGroup) - - Warehouses (Static Objects): BlueWarehouse1-1, BlueWarehouse2-1, BlueWarehouse3-1, etc. - - NOTE: Warehouse names use the static "Unit Name" in mission editor, not the "Name" field! - NOTE: Spawn groups should be simple groups set to LATE ACTIVATE. You can customize their names in the USER CONFIGURATION section. - - Integration with DualCoalitionZoneCapture: - - This script reads zoneCaptureObjects and zoneNames from DualCoalitionZoneCapture - - Spawns occur in zones controlled by the appropriate coalition - - AI tasks units to patrol zones from DualCoalitionZoneCapture's ZONE_CONFIG ---]] - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- USER CONFIGURATION SECTION ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Zone Garrison (Defender) Settings -local DEFENDERS_PER_ZONE = 2 -- Minimum number of groups that will garrison each friendly zone (recommended: 2) -local ALLOW_DEFENDER_ROTATION = true -- If true, fresh units can replace existing defenders when zone is over-garrisoned - --- Infantry Patrol Settings -local MOVING_INFANTRY_PATROLS = true -- Set to false to disable infantry movement (they spawn and hold position) - --- Warehouse Marker Settings -local ENABLE_WAREHOUSE_MARKERS = true -- Enable/disable warehouse map markers (disabled by default if you have other marker systems) -local UPDATE_MARK_POINTS_SCHED = 300 -- Update warehouse markers every 300 seconds (5 minutes) -local MAX_WAREHOUSE_UNIT_LIST_DISTANCE = 5000 -- Max distance to search for units near warehouses for markers - --- Warehouse Status Message Settings -local ENABLE_WAREHOUSE_STATUS_MESSAGES = true -- Enable/disable periodic warehouse status announcements -local WAREHOUSE_STATUS_MESSAGE_FREQUENCY = 1800 -- How often to announce warehouse status (seconds, default: 1800 = 30 minutes) - --- Spawn Frequency and Limits --- Red Side Settings -local INIT_RED_INFANTRY = 25 -- Initial number of Red Infantry groups -local MAX_RED_INFANTRY = 100 -- Maximum number of Red Infantry groups -local SPAWN_SCHED_RED_INFANTRY = 1200 -- Base spawn frequency for Red Infantry (seconds) - -local INIT_RED_ARMOR = 25 -- Initial number of Red Armor groups -local MAX_RED_ARMOR = 500 -- Maximum number of Red Armor groups -local SPAWN_SCHED_RED_ARMOR = 200 -- Base spawn frequency for Red Armor (seconds) - --- Blue Side Settings -local INIT_BLUE_INFANTRY = 25 -- Initial number of Blue Infantry groups -local MAX_BLUE_INFANTRY = 100 -- Maximum number of Blue Infantry groups -local SPAWN_SCHED_BLUE_INFANTRY = 1200 -- Base spawn frequency for Blue Infantry (seconds) - -local INIT_BLUE_ARMOR = 25 -- Initial number of Blue Armor groups -local MAX_BLUE_ARMOR = 500 -- Maximum number of Blue Armor groups -local SPAWN_SCHED_BLUE_ARMOR = 200 -- Base spawn frequency for Blue Armor (seconds) - -local ASSIGN_TASKS_SCHED = 600 -- How often to reassign tasks to idle groups (seconds) - --- Per-side cadence scalars (tune to make one side faster/slower without touching base frequencies) -local RED_INFANTRY_CADENCE_SCALAR = 1.0 -local RED_ARMOR_CADENCE_SCALAR = 1.0 -local BLUE_INFANTRY_CADENCE_SCALAR = 1.0 -local BLUE_ARMOR_CADENCE_SCALAR = 1.0 - --- When a side loses every warehouse we pause spawning and re-check after this delay -local NO_WAREHOUSE_RECHECK_DELAY = 180 - --- Define warehouses for each side -local redWarehouses = { - STATIC:FindByName("RedWarehouse1-1"), - STATIC:FindByName("RedWarehouse2-1"), - STATIC:FindByName("RedWarehouse3-1"), - STATIC:FindByName("RedWarehouse4-1"), - STATIC:FindByName("RedWarehouse5-1"), - STATIC:FindByName("RedWarehouse6-1") -} - -local blueWarehouses = { - STATIC:FindByName("BlueWarehouse1-1"), - STATIC:FindByName("BlueWarehouse2-1"), - STATIC:FindByName("BlueWarehouse3-1"), - STATIC:FindByName("BlueWarehouse4-1"), - STATIC:FindByName("BlueWarehouse5-1"), - STATIC:FindByName("BlueWarehouse6-1") -} - --- Define unit templates (these groups must exist in mission editor as LATE ACTIVATE) -local redInfantryTemplates = { - "RedInfantry1", - "RedInfantry2", - "RedInfantry3", - "RedInfantry4", - "RedInfantry5", - "RedInfantry6" -} - -local redArmorTemplates = { - "RedArmor1", - "RedArmor2", - "RedArmor3", - "RedArmor4", - "RedArmor5", - "RedArmor6" -} - -local blueInfantryTemplates = { - "BlueInfantry1", - "BlueInfantry2", - "BlueInfantry3", - "BlueInfantry4", - "BlueInfantry5", - "BlueInfantry6" -} - -local blueArmorTemplates = { - "BlueArmor1", - "BlueArmor2", - "BlueArmor3", - "BlueArmor4", - "BlueArmor5" -} - --- Spawn Group Names (these are the base groups SPAWN:New() uses for spawning) -local RED_INFANTRY_SPAWN_GROUP = "RedInfantryGroup" -local RED_ARMOR_SPAWN_GROUP = "RedArmorGroup" -local BLUE_INFANTRY_SPAWN_GROUP = "BlueInfantryGroup" -local BLUE_ARMOR_SPAWN_GROUP = "BlueArmorGroup" - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- DO NOT EDIT BELOW THIS LINE ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -env.info("[DGB PLUGIN] Dynamic Ground Battle Plugin initializing...") - --- Validate that DualCoalitionZoneCapture is loaded -if not zoneCaptureObjects or not zoneNames then - env.error("[DGB PLUGIN] ERROR: Moose_DualCoalitionZoneCapture.lua must be loaded BEFORE this plugin!") - env.error("[DGB PLUGIN] Make sure zoneCaptureObjects and zoneNames are available.") - return -end - --- Validate warehouses exist -local function ValidateWarehouses(warehouses, label) - local foundCount = 0 - local missingCount = 0 - - for i, wh in ipairs(warehouses) do - if wh then - foundCount = foundCount + 1 - env.info(string.format("[DGB PLUGIN] %s warehouse %d: %s (OK)", label, i, wh:GetName())) - else - missingCount = missingCount + 1 - env.warning(string.format("[DGB PLUGIN] %s warehouse at index %d NOT FOUND in mission editor!", label, i)) - end - end - - env.info(string.format("[DGB PLUGIN] %s warehouses: %d found, %d missing", label, foundCount, missingCount)) - return foundCount > 0 -end - --- Validate unit templates exist -local function ValidateTemplates(templates, label) - local foundCount = 0 - local missingCount = 0 - - for i, templateName in ipairs(templates) do - local group = GROUP:FindByName(templateName) - if group then - foundCount = foundCount + 1 - env.info(string.format("[DGB PLUGIN] %s template %d: %s (OK)", label, i, templateName)) - else - missingCount = missingCount + 1 - env.warning(string.format("[DGB PLUGIN] %s template '%s' NOT FOUND in mission editor!", label, templateName)) - end - end - - env.info(string.format("[DGB PLUGIN] %s templates: %d found, %d missing", label, foundCount, missingCount)) - return foundCount > 0 -end - -env.info("[DGB PLUGIN] Validating configuration...") - --- Validate all warehouses -local redWarehousesValid = ValidateWarehouses(redWarehouses, "Red") -local blueWarehousesValid = ValidateWarehouses(blueWarehouses, "Blue") - -if not redWarehousesValid then - env.warning("[DGB PLUGIN] WARNING: No valid Red warehouses found! Red spawning will be disabled.") -end - -if not blueWarehousesValid then - env.warning("[DGB PLUGIN] WARNING: No valid Blue warehouses found! Blue spawning will be disabled.") -end - --- Validate all templates -local redInfantryValid = ValidateTemplates(redInfantryTemplates, "Red Infantry") -local redArmorValid = ValidateTemplates(redArmorTemplates, "Red Armor") -local blueInfantryValid = ValidateTemplates(blueInfantryTemplates, "Blue Infantry") -local blueArmorValid = ValidateTemplates(blueArmorTemplates, "Blue Armor") - -if not redInfantryValid then - env.warning("[DGB PLUGIN] WARNING: No valid Red Infantry templates found! Red Infantry spawning will fail.") -end - -if not redArmorValid then - env.warning("[DGB PLUGIN] WARNING: No valid Red Armor templates found! Red Armor spawning will fail.") -end - -if not blueInfantryValid then - env.warning("[DGB PLUGIN] WARNING: No valid Blue Infantry templates found! Blue Infantry spawning will fail.") -end - -if not blueArmorValid then - env.warning("[DGB PLUGIN] WARNING: No valid Blue Armor templates found! Blue Armor spawning will fail.") -end - -env.info("[DGB PLUGIN] Found " .. #zoneCaptureObjects .. " zones from DualCoalitionZoneCapture") - --- Track active markers to prevent memory leaks -local activeMarkers = {} - --- Zone Garrison Tracking System --- Structure: zoneGarrisons[zoneName] = { defenders = {groupName1, groupName2, ...}, lastUpdate = timestamp } -local zoneGarrisons = {} - --- Group garrison assignments --- Structure: groupGarrisonAssignments[groupName] = zoneName (or nil if not a defender) -local groupGarrisonAssignments = {} - --- Reusable SET_GROUP to prevent repeated creation within a single function call -local function getAllGroups() - -- This must be called every time to get a fresh list of all groups, including newly spawned ones. - -- The :FilterActive() ensures we only work with groups that are currently alive. - return SET_GROUP:New():FilterActive() -end - --- Function to get zones controlled by a specific coalition -local function GetZonesByCoalition(targetCoalition) - local zones = {} - - for idx, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture and zoneCapture:GetCoalition() == targetCoalition then - local zone = zoneCapture:GetZone() - if zone then - table.insert(zones, zone) - end - end - end - - env.info(string.format("[DGB PLUGIN] Found %d zones for coalition %d", #zones, targetCoalition)) - return zones -end - --- Helper to count warehouse availability -local function GetWarehouseStats(warehouses) - local alive = 0 - local total = 0 - - for _, warehouse in ipairs(warehouses) do - if warehouse then - total = total + 1 - local life = warehouse:GetLife() - if life and life > 0 then - alive = alive + 1 - end - end - end - - return alive, total -end - --- Function to calculate spawn frequency based on warehouse survival -local function CalculateSpawnFrequency(warehouses, baseFrequency, cadenceScalar) - local aliveWarehouses, totalWarehouses = GetWarehouseStats(warehouses) - cadenceScalar = cadenceScalar or 1 - - if totalWarehouses == 0 then - return baseFrequency * cadenceScalar - end - - if aliveWarehouses == 0 then - return nil -- Pause spawning until logistics return - end - - local frequency = baseFrequency * cadenceScalar * (totalWarehouses / aliveWarehouses) - return frequency -end - --- Function to calculate spawn frequency as a percentage -local function CalculateSpawnFrequencyPercentage(warehouses) - local aliveWarehouses, totalWarehouses = GetWarehouseStats(warehouses) - - if totalWarehouses == 0 then - return 0 - end - - local percentage = (aliveWarehouses / totalWarehouses) * 100 - return math.floor(percentage) -end - --- Function to add warehouse markers on the map -local function addMarkPoints(warehouses, coalition) - for _, warehouse in ipairs(warehouses) do - if warehouse then - local warehousePos = warehouse:GetVec3() - local details - - if coalition == 2 then -- Blue viewing - if warehouse:GetCoalition() == 2 then - details = "Warehouse: " .. warehouse:GetName() .. "\nThis warehouse needs to be protected.\n" - else - details = "Warehouse: " .. warehouse:GetName() .. "\nThis is a primary target as it is directly supplying enemy units.\n" - end - elseif coalition == 1 then -- Red viewing - if warehouse:GetCoalition() == 1 then - details = "Warehouse: " .. warehouse:GetName() .. "\nThis warehouse needs to be protected.\n" - else - details = "Warehouse: " .. warehouse:GetName() .. "\nThis is a primary target as it is directly supplying enemy units.\n" - end - end - - local coordinate = COORDINATE:NewFromVec3(warehousePos) - local marker = MARKER:New(coordinate, details):ToCoalition(coalition):ReadOnly() - table.insert(activeMarkers, marker) - end - end -end - --- Function to update warehouse markers -local function updateMarkPoints() - -- Clean up old markers first - for _, marker in ipairs(activeMarkers) do - if marker then - marker:Remove() - end - end - activeMarkers = {} - - addMarkPoints(redWarehouses, 2) -- Blue coalition sees red warehouses - addMarkPoints(blueWarehouses, 2) -- Blue coalition sees blue warehouses - addMarkPoints(redWarehouses, 1) -- Red coalition sees red warehouses - addMarkPoints(blueWarehouses, 1) -- Red coalition sees blue warehouses - - env.info("[DGB PLUGIN] Updated warehouse markers") -end - --- Function to check if a group contains infantry units -local function IsInfantryGroup(group) - for _, unit in ipairs(group:GetUnits()) do - local unitTypeName = unit:GetTypeName() - if unitTypeName:find("Infantry") or unitTypeName:find("Soldier") or unitTypeName:find("Paratrooper") then - return true - end - end - return false -end - --- Function to check if a group is assigned as a zone defender -local function IsDefender(group) - if not group then return false end - local groupName = group:GetName() - return groupGarrisonAssignments[groupName] ~= nil -end - --- Function to get garrison info for a zone -local function GetZoneGarrison(zoneName) - if not zoneGarrisons[zoneName] then - zoneGarrisons[zoneName] = { - defenders = {}, - lastUpdate = timer.getTime() - } - end - return zoneGarrisons[zoneName] -end - --- Function to count alive defenders in a zone -local function CountAliveDefenders(zoneName) - local garrison = GetZoneGarrison(zoneName) - local aliveCount = 0 - local deadDefenders = {} - - for _, groupName in ipairs(garrison.defenders) do - local group = GROUP:FindByName(groupName) - if group and group:IsAlive() then - aliveCount = aliveCount + 1 - else - -- Mark for cleanup - table.insert(deadDefenders, groupName) - end - end - - -- Clean up dead defenders - for _, deadGroupName in ipairs(deadDefenders) do - for i, groupName in ipairs(garrison.defenders) do - if groupName == deadGroupName then - table.remove(garrison.defenders, i) - groupGarrisonAssignments[deadGroupName] = nil - env.info(string.format("[DGB PLUGIN] Removed destroyed defender %s from zone %s", deadGroupName, zoneName)) - break - end - end - end - - return aliveCount -end - --- Function to elect a group as a zone defender -local function ElectDefender(group, zone, reason) - if not group or not zone then return false end - - local groupName = group:GetName() - local zoneName = zone:GetName() - - -- Check if already a defender - if IsDefender(group) then - return false - end - - local garrison = GetZoneGarrison(zoneName) - - -- Add to garrison - table.insert(garrison.defenders, groupName) - groupGarrisonAssignments[groupName] = zoneName - garrison.lastUpdate = timer.getTime() - - -- Assign patrol task for the zone - group:PatrolZones({zone}, 20, "Cone", 30, 60) - - env.info(string.format("[DGB PLUGIN] Elected %s as defender of zone %s (%s)", groupName, zoneName, reason)) - return true -end - --- Function to check if a zone needs more defenders -local function ZoneNeedsDefenders(zoneName) - local aliveDefenders = CountAliveDefenders(zoneName) - return aliveDefenders < DEFENDERS_PER_ZONE -end - --- Function to handle defender rotation (replace old defender with fresh unit) -local function TryDefenderRotation(group, zone) - if not ALLOW_DEFENDER_ROTATION then return false end - - local zoneName = zone:GetName() - local garrison = GetZoneGarrison(zoneName) - - -- Count idle groups in zone (including current group) - local idleGroups = {} - local allGroups = getAllGroups() - - allGroups:ForEachGroup(function(g) - if g and g:IsAlive() and g:GetCoalition() == group:GetCoalition() then - if g:IsCompletelyInZone(zone) then - local velocity = g:GetVelocityVec3() - local speed = math.sqrt(velocity.x^2 + velocity.y^2 + velocity.z^2) - if speed <= 0.5 then - table.insert(idleGroups, g) - end - end - end - end) - - -- Only rotate if we have more than DEFENDERS_PER_ZONE idle units - if #idleGroups > DEFENDERS_PER_ZONE then - -- Find oldest defender to replace - local oldestDefender = nil - local oldestDefenderGroup = nil - - for _, defenderName in ipairs(garrison.defenders) do - local defenderGroup = GROUP:FindByName(defenderName) - if defenderGroup and defenderGroup:IsAlive() then - if not oldestDefender then - oldestDefender = defenderName - oldestDefenderGroup = defenderGroup - end - break -- Just take the first one for rotation - end - end - - if oldestDefender and oldestDefenderGroup:GetName() ~= group:GetName() then - -- Remove old defender - for i, defenderName in ipairs(garrison.defenders) do - if defenderName == oldestDefender then - table.remove(garrison.defenders, i) - groupGarrisonAssignments[oldestDefender] = nil - env.info(string.format("[DGB PLUGIN] Rotated out defender %s from zone %s", oldestDefender, zoneName)) - break - end - end - - -- Elect new defender - ElectDefender(group, zone, "rotation") - - -- Old defender becomes mobile force - return true - end - end - - return false -end - -local function AssignTasks(group, currentZoneCapture) - -- This function is no longer needed as its logic has been integrated into AssignTasksToGroups -end - --- Function to assign tasks to all groups -local function AssignTasksToGroups() - env.info("[DGB PLUGIN] Starting task assignment cycle...") - local allGroups = getAllGroups() - local tasksAssigned = 0 - local defendersActive = 0 - local mobileAssigned = 0 - - -- Create a quick lookup table for zone objects by name - local zoneLookup = {} - for _, zc in ipairs(zoneCaptureObjects) do - local zone = zc:GetZone() - if zone then - zoneLookup[zone:GetName()] = { zone = zone, capture = zc } - end - end - - allGroups:ForEachGroup(function(group) - if not group or not group:IsAlive() then return end - - local groupName = group:GetName() - local groupCoalition = group:GetCoalition() - - -- 1. HANDLE DEFENDERS - if IsDefender(group) then - defendersActive = defendersActive + 1 - local assignedZoneName = groupGarrisonAssignments[groupName] - local zoneInfo = zoneLookup[assignedZoneName] - if zoneInfo then - -- Ensure defender patrols its assigned zone - group:PatrolZones({ zoneInfo.zone }, 20, "Cone", 30, 60) - tasksAssigned = tasksAssigned + 1 - end - return -- Defenders do not get any other tasks - end - - -- 2. HANDLE MOBILE FORCES (NON-DEFENDERS) - - -- Skip infantry if movement is disabled - if IsInfantryGroup(group) and not MOVING_INFANTRY_PATROLS then - return - end - - -- Don't reassign if already moving - local velocity = group:GetVelocityVec3() - local speed = math.sqrt(velocity.x^2 + velocity.y^2 + velocity.z^2) - if speed > 0.5 then - return - end - - -- Find which zone the group is in - local currentZone = nil - local currentZoneCapture = nil - for _, zc in ipairs(zoneCaptureObjects) do - local zone = zc:GetZone() - if zone and group:IsCompletelyInZone(zone) then - currentZone = zone - currentZoneCapture = zc - break - end - end - - -- Only assign tasks to groups inside a friendly zone - if not currentZone or currentZoneCapture:GetCoalition() ~= groupCoalition then - return - end - - local zoneName = currentZone:GetName() - - -- 3. DEFENDER ELECTION & ROTATION - -- Try to elect as defender if zone needs one - if ZoneNeedsDefenders(zoneName) then - if ElectDefender(group, currentZone, "zone under-garrisoned") then - tasksAssigned = tasksAssigned + 1 - return -- Now a defender, task is set - end - elseif TryDefenderRotation(group, currentZone) then - tasksAssigned = tasksAssigned + 1 - return -- Rotated in as a defender, task is set - end - - -- 4. DEFEND CONTESTED ZONE - -- If the zone is under attack, all non-defenders should help defend it - local zoneState = currentZoneCapture.GetCurrentState and currentZoneCapture:GetCurrentState() or nil - if zoneState == "Attacked" then - env.info(string.format("[DGB PLUGIN] %s defending contested zone %s", groupName, zoneName)) - group:PatrolZones({ currentZone }, 20, "Cone", 30, 60) - tasksAssigned = tasksAssigned + 1 - mobileAssigned = mobileAssigned + 1 - return - end - - -- 5. PATROL TO NEAREST ENEMY ZONE - local closestEnemyZone = nil - local closestDistance = math.huge - local groupCoordinate = group:GetCoordinate() - - for _, zc in ipairs(zoneCaptureObjects) do - local zoneCoalition = zc:GetCoalition() - if zoneCoalition ~= groupCoalition and zoneCoalition ~= coalition.side.NEUTRAL then - local zone = zc:GetZone() - if zone then - local distance = groupCoordinate:Get2DDistance(zone:GetCoordinate()) - if distance < closestDistance then - closestDistance = distance - closestEnemyZone = zone - end - end - end - end - - if closestEnemyZone then - env.info(string.format("[DGB PLUGIN] %s patrolling towards enemy zone %s", groupName, closestEnemyZone:GetName())) - group:PatrolZones({ closestEnemyZone }, 20, "Cone", 30, 60) - tasksAssigned = tasksAssigned + 1 - mobileAssigned = mobileAssigned + 1 - end - end) - - env.info(string.format("[DGB PLUGIN] Task assignment complete. %d groups tasked (%d defenders, %d mobile).", tasksAssigned, defendersActive, mobileAssigned)) -end - --- Function to monitor and announce warehouse status -local function MonitorWarehouses() - local blueWarehousesAlive, blueWarehouseTotal = GetWarehouseStats(blueWarehouses) - local redWarehousesAlive, redWarehouseTotal = GetWarehouseStats(redWarehouses) - - local redSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(redWarehouses) - local blueSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(blueWarehouses) - - if ENABLE_WAREHOUSE_STATUS_MESSAGES then - local msg = "[Warehouse Status]\n" - msg = msg .. "Red warehouses alive: " .. redWarehousesAlive .. " Reinforcements: " .. redSpawnFrequencyPercentage .. "%\n" - msg = msg .. "Blue warehouses alive: " .. blueWarehousesAlive .. " Reinforcements: " .. blueSpawnFrequencyPercentage .. "%\n" - MESSAGE:New(msg, 30):ToAll() - end - - env.info(string.format("[DGB PLUGIN] Warehouse status - Red: %d/%d (%d%%), Blue: %d/%d (%d%%)", - redWarehousesAlive, redWarehouseTotal, redSpawnFrequencyPercentage, - blueWarehousesAlive, blueWarehouseTotal, blueSpawnFrequencyPercentage)) -end - --- Function to count active units by coalition and type -local function CountActiveUnits(targetCoalition) - local infantry = 0 - local armor = 0 - local total = 0 - local defenders = 0 - local mobile = 0 - - local allGroups = getAllGroups() - - allGroups:ForEachGroup(function(group) - if group and group:IsAlive() and group:GetCoalition() == targetCoalition then - total = total + 1 - - if IsDefender(group) then - defenders = defenders + 1 - else - mobile = mobile + 1 - end - - if IsInfantryGroup(group) then - infantry = infantry + 1 - else - armor = armor + 1 - end - end - end) - - return { - total = total, - infantry = infantry, - armor = armor, - defenders = defenders, - mobile = mobile - } -end - --- Function to get garrison status across all zones -local function GetGarrisonStatus(targetCoalition) - local garrisonedZones = 0 - local underGarrisonedZones = 0 - local totalFriendlyZones = 0 - - for idx, zoneCapture in ipairs(zoneCaptureObjects) do - if zoneCapture:GetCoalition() == targetCoalition then - totalFriendlyZones = totalFriendlyZones + 1 - local zone = zoneCapture:GetZone() - if zone then - local zoneName = zone:GetName() - local defenderCount = CountAliveDefenders(zoneName) - - if defenderCount >= DEFENDERS_PER_ZONE then - garrisonedZones = garrisonedZones + 1 - else - underGarrisonedZones = underGarrisonedZones + 1 - end - end - end - end - - return { - totalZones = totalFriendlyZones, - garrisoned = garrisonedZones, - underGarrisoned = underGarrisonedZones - } -end - --- Function to display comprehensive system statistics -local function ShowSystemStatistics(playerCoalition) - -- Get warehouse stats - local redWarehousesAlive, redWarehouseTotal = GetWarehouseStats(redWarehouses) - local blueWarehousesAlive, blueWarehouseTotal = GetWarehouseStats(blueWarehouses) - - -- Get unit counts - local redUnits = CountActiveUnits(coalition.side.RED) - local blueUnits = CountActiveUnits(coalition.side.BLUE) - - -- Get garrison info - local redGarrison = GetGarrisonStatus(coalition.side.RED) - local blueGarrison = GetGarrisonStatus(coalition.side.BLUE) - - -- Get spawn frequencies - local redSpawnFreqPct = CalculateSpawnFrequencyPercentage(redWarehouses) - local blueSpawnFreqPct = CalculateSpawnFrequencyPercentage(blueWarehouses) - - -- Calculate actual spawn intervals - local redInfantryInterval = CalculateSpawnFrequency(redWarehouses, SPAWN_SCHED_RED_INFANTRY, RED_INFANTRY_CADENCE_SCALAR) - local redArmorInterval = CalculateSpawnFrequency(redWarehouses, SPAWN_SCHED_RED_ARMOR, RED_ARMOR_CADENCE_SCALAR) - local blueInfantryInterval = CalculateSpawnFrequency(blueWarehouses, SPAWN_SCHED_BLUE_INFANTRY, BLUE_INFANTRY_CADENCE_SCALAR) - local blueArmorInterval = CalculateSpawnFrequency(blueWarehouses, SPAWN_SCHED_BLUE_ARMOR, BLUE_ARMOR_CADENCE_SCALAR) - - -- Build comprehensive report - local msg = "═══════════════════════════════════════\n" - msg = msg .. "DYNAMIC GROUND BATTLE - SYSTEM STATUS\n" - msg = msg .. "═══════════════════════════════════════\n\n" - - -- Configuration Section - msg = msg .. "【CONFIGURATION】\n" - msg = msg .. " Defenders per Zone: " .. DEFENDERS_PER_ZONE .. "\n" - msg = msg .. " Defender Rotation: " .. (ALLOW_DEFENDER_ROTATION and "ENABLED" or "DISABLED") .. "\n" - msg = msg .. " Infantry Movement: " .. (MOVING_INFANTRY_PATROLS and "ENABLED" or "DISABLED") .. "\n" - msg = msg .. " Task Reassignment: Every " .. ASSIGN_TASKS_SCHED .. "s\n" - msg = msg .. " Warehouse Markers: " .. (ENABLE_WAREHOUSE_MARKERS and "ENABLED" or "DISABLED") .. "\n\n" - - -- Spawn Limits Section - msg = msg .. "【SPAWN LIMITS】\n" - msg = msg .. " Red Infantry: " .. INIT_RED_INFANTRY .. "/" .. MAX_RED_INFANTRY .. "\n" - msg = msg .. " Red Armor: " .. INIT_RED_ARMOR .. "/" .. MAX_RED_ARMOR .. "\n" - msg = msg .. " Blue Infantry: " .. INIT_BLUE_INFANTRY .. "/" .. MAX_BLUE_INFANTRY .. "\n" - msg = msg .. " Blue Armor: " .. INIT_BLUE_ARMOR .. "/" .. MAX_BLUE_ARMOR .. "\n\n" - - -- Red Coalition Section - msg = msg .. "【RED COALITION】\n" - msg = msg .. " Warehouses: " .. redWarehousesAlive .. "/" .. redWarehouseTotal .. " (" .. redSpawnFreqPct .. "%)\n" - msg = msg .. " Active Units: " .. redUnits.total .. " (" .. redUnits.infantry .. " inf, " .. redUnits.armor .. " armor)\n" - msg = msg .. " Defenders: " .. redUnits.defenders .. " | Mobile: " .. redUnits.mobile .. "\n" - msg = msg .. " Controlled Zones: " .. redGarrison.totalZones .. "\n" - msg = msg .. " - Garrisoned: " .. redGarrison.garrisoned .. "\n" - msg = msg .. " - Under-Garrisoned: " .. redGarrison.underGarrisoned .. "\n" - - if redInfantryInterval then - msg = msg .. " Infantry Spawn: " .. math.floor(redInfantryInterval) .. "s\n" - else - msg = msg .. " Infantry Spawn: PAUSED (no warehouses)\n" - end - - if redArmorInterval then - msg = msg .. " Armor Spawn: " .. math.floor(redArmorInterval) .. "s\n\n" - else - msg = msg .. " Armor Spawn: PAUSED (no warehouses)\n\n" - end - - -- Blue Coalition Section - msg = msg .. "【BLUE COALITION】\n" - msg = msg .. " Warehouses: " .. blueWarehousesAlive .. "/" .. blueWarehouseTotal .. " (" .. blueSpawnFreqPct .. "%)\n" - msg = msg .. " Active Units: " .. blueUnits.total .. " (" .. blueUnits.infantry .. " inf, " .. blueUnits.armor .. " armor)\n" - msg = msg .. " Defenders: " .. blueUnits.defenders .. " | Mobile: " .. blueUnits.mobile .. "\n" - msg = msg .. " Controlled Zones: " .. blueGarrison.totalZones .. "\n" - msg = msg .. " - Garrisoned: " .. blueGarrison.garrisoned .. "\n" - msg = msg .. " - Under-Garrisoned: " .. blueGarrison.underGarrisoned .. "\n" - - if blueInfantryInterval then - msg = msg .. " Infantry Spawn: " .. math.floor(blueInfantryInterval) .. "s\n" - else - msg = msg .. " Infantry Spawn: PAUSED (no warehouses)\n" - end - - if blueArmorInterval then - msg = msg .. " Armor Spawn: " .. math.floor(blueArmorInterval) .. "s\n\n" - else - msg = msg .. " Armor Spawn: PAUSED (no warehouses)\n\n" - end - - -- System Info - msg = msg .. "【SYSTEM INFO】\n" - msg = msg .. " Total Zones: " .. #zoneCaptureObjects .. "\n" - msg = msg .. " Active Garrisons: " .. (redGarrison.garrisoned + blueGarrison.garrisoned) .. "\n" - msg = msg .. " Total Active Units: " .. (redUnits.total + blueUnits.total) .. "\n\n" - - msg = msg .. "═══════════════════════════════════════" - - MESSAGE:New(msg, 45):ToCoalition(playerCoalition) - - env.info("[DGB PLUGIN] System statistics displayed to coalition " .. playerCoalition) -end - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --- INITIALIZATION ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Get initial zone lists for each coalition -local redZones = GetZonesByCoalition(coalition.side.RED) -local blueZones = GetZonesByCoalition(coalition.side.BLUE) - --- Calculate and display initial spawn frequency percentages -local redSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(redWarehouses) -local blueSpawnFrequencyPercentage = CalculateSpawnFrequencyPercentage(blueWarehouses) - -MESSAGE:New("Red reinforcement capacity: " .. redSpawnFrequencyPercentage .. "%", 30):ToRed() -MESSAGE:New("Blue reinforcement capacity: " .. blueSpawnFrequencyPercentage .. "%", 30):ToBlue() - --- Initialize spawners -env.info("[DGB PLUGIN] Initializing spawn systems...") - --- Note: Spawn zones will be dynamically updated based on zone capture states --- We'll use a function to get current friendly zones on each spawn -local function GetRedZones() - return GetZonesByCoalition(coalition.side.RED) -end - -local function GetBlueZones() - return GetZonesByCoalition(coalition.side.BLUE) -end - --- Validate spawn groups exist before creating spawners -local spawnGroups = { - {name = RED_INFANTRY_SPAWN_GROUP, label = "Red Infantry Spawn Group"}, - {name = RED_ARMOR_SPAWN_GROUP, label = "Red Armor Spawn Group"}, - {name = BLUE_INFANTRY_SPAWN_GROUP, label = "Blue Infantry Spawn Group"}, - {name = BLUE_ARMOR_SPAWN_GROUP, label = "Blue Armor Spawn Group"} -} - -for _, spawnGroup in ipairs(spawnGroups) do - local group = GROUP:FindByName(spawnGroup.name) - if group then - env.info(string.format("[DGB PLUGIN] %s '%s' found (OK)", spawnGroup.label, spawnGroup.name)) - else - env.error(string.format("[DGB PLUGIN] ERROR: %s '%s' NOT FOUND! Create this group in mission editor as LATE ACTIVATE.", spawnGroup.label, spawnGroup.name)) - end -end - --- Red Infantry Spawner -redInfantrySpawn = SPAWN:New(RED_INFANTRY_SPAWN_GROUP) - :InitRandomizeTemplate(redInfantryTemplates) - :InitLimit(INIT_RED_INFANTRY, MAX_RED_INFANTRY) - --- Red Armor Spawner -redArmorSpawn = SPAWN:New(RED_ARMOR_SPAWN_GROUP) - :InitRandomizeTemplate(redArmorTemplates) - :InitLimit(INIT_RED_ARMOR, MAX_RED_ARMOR) - --- Blue Infantry Spawner -blueInfantrySpawn = SPAWN:New(BLUE_INFANTRY_SPAWN_GROUP) - :InitRandomizeTemplate(blueInfantryTemplates) - :InitLimit(INIT_BLUE_INFANTRY, MAX_BLUE_INFANTRY) - --- Blue Armor Spawner -blueArmorSpawn = SPAWN:New(BLUE_ARMOR_SPAWN_GROUP) - :InitRandomizeTemplate(blueArmorTemplates) - :InitLimit(INIT_BLUE_ARMOR, MAX_BLUE_ARMOR) - --- Helper to schedule spawns per category. This is a self-rescheduling function. -local function ScheduleSpawner(spawnObject, getZonesFn, warehouses, baseFrequency, label, cadenceScalar) - local function spawnAndReschedule() - -- Calculate the next spawn interval first - local spawnInterval = CalculateSpawnFrequency(warehouses, baseFrequency, cadenceScalar) - - if not spawnInterval then - -- No warehouses. Pause spawning and check again after the delay. - env.info(string.format("[DGB PLUGIN] %s spawn paused (no warehouses). Rechecking in %ds.", label, NO_WAREHOUSE_RECHECK_DELAY)) - SCHEDULER:New(nil, spawnAndReschedule, {}, NO_WAREHOUSE_RECHECK_DELAY) - return - end - - -- Get friendly zones - local friendlyZones = getZonesFn() - if #friendlyZones > 0 then - local chosenZone = friendlyZones[math.random(#friendlyZones)] - local spawnedGroup = spawnObject:SpawnInZone(chosenZone, false) - - -- Post-spawn logic: if the group was created, check if it should become a defender - if spawnedGroup then - -- Use a short delay to ensure the group object is fully initialized before we work with it - SCHEDULER:New(nil, function() - local grp = GROUP:FindByName(spawnedGroup:GetName()) - if grp and grp:IsAlive() then - local zoneName = chosenZone:GetName() - -- If the zone needs defenders, this new unit is the perfect candidate - if ZoneNeedsDefenders(zoneName) then - ElectDefender(grp, chosenZone, "spawned in under-garrisoned zone") - end - end - end, {}, 2) -- 2-second delay - end - else - env.info(string.format("[DGB PLUGIN] %s spawn skipped (no friendly zones).", label)) - end - - -- Schedule the next run - SCHEDULER:New(nil, spawnAndReschedule, {}, spawnInterval) - env.info(string.format("[DGB PLUGIN] Next %s spawn scheduled in %d seconds.", label, math.floor(spawnInterval))) - end - - -- Kick off the first spawn with a random delay to stagger the different spawners - local initialDelay = math.random(5, 15) - SCHEDULER:New(nil, spawnAndReschedule, {}, initialDelay) - env.info(string.format("[DGB PLUGIN] %s spawner initialized. First check in %d seconds.", label, initialDelay)) -end - --- Schedule spawns (each spawner now runs at its own configured cadence) -if redInfantryValid and redWarehousesValid then - ScheduleSpawner(redInfantrySpawn, GetRedZones, redWarehouses, SPAWN_SCHED_RED_INFANTRY, "Red Infantry", RED_INFANTRY_CADENCE_SCALAR) -end -if redArmorValid and redWarehousesValid then - ScheduleSpawner(redArmorSpawn, GetRedZones, redWarehouses, SPAWN_SCHED_RED_ARMOR, "Red Armor", RED_ARMOR_CADENCE_SCALAR) -end -if blueInfantryValid and blueWarehousesValid then - ScheduleSpawner(blueInfantrySpawn, GetBlueZones, blueWarehouses, SPAWN_SCHED_BLUE_INFANTRY, "Blue Infantry", BLUE_INFANTRY_CADENCE_SCALAR) -end -if blueArmorValid and blueWarehousesValid then - ScheduleSpawner(blueArmorSpawn, GetBlueZones, blueWarehouses, SPAWN_SCHED_BLUE_ARMOR, "Blue Armor", BLUE_ARMOR_CADENCE_SCALAR) -end - --- Schedule warehouse marker updates -if ENABLE_WAREHOUSE_MARKERS then - SCHEDULER:New(nil, updateMarkPoints, {}, 10, UPDATE_MARK_POINTS_SCHED) -end - --- Schedule warehouse monitoring -if ENABLE_WAREHOUSE_STATUS_MESSAGES then - SCHEDULER:New(nil, MonitorWarehouses, {}, 30, WAREHOUSE_STATUS_MESSAGE_FREQUENCY) -end - --- Schedule task assignments -SCHEDULER:New(nil, AssignTasksToGroups, {}, 120, ASSIGN_TASKS_SCHED) - --- Add F10 menu for manual checks (using MenuManager if available) -if MenuManager then - -- Create coalition-specific menus under Mission Options - local blueMenu = MenuManager.CreateCoalitionMenu(coalition.side.BLUE, "Ground Battle") - MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Check Warehouse Status", blueMenu, MonitorWarehouses) - MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show System Statistics", blueMenu, function() - ShowSystemStatistics(coalition.side.BLUE) - end) - - local redMenu = MenuManager.CreateCoalitionMenu(coalition.side.RED, "Ground Battle") - MENU_COALITION_COMMAND:New(coalition.side.RED, "Check Warehouse Status", redMenu, MonitorWarehouses) - MENU_COALITION_COMMAND:New(coalition.side.RED, "Show System Statistics", redMenu, function() - ShowSystemStatistics(coalition.side.RED) - end) -else - -- Fallback to root-level mission menu - local missionMenu = MENU_MISSION:New("Ground Battle") - MENU_MISSION_COMMAND:New("Check Warehouse Status", missionMenu, MonitorWarehouses) - MENU_MISSION_COMMAND:New("Show Blue Statistics", missionMenu, function() - ShowSystemStatistics(coalition.side.BLUE) - end) - MENU_MISSION_COMMAND:New("Show Red Statistics", missionMenu, function() - ShowSystemStatistics(coalition.side.RED) - end) -end - -env.info("[DGB PLUGIN] Dynamic Ground Battle Plugin initialized successfully!") -env.info(string.format("[DGB PLUGIN] Zone garrison system: %d defenders per zone", DEFENDERS_PER_ZONE)) -env.info(string.format("[DGB PLUGIN] Defender rotation: %s", ALLOW_DEFENDER_ROTATION and "ENABLED" or "DISABLED")) -env.info(string.format("[DGB PLUGIN] Infantry movement: %s", MOVING_INFANTRY_PATROLS and "ENABLED" or "DISABLED")) -env.info(string.format("[DGB PLUGIN] Warehouse markers: %s", ENABLE_WAREHOUSE_MARKERS and "ENABLED" or "DISABLED")) diff --git a/Moose_DynamicGroundBattle/PLUGIN_README.md b/Moose_DynamicGroundBattle/PLUGIN_README.md deleted file mode 100644 index 9aef53e..0000000 --- a/Moose_DynamicGroundBattle/PLUGIN_README.md +++ /dev/null @@ -1,224 +0,0 @@ -# Dynamic Ground Battle Plugin - -## Overview - -This is a **plugin version** of the Dynamic Ground Battle system designed to work alongside `Moose_DualCoalitionZoneCapture.lua`. - -**Key difference from the standalone version:** -- ✅ Uses zones from `Moose_DualCoalitionZoneCapture.lua` (no duplicate zone management) -- ✅ Handles ONLY warehouse system + AI spawning + task assignment -- ✅ Zone capture, colors, messaging, win conditions = handled by DualCoalitionZoneCapture -- ✅ Cleaner separation of concerns - -## Load Order (Critical!) - -In your Mission Editor → Triggers → Mission Start: - -``` -1. DO SCRIPT FILE Moose_.lua -2. DO SCRIPT FILE Moose_DualCoalitionZoneCapture.lua ← Must load FIRST -3. DO SCRIPT FILE Moose_DynamicGroundBattle_Plugin.lua ← This file -4. DO SCRIPT FILE CTLD.lua (optional) -5. DO SCRIPT FILE CSAR.lua (optional) -``` - -## What This Plugin Does - -### ✅ Warehouse System -- Red/Blue warehouses affect reinforcement spawn rates -- 100% alive = 100% spawn rate -- 50% alive = 50% spawn rate (2x delay) -- 0% alive = no more spawns -- Map markers show warehouse locations and intel - -### ✅ Dynamic AI Spawning -- Spawns infantry and armor groups in **friendly zones only** -- Zones come from `DualCoalitionZoneCapture`'s `ZONE_CONFIG` -- As zones are captured/lost, spawn locations automatically update -- Configurable limits and spawn frequencies - -### ✅ AI Task Assignment -- Groups patrol toward nearest enemy zone -- Reassignment every 600s (configurable) -- Only idle units get new orders (moving units ignored) -- Infantry movement can be disabled - -### ✅ CTLD Integration -- Dropped troops automatically get AI tasking -- Works seamlessly with logistics operations - -## What This Plugin Does NOT Do - -- ❌ Zone capture logic (handled by DualCoalitionZoneCapture) -- ❌ Zone coloring/messaging (handled by DualCoalitionZoneCapture) -- ❌ Win conditions (handled by DualCoalitionZoneCapture) -- ❌ Scoring (handled by DualCoalitionZoneCapture) - -## Configuration - -Edit the top section of `Moose_DynamicGroundBattle_Plugin.lua`: - -### Infantry Movement -```lua -local MOVING_INFANTRY_PATROLS = false -- Set true to enable infantry patrols -``` - -### Warehouse Markers -```lua -local ENABLE_WAREHOUSE_MARKERS = true -local UPDATE_MARK_POINTS_SCHED = 300 -- Update every 5 minutes -``` - -### Spawn Settings -```lua --- Red Side -local INIT_RED_INFANTRY = 5 -local MAX_RED_INFANTRY = 100 -local SPAWN_SCHED_RED_INFANTRY = 1800 -- Every 30 minutes - -local INIT_RED_ARMOR = 25 -local MAX_RED_ARMOR = 200 -local SPAWN_SCHED_RED_ARMOR = 300 -- Every 5 minutes - --- Blue Side -local INIT_BLUE_INFANTRY = 5 -local MAX_BLUE_INFANTRY = 100 -local SPAWN_SCHED_BLUE_INFANTRY = 1800 - -local INIT_BLUE_ARMOR = 25 -local MAX_BLUE_ARMOR = 200 -local SPAWN_SCHED_BLUE_ARMOR = 300 - --- Task Assignment -local ASSIGN_TASKS_SCHED = 600 -- Reassign idle units every 10 minutes -``` - -### Warehouses -```lua -local redWarehouses = { - STATIC:FindByName("RedWarehouse1-1"), - STATIC:FindByName("RedWarehouse2-1"), - -- Add more as needed -} - -local blueWarehouses = { - STATIC:FindByName("BlueWarehouse1-1"), - STATIC:FindByName("BlueWarehouse2-1"), - -- Add more as needed -} -``` - -### Unit Templates -```lua -local redInfantryTemplates = { - "RedInfantry1", - "RedInfantry2", - -- Add more for variety -} - -local redArmorTemplates = { - "RedArmor1", - "RedArmor2", - -- Add more for variety -} - --- Same for blue side... -``` - -## Mission Editor Setup - -### Required Groups (All LATE ACTIVATE) - -**Red Side:** -- Infantry: `RedInfantry1`, `RedInfantry2`, `RedInfantry3`, `RedInfantry4`, `RedInfantry5`, `RedInfantry6` -- Armor: `RedArmor1`, `RedArmor2`, `RedArmor3`, `RedArmor4`, `RedArmor5`, `RedArmor6` - -**Blue Side:** -- Infantry: `BlueInfantry1`, `BlueInfantry2`, `BlueInfantry3`, `BlueInfantry4`, `BlueInfantry5`, `BlueInfantry6` -- Armor: `BlueArmor1`, `BlueArmor2`, `BlueArmor3`, `BlueArmor4`, `BlueArmor5` - -### Required Static Objects (Warehouses) - -**Red Side:** -- Static objects with **Unit Name** (not Name field!): `RedWarehouse1-1`, `RedWarehouse2-1`, `RedWarehouse3-1`, etc. - -**Blue Side:** -- Static objects with **Unit Name**: `BlueWarehouse1-1`, `BlueWarehouse2-1`, `BlueWarehouse3-1`, etc. - -⚠️ **Important:** Warehouses use the "Unit Name" field in the static object properties, not the "Name" field! - -### Zone Configuration - -Zones come from `Moose_DualCoalitionZoneCapture.lua`. Edit that file's `ZONE_CONFIG`: - -```lua -local ZONE_CONFIG = { - RED = { - "Capture Zone-1", - "Capture Zone-2", - "Capture Zone-3", - }, - - BLUE = { - "Capture Zone-4", - "Capture Zone-5", - "Capture Zone-6", - }, - - NEUTRAL = {} -} -``` - -## F10 Menu - -- **Ground Battle → Check Warehouse Status** - Shows current warehouse count and reinforcement capacity - -## Integration Points - -### With DualCoalitionZoneCapture -- Reads `zoneCaptureObjects` and `zoneNames` arrays -- Dynamically spawns in zones controlled by the appropriate coalition -- AI routes to enemy zones based on current ownership - -### With CTLD -- Any troops dropped via CTLD in friendly zones will automatically receive AI tasking -- They'll patrol toward nearest enemy zone like spawned units - -## Performance & Memory Safety - -This plugin version includes all the memory leak fixes from the standalone version: - -✅ Marker cleanup prevents orphaning -✅ Reuses SET_GROUP instead of recreating -✅ Uses SCHEDULER instead of recursive TIMERs -✅ Efficient zone polling - -## Troubleshooting - -### "ERROR: Moose_DualCoalitionZoneCapture.lua must be loaded BEFORE this plugin!" -- Check your trigger load order -- DualCoalitionZoneCapture must be loaded in an earlier trigger - -### Units not spawning -- Check `dcs.log` for errors -- Verify warehouse static objects exist with correct **Unit Names** -- Verify template groups exist and are set to LATE ACTIVATE -- Check that friendly zones exist (units only spawn in controlled zones) - -### Units not moving -- If infantry: check `MOVING_INFANTRY_PATROLS` setting -- Verify enemy zones exist for AI to target -- Check `dcs.log` for task assignment messages (`[DGB PLUGIN]`) - -### Warehouse markers not showing -- Set `ENABLE_WAREHOUSE_MARKERS = true` -- Check warehouse static objects are alive -- Markers update every `UPDATE_MARK_POINTS_SCHED` seconds - -## Version History - -- **1.0.0** (2024-11-15) - Initial plugin version - - Extracted from standalone Dynamic Ground Battle - - Integrated with DualCoalitionZoneCapture - - Added memory leak fixes - - Dynamic zone-based spawning diff --git a/Moose_DynamicGroundBattle/README.html b/Moose_DynamicGroundBattle/README.html deleted file mode 100644 index 966a9f6..0000000 --- a/Moose_DynamicGroundBattle/README.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - - - Moose Dynamic Ground Battle - Documentation - - - -
-
-

🎮 Moose Dynamic Ground Battle

-
- Version: 1.0.3 | - Author: F99th-TracerFacer | - Date: November 12, 2024 -
-
- - - -
-

Overview

-

- Moose Dynamic Ground Battle is a sophisticated DCS World mission script that creates an engaging, - dynamic ground warfare system between Red and Blue coalitions. The script uses the MOOSE framework - to simulate realistic battlefield conditions with zone capture mechanics, intelligent AI movement, - and warehouse-based reinforcement systems. -

-
- -
-

Features

- -
-

🎯 Zone Capture System

-
    -
  • Multiple Zone States: Captured, Guarded, Empty, Attacked, and Neutral
  • -
  • Visual Indicators: -
      -
    • Red Captured by Red forces
    • -
    • Blue Captured by Blue forces
    • -
    • Orange Contested zone
    • -
    • Green Empty/Neutral zone
    • -
    -
  • -
  • Real-time Updates: Zone status changes trigger messages and visual updates
  • -
-
- -
-

🚁 Intelligent AI Behavior

-
    -
  • Automated Spawning: Infantry and armor groups spawn at random locations within friendly zones
  • -
  • Smart Pathfinding: Units automatically calculate and move to the nearest enemy zone
  • -
  • Periodic Task Assignment: Every configurable interval, units receive new orders based on zone states
  • -
  • CTLD Integration: Troops dropped via CTLD will automatically join the battle
  • -
  • Stuck Unit Recovery: Units that become stuck can be reset to receive new patrol orders
  • -
-
- -
-

🏭 Warehouse System

-
    -
  • Dynamic Reinforcement Rate: Spawn frequency adjusts based on warehouse survival
  • -
  • Proportional Impact: 100% warehouses = 100% reinforcement rate, 50% warehouses = 50% rate
  • -
  • Intelligence Markers: Automatic map markers showing warehouse locations and nearby units
  • -
  • Strategic Importance: Warehouses become critical targets affecting enemy reinforcement capability
  • -
-
- -
-

📊 Spawn Management

-
    -
  • Configurable Limits: Set initial spawn counts and maximum unit limits
  • -
  • Template Randomization: Multiple unit templates for variety
  • -
  • Frequency Control: Adjustable spawn intervals for infantry and armor
  • -
  • Coalition Balance: Independent settings for Red and Blue forces
  • -
-
-
- -
-

Installation Requirements

- -

Prerequisites

-
    -
  1. MOOSE Framework: This script requires the MOOSE framework for DCS World -
      -
    • Download from MOOSE GitHub
    • -
    • Load MOOSE in your mission before this script
    • -
    -
  2. -
  3. DCS World: Compatible with current DCS World versions
  4. -
  5. Mission Editor: All groups, zones, and warehouses must be pre-configured
  6. -
- -

Mission Editor Setup

- -

Required Groups (All LATE ACTIVATE)

- -

Red Forces:

-
Infantry: RedInfantry1, RedInfantry2, RedInfantry3, RedInfantry4, RedInfantry5, RedInfantry6
-Armor: RedArmor1, RedArmor2, RedArmor3, RedArmor4, RedArmor5, RedArmor6
- -

Blue Forces:

-
Infantry: BlueInfantry1, BlueInfantry2, BlueInfantry3, BlueInfantry4, BlueInfantry5, BlueInfantry6
-Armor: BlueArmor1, BlueArmor2, BlueArmor3, BlueArmor4, BlueArmor5
- -

Required Zones

- -

Red Zones:

-
FrontLine1, FrontLine2, FrontLine3, FrontLine4, FrontLine5, FrontLine6
- -

Blue Zones:

-
FrontLine7, FrontLine8, FrontLine9, FrontLine10, FrontLine11, FrontLine12
- -

Required Warehouses (Static Objects)

- -
- Important: Warehouse names are based on the static unit name in the mission editor, not the display name. -
- -

Red Warehouses:

-
RedWarehouse1-1, RedWarehouse2-1, RedWarehouse3-1, 
-RedWarehouse4-1, RedWarehouse5-1, RedWarehouse6-1
- -

Blue Warehouses:

-
BlueWarehouse1-1, BlueWarehouse2-1, BlueWarehouse3-1, 
-BlueWarehouse4-1, BlueWarehouse5-1, BlueWarehouse6-1
- -

Optional: Command Centers

-

If not using another script for command centers, create these units:

-
    -
  • BLUEHQ - Blue coalition HQ unit
  • -
  • REDHQ - Red coalition HQ unit
  • -
-
- -
-

Configuration

- -

Basic Settings

-
-- Infantry Movement
-MOVING_INFANTRY_PATROLS = false  -- Set true to enable infantry movement
-
--- Warehouse Markers
-ENABLE_WAREHOUSE_MARKERS = true
-UPDATE_MARK_POINTS_SCHED = 60    -- Update interval in seconds
-MAX_WAREHOUSE_UNIT_LIST_DISTANCE = 5000  -- Search radius in meters
-
--- Task Assignment
-ASSIGN_TASKS_SCHED = 600  -- Reassign tasks every 600 seconds
- -

Spawn Configuration

- -

Red Forces:

-
INIT_RED_INFANTRY = 5           -- Initial infantry groups
-MAX_RED_INFANTRY = 100          -- Maximum infantry groups
-SPAWN_SCHED_RED_INFANTRY = 1800 -- Spawn interval (seconds)
-
-INIT_RED_ARMOR = 25             -- Initial armor groups
-MAX_RED_ARMOR = 200             -- Maximum armor groups
-SPAWN_SCHED_RED_ARMOR = 300     -- Spawn interval (seconds)
- -

Blue Forces:

-
INIT_BLUE_INFANTRY = 5          -- Initial infantry groups
-MAX_BLUE_INFANTRY = 100         -- Maximum infantry groups
-SPAWN_SCHED_BLUE_INFANTRY = 1800 -- Spawn interval (seconds)
-
-INIT_BLUE_ARMOR = 25            -- Initial armor groups
-MAX_BLUE_ARMOR = 200            -- Maximum armor groups
-SPAWN_SCHED_BLUE_ARMOR = 300    -- Spawn interval (seconds)
- -

Zone Configuration

-

Zones can be arranged in any configuration - along a front line, following roads, or scattered across the map:

-
local redZones = {
-    ZONE:New("FrontLine1"),
-    ZONE:New("FrontLine2"),
-    -- Add more zones as needed
-}
-
-local blueZones = {
-    ZONE:New("FrontLine7"),
-    ZONE:New("FrontLine8"),
-    -- Add more zones as needed
-}
- -

Template Customization

-

Add variety by creating multiple unit templates:

-
local redInfantryTemplates = {
-    "RedInfantry1",
-    "RedInfantry2",
-    -- Add more templates for variety
-}
-
-local redArmorTemplates = {
-    "RedArmor1",
-    "RedArmor2",
-    -- Add more templates for variety
-}
-
- -
-

Gameplay Mechanics

- -

Zone Capture

-
    -
  • Zones change ownership based on unit presence
  • -
  • Zones transition through states: Empty → Attacked → Captured → Guarded
  • -
  • Players receive notifications when zones change status
  • -
  • Visual indicators (smoke and map colors) show current ownership
  • -
- -

Unit Behavior

-
    -
  1. Spawn: Units spawn at random locations in friendly zones
  2. -
  3. Task Assignment: Units calculate the nearest enemy zone
  4. -
  5. Movement: Units patrol to and around enemy zones
  6. -
  7. Reassignment: Stationary units receive new orders periodically
  8. -
  9. Combat: Units engage enemies encountered during patrols
  10. -
- -

Warehouse Impact

- - - - - - - - - - - - - - - - - - - - - - - - - -
Warehouse StatusSpawn Rate ImpactExample
100% AliveNormal spawn rate300 seconds
50% Alive2x spawn delay600 seconds
0% AliveNo more spawns∞ (infinite)
- -

Win Conditions

-
    -
  • Mission ends when one coalition captures all zones
  • -
  • Periodic checks every 60 seconds
  • -
  • Victory message and sound plays for winning side
  • -
-
- - - -
-

Customization Tips

- -

Adjusting Difficulty

-
    -
  • Increase Challenge: Reduce friendly spawn rates, increase enemy spawn rates
  • -
  • Balance Forces: Adjust MAX values to limit unit counts
  • -
  • Strategic Depth: Add more zones and warehouses
  • -
  • Terrain Adaptation: Disable infantry movement for mountainous terrain
  • -
- -

Adding More Units

-
    -
  1. Create new templates in mission editor
  2. -
  3. Add template names to the appropriate arrays
  4. -
  5. Ensure templates are set to LATE ACTIVATE
  6. -
  7. Test spawn behavior and patrol patterns
  8. -
- -

Zone Layouts

-
    -
  • Linear Front: Place zones in a line for traditional front-line combat
  • -
  • Scattered: Distribute zones for multi-front warfare
  • -
  • Road Network: Follow roads for realistic vehicle movement
  • -
  • Strategic Points: Place zones at key terrain features
  • -
-
- -
-

Troubleshooting

- -

Common Issues

- -
-

Units Not Spawning:

-
    -
  • Verify all template groups exist in mission editor
  • -
  • Check that groups are set to LATE ACTIVATE
  • -
  • Review DCS.log for error messages
  • -
-
- -
-

Units Not Moving:

-
    -
  • Check MOVING_INFANTRY_PATROLS setting for infantry
  • -
  • Verify zones are properly named and created
  • -
  • Check that units aren't already moving when tasks are assigned
  • -
-
- -
-

Warehouse Markers Not Showing:

-
    -
  • Ensure ENABLE_WAREHOUSE_MARKERS = true
  • -
  • Verify warehouse static objects exist
  • -
  • Check that warehouse names match unit names (not display names)
  • -
-
- -
-

Zones Not Capturing:

-
    -
  • Verify MOOSE framework is loaded
  • -
  • Check zone names match exactly
  • -
  • Ensure units are fully inside zones
  • -
-
-
- -
-

Script Structure

-
├── Configuration Section (User Editable)
-│   ├── Spawn Settings
-│   ├── Zone Definitions
-│   ├── Warehouse Definitions
-│   └── Template Definitions
-│
-├── Core Functions (Do Not Edit)
-│   ├── Zone Capture System
-│   ├── Task Assignment Logic
-│   ├── Warehouse Monitoring
-│   ├── Spawn Frequency Calculator
-│   └── Win Condition Checker
-│
-└── Initialization
-    ├── Spawn Schedulers
-    ├── Event Handlers
-    └── Menu Creation
-
- -
-

Performance Considerations

-
    -
  • Unit Limits: Higher MAX values increase computational load
  • -
  • Update Frequency: Longer intervals reduce CPU usage but decrease responsiveness
  • -
  • Zone Count: More zones = more calculations per update
  • -
  • Template Variety: More templates add minimal overhead
  • -
-
- -
-

Credits

-
    -
  • Script Author: F99th-TracerFacer
  • -
  • Framework: MOOSE Framework by FlightControl
  • -
  • Community: DCS World Mission Editing Community
  • -
-
- -
-

Version History

-
    -
  • 1.0.3 (November 12, 2024) - Current release
  • -
  • 1.0.0 (November 11, 2024) - Initial release
  • -
-
- -
-

License

-

- This script is provided as-is for the DCS World community. Feel free to modify and - distribute with credit to the original author. -

-
- -
-

Happy Mission Building! 🚁

-

For issues, suggestions, or improvements, please contact the author or submit issues through your community channels.

-
-
- - diff --git a/Moose_DynamicGroundBattle/README.md b/Moose_DynamicGroundBattle/README.md deleted file mode 100644 index e64b69b..0000000 --- a/Moose_DynamicGroundBattle/README.md +++ /dev/null @@ -1,308 +0,0 @@ -# Moose Dynamic Ground Battle - -**Version:** 1.0.3 -**Author:** F99th-TracerFacer -**Date:** November 12, 2024 - -## Overview - -Moose Dynamic Ground Battle is a sophisticated DCS World mission script that creates an engaging, dynamic ground warfare system between Red and Blue coalitions. The script uses the MOOSE framework to simulate realistic battlefield conditions with zone capture mechanics, intelligent AI movement, and warehouse-based reinforcement systems. - -## Features - -### 🎯 Zone Capture System -- **Multiple Zone States:** Captured, Guarded, Empty, Attacked, and Neutral -- **Visual Indicators:** - - 🔴 Red: Captured by Red forces - - 🔵 Blue: Captured by Blue forces - - 🟠 Orange: Contested zone - - 🟢 Green: Empty/Neutral zone -- **Real-time Updates:** Zone status changes trigger messages and visual updates - -### 🚁 Intelligent AI Behavior -- **Automated Spawning:** Infantry and armor groups spawn at random locations within friendly zones -- **Smart Pathfinding:** Units automatically calculate and move to the nearest enemy zone -- **Periodic Task Assignment:** Every configurable interval, units receive new orders based on zone states -- **CTLD Integration:** Troops dropped via CTLD will automatically join the battle -- **Stuck Unit Recovery:** Units that become stuck can be reset to receive new patrol orders - -### 🏭 Warehouse System -- **Dynamic Reinforcement Rate:** Spawn frequency adjusts based on warehouse survival -- **Proportional Impact:** 100% warehouses = 100% reinforcement rate, 50% warehouses = 50% rate -- **Intelligence Markers:** Automatic map markers showing warehouse locations and nearby units -- **Strategic Importance:** Warehouses become critical targets affecting enemy reinforcement capability - -### 📊 Spawn Management -- **Configurable Limits:** Set initial spawn counts and maximum unit limits -- **Template Randomization:** Multiple unit templates for variety -- **Frequency Control:** Adjustable spawn intervals for infantry and armor -- **Coalition Balance:** Independent settings for Red and Blue forces - -## Installation Requirements - -### Prerequisites -1. **MOOSE Framework:** This script requires the MOOSE framework for DCS World - - Download from [MOOSE GitHub](https://github.com/FlightControl-Master/MOOSE) - - Load MOOSE in your mission before this script -2. **DCS World:** Compatible with current DCS World versions -3. **Mission Editor:** All groups, zones, and warehouses must be pre-configured - -### Mission Editor Setup - -#### Required Groups (All LATE ACTIVATE) - -**Red Forces:** -``` -Infantry: RedInfantry1, RedInfantry2, RedInfantry3, RedInfantry4, RedInfantry5, RedInfantry6 -Armor: RedArmor1, RedArmor2, RedArmor3, RedArmor4, RedArmor5, RedArmor6 -``` - -**Blue Forces:** -``` -Infantry: BlueInfantry1, BlueInfantry2, BlueInfantry3, BlueInfantry4, BlueInfantry5, BlueInfantry6 -Armor: BlueArmor1, BlueArmor2, BlueArmor3, BlueArmor4, BlueArmor5 -``` - -#### Required Zones - -**Red Zones:** -``` -FrontLine1, FrontLine2, FrontLine3, FrontLine4, FrontLine5, FrontLine6 -``` - -**Blue Zones:** -``` -FrontLine7, FrontLine8, FrontLine9, FrontLine10, FrontLine11, FrontLine12 -``` - -#### Required Warehouses (Static Objects) - -**Red Warehouses:** -``` -RedWarehouse1-1, RedWarehouse2-1, RedWarehouse3-1, -RedWarehouse4-1, RedWarehouse5-1, RedWarehouse6-1 -``` - -**Blue Warehouses:** -``` -BlueWarehouse1-1, BlueWarehouse2-1, BlueWarehouse3-1, -BlueWarehouse4-1, BlueWarehouse5-1, BlueWarehouse6-1 -``` - -⚠️ **Important:** Warehouse names are based on the static **unit name** in the mission editor, not the display name. - -#### Optional: Command Centers -If not using another script for command centers, create these units: -- `BLUEHQ` - Blue coalition HQ unit -- `REDHQ` - Red coalition HQ unit - -## Configuration - -### Basic Settings - -```lua --- Infantry Movement -MOVING_INFANTRY_PATROLS = false -- Set true to enable infantry movement - --- Warehouse Markers -ENABLE_WAREHOUSE_MARKERS = true -UPDATE_MARK_POINTS_SCHED = 60 -- Update interval in seconds -MAX_WAREHOUSE_UNIT_LIST_DISTANCE = 5000 -- Search radius in meters - --- Task Assignment -ASSIGN_TASKS_SCHED = 600 -- Reassign tasks every 600 seconds -``` - -### Spawn Configuration - -**Red Forces:** -```lua -INIT_RED_INFANTRY = 5 -- Initial infantry groups -MAX_RED_INFANTRY = 100 -- Maximum infantry groups -SPAWN_SCHED_RED_INFANTRY = 1800 -- Spawn interval (seconds) - -INIT_RED_ARMOR = 25 -- Initial armor groups -MAX_RED_ARMOR = 200 -- Maximum armor groups -SPAWN_SCHED_RED_ARMOR = 300 -- Spawn interval (seconds) -``` - -**Blue Forces:** -```lua -INIT_BLUE_INFANTRY = 5 -- Initial infantry groups -MAX_BLUE_INFANTRY = 100 -- Maximum infantry groups -SPAWN_SCHED_BLUE_INFANTRY = 1800 -- Spawn interval (seconds) - -INIT_BLUE_ARMOR = 25 -- Initial armor groups -MAX_BLUE_ARMOR = 200 -- Maximum armor groups -SPAWN_SCHED_BLUE_ARMOR = 300 -- Spawn interval (seconds) -``` - -### Zone Configuration - -Zones can be arranged in any configuration - along a front line, following roads, or scattered across the map: - -```lua -local redZones = { - ZONE:New("FrontLine1"), - ZONE:New("FrontLine2"), - -- Add more zones as needed -} - -local blueZones = { - ZONE:New("FrontLine7"), - ZONE:New("FrontLine8"), - -- Add more zones as needed -} -``` - -### Template Customization - -Add variety by creating multiple unit templates: - -```lua -local redInfantryTemplates = { - "RedInfantry1", - "RedInfantry2", - -- Add more templates for variety -} - -local redArmorTemplates = { - "RedArmor1", - "RedArmor2", - -- Add more templates for variety -} -``` - -## Gameplay Mechanics - -### Zone Capture -- Zones change ownership based on unit presence -- Zones transition through states: Empty → Attacked → Captured → Guarded -- Players receive notifications when zones change status -- Visual indicators (smoke and map colors) show current ownership - -### Unit Behavior -1. **Spawn:** Units spawn at random locations in friendly zones -2. **Task Assignment:** Units calculate the nearest enemy zone -3. **Movement:** Units patrol to and around enemy zones -4. **Reassignment:** Stationary units receive new orders periodically -5. **Combat:** Units engage enemies encountered during patrols - -### Warehouse Impact -- **Full Capacity:** All warehouses alive = normal spawn rate -- **Reduced Capacity:** 50% warehouses alive = 2x spawn delay -- **No Capacity:** 0% warehouses alive = no more spawns -- **Strategic Target:** Destroying enemy warehouses significantly impacts their reinforcement rate - -### Win Conditions -- Mission ends when one coalition captures all zones -- Periodic checks every 60 seconds -- Victory message and sound plays for winning side - -## In-Game Menu - -Access warehouse status via the F10 menu: -``` -F10 → Warehouse Monitoring → Check Warehouse Status -``` - -This displays: -- Number of warehouses alive per side -- Current reinforcement capacity percentage -- Real-time battlefield intelligence - -## Customization Tips - -### Adjusting Difficulty -- **Increase Challenge:** Reduce friendly spawn rates, increase enemy spawn rates -- **Balance Forces:** Adjust MAX values to limit unit counts -- **Strategic Depth:** Add more zones and warehouses -- **Terrain Adaptation:** Disable infantry movement for mountainous terrain - -### Adding More Units -1. Create new templates in mission editor -2. Add template names to the appropriate arrays -3. Ensure templates are set to LATE ACTIVATE -4. Test spawn behavior and patrol patterns - -### Zone Layouts -- **Linear Front:** Place zones in a line for traditional front-line combat -- **Scattered:** Distribute zones for multi-front warfare -- **Road Network:** Follow roads for realistic vehicle movement -- **Strategic Points:** Place zones at key terrain features - -## Troubleshooting - -### Common Issues - -**Units Not Spawning:** -- Verify all template groups exist in mission editor -- Check that groups are set to LATE ACTIVATE -- Review DCS.log for error messages - -**Units Not Moving:** -- Check `MOVING_INFANTRY_PATROLS` setting for infantry -- Verify zones are properly named and created -- Check that units aren't already moving when tasks are assigned - -**Warehouse Markers Not Showing:** -- Ensure `ENABLE_WAREHOUSE_MARKERS = true` -- Verify warehouse static objects exist -- Check that warehouse names match unit names (not display names) - -**Zones Not Capturing:** -- Verify MOOSE framework is loaded -- Check zone names match exactly -- Ensure units are fully inside zones - -## Script Structure - -``` -├── Configuration Section (User Editable) -│ ├── Spawn Settings -│ ├── Zone Definitions -│ ├── Warehouse Definitions -│ └── Template Definitions -│ -├── Core Functions (Do Not Edit) -│ ├── Zone Capture System -│ ├── Task Assignment Logic -│ ├── Warehouse Monitoring -│ ├── Spawn Frequency Calculator -│ └── Win Condition Checker -│ -└── Initialization - ├── Spawn Schedulers - ├── Event Handlers - └── Menu Creation -``` - -## Performance Considerations - -- **Unit Limits:** Higher MAX values increase computational load -- **Update Frequency:** Longer intervals reduce CPU usage but decrease responsiveness -- **Zone Count:** More zones = more calculations per update -- **Template Variety:** More templates add minimal overhead - -## Credits - -- **Script Author:** F99th-TracerFacer -- **Framework:** MOOSE Framework by FlightControl -- **Community:** DCS World Mission Editing Community - -## Version History - -- **1.0.3** (November 12, 2024) - Current release -- **1.0.0** (November 11, 2024) - Initial release - -## License - -This script is provided as-is for the DCS World community. Feel free to modify and distribute with credit to the original author. - -## Support - -For issues, suggestions, or improvements, please contact the author or submit issues through your community channels. - ---- - -**Happy Mission Building! 🚁** diff --git a/Moose_Framework/.buildpath b/Moose_Framework/.buildpath deleted file mode 100644 index 6a33cf4..0000000 --- a/Moose_Framework/.buildpath +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/Moose_Framework/.project b/Moose_Framework/.project deleted file mode 100644 index d700bd3..0000000 --- a/Moose_Framework/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Moose_Framework - - - - - - org.eclipse.dltk.core.scriptbuilder - - - - - - org.eclipse.ldt.nature - - diff --git a/Moose_Framework/.settings/org.eclipse.ldt.prefs b/Moose_Framework/.settings/org.eclipse.ldt.prefs deleted file mode 100644 index 3b1203d..0000000 --- a/Moose_Framework/.settings/org.eclipse.ldt.prefs +++ /dev/null @@ -1,2 +0,0 @@ -Grammar__default_id=lua-5.1 -eclipse.preferences.version=1 diff --git a/Moose_Framework/src/main.lua b/Moose_Framework/src/main.lua deleted file mode 100644 index 1c67795..0000000 --- a/Moose_Framework/src/main.lua +++ /dev/null @@ -1,4 +0,0 @@ -local function main() - -end -main() diff --git a/Moose_Missions/.buildpath b/Moose_Missions/.buildpath deleted file mode 100644 index d31cad8..0000000 --- a/Moose_Missions/.buildpath +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/Moose_Missions/.project b/Moose_Missions/.project deleted file mode 100644 index a55557f..0000000 --- a/Moose_Missions/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - Moose_Missions - - - - - - org.eclipse.dltk.core.scriptbuilder - - - - - - org.eclipse.ldt.nature - - diff --git a/Moose_Missions/.settings/org.eclipse.ldt.prefs b/Moose_Missions/.settings/org.eclipse.ldt.prefs deleted file mode 100644 index 3b1203d..0000000 --- a/Moose_Missions/.settings/org.eclipse.ldt.prefs +++ /dev/null @@ -1,2 +0,0 @@ -Grammar__default_id=lua-5.1 -eclipse.preferences.version=1 diff --git a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.lua b/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.lua deleted file mode 100644 index 8abd67b..0000000 --- a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.lua +++ /dev/null @@ -1,3 +0,0 @@ - -local PlanesClientSet = SET_CLIENT:New():FilterCategories( "plane" ):FilterStart() -local AirbasePolice = AIRBASEPOLICE_CAUCASUS:New( PlanesClientSet ) diff --git a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.miz b/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.miz deleted file mode 100644 index 84bbab7..0000000 Binary files a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/ABP-001 - Caucasus.miz and /dev/null differ diff --git a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/pack.ps1 b/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/unpack.ps1 b/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ABP - Airbase Police/ABP-001 - Caucasus/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.lua b/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.lua deleted file mode 100644 index f908630..0000000 --- a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.lua +++ /dev/null @@ -1,3 +0,0 @@ - -local PlanesClientSet = SET_CLIENT:New():FilterCategories( "plane" ):FilterStart() -local AirbasePolice = AIRBASEPOLICE_NEVADA:New( PlanesClientSet ) diff --git a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.miz b/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.miz deleted file mode 100644 index 66868a2..0000000 Binary files a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/ABP-002 - Nevada.miz and /dev/null differ diff --git a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/pack.ps1 b/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/unpack.ps1 b/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ABP - Airbase Police/ABP-002 - Nevada/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua b/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua deleted file mode 100644 index 44b68cd..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: AIB-001 - Spawned AI --- Author: FlightControl --- Date Created: 07 Dec 2016 --- --- # Situation: --- --- For the red coalition, 2 client slots are foreseen. --- We test the AI spawning frequency, validating the number of spawned AI, --- matching the amount of players that not have joined the mission. --- When players join, AI should fly to the nearest home base. --- --- # Test cases: --- --- 1. If no player is logging into the red slots, 2 red AI planes should be alive. --- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. --- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. - --- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. -RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) - --- Define the SPAWN object for the red AI plane template. --- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. --- If a blocked plane exists, this red plane will be ReSpawned. -RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) - --- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) diff --git a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz b/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz deleted file mode 100644 index d9fb649..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/AIB-001 - Spawned AI.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-001 - Spawned AI/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua b/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua deleted file mode 100644 index c0b085a..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.lua +++ /dev/null @@ -1,43 +0,0 @@ --- Name: AIB-002 - Patrol AI.lua --- Author: FlightControl --- Date Created: 7 December 2016 --- --- # Situation: --- --- For the red coalition, 2 client slots are foreseen. --- For those players that have not joined the mission, red AI is spawned. --- The red AI should start patrolling an area until fuel is empty and return to the home base. --- --- # Test cases: --- --- 1. If no player is logging into the red slots, 2 red AI planes should be alive. --- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. --- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. --- 4. Spawned AI should take-off from the airbase, and start patrolling the area around Anapa. --- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa. - --- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. -RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) - --- Define the SPAWN object for the red AI plane template. --- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. --- If a blocked plane exists, this red plane will be ReSpawned. -RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) - --- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) - -local PatrolZones = {} - -function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - - local PatrolZoneGroup = GROUP:FindByName( "PatrolZone" ) - local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) - - - PatrolZones[AIGroup] = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 400, 600 ) - PatrolZones[AIGroup]:ManageFuel( 0.2, 60 ) - PatrolZones[AIGroup]:SetControllable( AIGroup ) - PatrolZones[AIGroup]:__Start( 5 ) - -end diff --git a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz b/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz deleted file mode 100644 index 7d1a3f1..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/AIB-002 - Patrol AI.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-002 - Patrol AI/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua b/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua deleted file mode 100644 index 2f4a137..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.lua +++ /dev/null @@ -1,24 +0,0 @@ -RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) -RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) -RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) - -RU_AirbasesSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart() -RU_AirbasesSet:Flush() -RU_AI_Balancer:ReturnToNearestAirbases( 10000, RU_AirbasesSet ) - - -US_PlanesClientSet = SET_CLIENT:New():FilterCountries( "USA" ):FilterCategories( "plane" ) -US_PlanesSpawn = SPAWN:New( "AI US" ):InitCleanUp( 20 ) -US_AI_Balancer = AI_BALANCER:New( US_PlanesClientSet, US_PlanesSpawn ) - ---RU_AI_Balancer:ReturnToHomeAirbase( 10000 ) - ---local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Blue" ) ---local PatrolZoneBlue = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) ---local PatrolZoneB = AI_PATROL_ZONE:New( PatrolZoneBlue, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) ---US_AI_Balancer:SetPatrolZone( PatrolZoneB ) --- ---local PatrolZoneGroup = GROUP:FindByName( "Patrol Zone Red" ) ---local PatrolZoneRed = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) ---local PatrolZoneR = AI_PATROL_ZONE:New( PatrolZoneRed, 3000, 6000, 900, 1100 ):ManageFuel( 0.2, 180 ) ---RU_AI_Balancer:SetPatrolZone( PatrolZoneR ) diff --git a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz b/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz deleted file mode 100644 index 64c40b3..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/AIB-003 - Two coalitions InitCleanUp test.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-003 - Two coalitions InitCleanUp test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.lua b/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.lua deleted file mode 100644 index 07efab0..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.lua +++ /dev/null @@ -1,47 +0,0 @@ --- Name: AIB-004 - Respawn Test when Destroyed.lua --- Author: FlightControl --- Date Created: 7 January 2017 --- --- # Situation: --- --- For the red coalition, 2 client slots are foreseen. --- For those players that have not joined the mission, red AI is spawned. --- The red AI should start patrolling an area. --- --- The blue side has SAMs nearby. --- Once the red AI takes off, the red AI is attacked by the blue SAMs. --- Red AI should be killed and once that happens, a Respawn of the group should happen! --- The Respawn happens through the InitCleanUp() API of SPAWN. --- --- # Test cases: --- --- 1. If no player is logging into the red slots, 2 red AI planes should be alive. --- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. --- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. --- 4. Monitor that once a red AI is destroyed, that it ReSpawns... - - --- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. -RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) - --- Define the SPAWN object for the red AI plane template. --- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. --- If a blocked plane exists, this red plane will be ReSpawned. -RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) - --- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) - -function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - - local PatrolZoneGroup = GROUP:FindByName( "PatrolZone" ) - local PatrolZone = ZONE_POLYGON:New( "PatrolZone", PatrolZoneGroup ) - - - local Patrol = AI_PATROL_ZONE:New( PatrolZone, 3000, 6000, 400, 600 ) - Patrol:ManageFuel( 0.2, 60 ) - Patrol:SetControllable( AIGroup ) - Patrol:__Start( 5 ) - -end - diff --git a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz b/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz deleted file mode 100644 index 28e34df..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/AIB-004 - Respawn Test when Destroyed.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-004 - Respawn Test when Destroyed/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.lua b/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.lua deleted file mode 100644 index f0253d5..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.lua +++ /dev/null @@ -1,51 +0,0 @@ --- Name: AIB-005 - Patrol AI and Randomize Zones --- Author: FlightControl --- Date Created: 10 Jan 2016 --- --- # Situation: --- --- For the red coalition, 2 client slots are foreseen. --- For those players that have not joined the mission, red AI is spawned. --- The red AI should start patrolling an area until fuel is empty and return to the home base. --- For each AI being spawned, ensure that they fly to a random zone defined within the mission editor. --- Right now there are two patrol zones defined, so the AI should start patrolliing in one of these zones. --- --- # Test cases: --- --- 1. If no player is logging into the red slots, 2 red AI planes should be alive. --- 2. If a player joins one red slot, one red AI plane should return to the nearest home base. --- 3. If two players join the red slots, no AI plane should be spawned, and all airborne AI planes should return to the nearest home base. --- 4. Spawned AI should take-off from the airbase, and start patrolling the area around Anapa. --- 5. When the AI is out-of-fuel, it should report it is returning to the home base, and land at Anapa. --- 6. Ensure that you see the AI patrol in one of the two zones ... - --- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. -RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) - --- Define the SPAWN object for the red AI plane template. --- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. --- If a blocked plane exists, this red plane will be ReSpawned. -RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) - --- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) - --- Create the first polygon zone ... -PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" ) -PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 ) - --- Create the second polygon zone ... -PatrolZoneGroup2 = GROUP:FindByName( "PatrolZone2" ) -PatrolZone2 = ZONE_POLYGON:New( "PatrolZone2", PatrolZoneGroup2 ) - --- Now, create an array of these zones ... -PatrolZoneArray = { PatrolZone1, PatrolZone2 } - -function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - - local Patrol = AI_PATROL_ZONE:New( PatrolZoneArray[math.random( 1, 2 )], 3000, 6000, 400, 600 ) - Patrol:ManageFuel( 0.2, 60 ) - Patrol:SetControllable( AIGroup ) - Patrol:Start() - -end diff --git a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz b/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz deleted file mode 100644 index a4b7cbd..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/AIB-005 - Patrol AI and Randomize Zones.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-005 - Patrol AI and Randomize Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.lua b/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.lua deleted file mode 100644 index 3157481..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.lua +++ /dev/null @@ -1,43 +0,0 @@ --- Name: AIB-005 - Patrol AI and Randomize Zones --- Author: FlightControl --- Date Created: 10 Jan 2016 --- --- # Situation: --- --- For the red coalition, 2 client slots are foreseen. --- For those players that have not joined the mission, red AI is spawned. --- You'll notice a lot of AI is being spawned, as there are a lot of slots... --- If the SPAWN API :InitCleanUp( secs ) is NOT used, you'll notice that the planes block each other on the runway. --- After a short period of time, nothing will move anymore... --- The :InitCleanUp( seconds ) API of the SPAWN class ensure that any AI that is parked longer than the --- specified amount of seconds, is respawned back at the parking position. --- This frees up the other planes departing, and the airbase is in this way decluttered... --- --- # Test cases: --- --- 1. Observe the de-cluttering of planes at Krymsk. --- 2. Play with the InitCleanUp API of the SPAWN class, extende the amount of seconds to find the optimal setting. - --- Define the SET of CLIENTs from the red coalition. This SET is filled during startup. -RU_PlanesClientSet = SET_CLIENT:New():FilterCountries( "RUSSIA" ):FilterCategories( "plane" ) - --- Define the SPAWN object for the red AI plane template. --- We use InitCleanUp to check every 20 seconds, if there are no planes blocked at the airbase, waithing for take-off. --- If a blocked plane exists, this red plane will be ReSpawned. -RU_PlanesSpawn = SPAWN:New( "AI RU" ):InitCleanUp( 20 ) - --- Start the AI_BALANCER, using the SET of red CLIENTs, and the SPAWN object as a parameter. -RU_AI_Balancer = AI_BALANCER:New( RU_PlanesClientSet, RU_PlanesSpawn ) - --- Create the first polygon zone ... -PatrolZoneGroup1 = GROUP:FindByName( "PatrolZone1" ) -PatrolZone1 = ZONE_POLYGON:New( "PatrolZone1", PatrolZoneGroup1 ) - -function RU_AI_Balancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - - local Patrol = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) - Patrol:ManageFuel( 0.2, 60 ) - Patrol:SetControllable( AIGroup ) - Patrol:__Start( 5 ) - -end diff --git a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz b/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz deleted file mode 100644 index f3630cc..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/AIB-006 - Declutter AI at Airbases.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-006 - Declutter AI at Airbases/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.lua b/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.lua deleted file mode 100644 index f6e3775..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.lua +++ /dev/null @@ -1,163 +0,0 @@ --- Name: AIB-007 - AI Balancers For all airports and both coalitions --- Author: Delta99 --- Date Created: 11 Feb 2017 --- --- Originally created to solve issues jg7xman (from Moose Slack group) was having in creating --- AI_BALANCER across multiple airbases. - --- # Situation: --- --- AI_BALANCERS created per airbase for both coalitions. Mutiple patrol zones are created --- for each side. Each flight that is created by AI_BALANCER will pick a random patrol zone --- to patrol. - --- # Test Cases --- --- 1. Observe at least 1 flight spawning and taking off from each airbase. --- 2. Each flight patrols randomly in one of its sides zones. --- 3. AI will respawn after killed. --- 4. Additional client slots are available at Sochi. If players don't take a slot there --- will be more than one AI taking off from Sochi. --- 5. Batumi contains a flight of 3 units rather than just 1 like most of the rest of the airbases. --- 6. Watch the coalition AI clash and kill each other. - --- Create the Red Patrol Zone Array - --- This zone array will be used in the AI_BALANCER to randomize the patrol --- zone that each spawned group will patrol - -RedPatrolZone = {} -RedPatrolZone[1] = ZONE:New( "RedPatrolZone1" ) -RedPatrolZone[2] = ZONE:New( "RedPatrolZone2" ) -RedPatrolZone[3] = ZONE:New( "RedPatrolZone3" ) -RedPatrolZone[4] = ZONE:New( "RedPatrolZone4" ) -RedPatrolZone[5] = ZONE:New( "RedPatrolZone5" ) -RedPatrolZone[6] = ZONE:New( "RedPatrolZone6" ) - --- Russian CAP Aircraft - --- These are the aircraft created in the mission editor that the AI will spawn --- with replacing any CLIENT created aircraft in the mission that a human --- player does not take. - -RU_PlanesSpawn = {} -RU_PlanesSpawn[1] = SPAWN:New( "RU CAP Anapa AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Anapa_Vityazevo) -RU_PlanesSpawn[2] = SPAWN:New( "RU CAP Beslan AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Beslan) -RU_PlanesSpawn[3] = SPAWN:New( "RU CAP Gelendzhik AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Gelendzhik) -RU_PlanesSpawn[4] = SPAWN:New( "RU CAP Krasnodar Center AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Krasnodar_Center) -RU_PlanesSpawn[5] = SPAWN:New( "RU CAP Krasnodar Pashkovsky AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Krasnodar_Pashkovsky) -RU_PlanesSpawn[6] = SPAWN:New( "RU CAP Krymsk AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Krymsk) -RU_PlanesSpawn[7] = SPAWN:New( "RU CAP Maykop AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Maykop_Khanskaya) -RU_PlanesSpawn[8] = SPAWN:New( "RU CAP Mineralnye Vody AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Mineralnye_Vody) -RU_PlanesSpawn[9] = SPAWN:New( "RU CAP Mozdok AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Mozdok) -RU_PlanesSpawn[10] = SPAWN:New( "RU CAP Nalchik AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Nalchik) -RU_PlanesSpawn[11] = SPAWN:New( "RU CAP Novorossiysk AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Novorossiysk) - --- Russian Client Aircraft (via AI_BALANCER, AI will replace these if no human players are in the slot) - --- If you want more client slots per airbase that you want AI to be able to take control of then --- name them with the prefixes below and they will be picked up automatically by FilterPrevixes. --- --- For example, if you want another Client slot available at Anapa name it "RU CLIENT Anapa AB 2". --- The code here does not need to be changed. Only an addition in the mission editor. An example --- of this can be found on the USA side at Sochi AB. - -RU_PlanesClientSet = {} -RU_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Anapa AB") -RU_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Beslan AB") -RU_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Gelendzhik AB") -RU_PlanesClientSet[4] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Krasnodar Center AB") -RU_PlanesClientSet[5] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Krasnodar Pashkovsky AB") -RU_PlanesClientSet[6] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Krymsk AB") -RU_PlanesClientSet[7] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Maykop AB") -RU_PlanesClientSet[8] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Mineralnye Vody AB") -RU_PlanesClientSet[9] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Mozdok AB") -RU_PlanesClientSet[10] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Nalchik AB") -RU_PlanesClientSet[11] = SET_CLIENT:New():FilterPrefixes("RU CLIENT Novorossiysk AB") - --- We setup an array to store all the AI_BALANCERS that are going to be created. Basically one --- per airbase. We loop through and create an AI_BALANCER as well as a separate OnAfterSpawned --- function for each. The Patrol Zone is randomized in the first parameter to AI_PATROL_ZONE:New() --- call. This is done for each of the AI_BALANCERS. To add more patrol zones, just define them in --- the mission editor and add into the array above. Code here does not need to be changed. The --- table.getn(RedPatrolZone) gets the number of elements in the RedPatrolZone array so that all --- of them are included to pick randomly. - - -RU_AI_Balancer = {} -for i=1, 11 do - RU_AI_Balancer[i] = AI_BALANCER:New(RU_PlanesClientSet[i], RU_PlanesSpawn[i]) - - -- We set a local variable within the for loop to the AI_BALANCER that was just created. - -- I couldn't get RU_AI_BALANCER[i]:OnAfterSpawn to be recognized so this is just pointing - -- curAIBalancer to the relevant RU_AI_BALANCER array item for each loop. - - -- So in this case there are essentially 11 OnAfterSpawned functions defined and handled. - - local curAIBalancer = RU_AI_Balancer[i] - function curAIBalancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - local Patrol = AI_PATROL_ZONE:New( RedPatrolZone[math.random( 1, table.getn(RedPatrolZone))], 1500, 5500, 700, 1400 ) - Patrol:ManageFuel( 0.2, 60 ) - Patrol:SetControllable( AIGroup ) - Patrol:Start() - end -end - --- US / Blue side is setup pretty much identically to the RU side above. Same detailed comments --- above apply here. The main difference here is 10 airbases instead of 11. - --- Another difference is additional client slots at Sochi and a group defined at Batumi with --- more than 1 unit per group (flight of 3 units). This is just to show that you can have more --- client slots per airbase and more units in a single group that the AI will control. I think --- this will also allow you to fly lead with AI on your wing or you can fly wing with an AI --- leader. - --- Create the Blue Patrol Zone Array -BluePatrolZone = {} -BluePatrolZone[1] = ZONE:New( "BluePatrolZone1") -BluePatrolZone[2] = ZONE:New( "BluePatrolZone2") -BluePatrolZone[3] = ZONE:New( "BluePatrolZone3") -BluePatrolZone[4] = ZONE:New( "BluePatrolZone4") -BluePatrolZone[5] = ZONE:New( "BluePatrolZone5") -BluePatrolZone[6] = ZONE:New( "BluePatrolZone6") - ---United States CAP Aircraft (these are used as templates for AI) - -US_PlanesSpawn = {} -US_PlanesSpawn[1] = SPAWN:New( "US CAP Batumi AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Batumi) -US_PlanesSpawn[2] = SPAWN:New( "US CAP Gudauta AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Gudauta) -US_PlanesSpawn[3] = SPAWN:New( "US CAP Kobuleti AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Kobuleti) -US_PlanesSpawn[4] = SPAWN:New( "US CAP Kutaisi AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Kutaisi) -US_PlanesSpawn[5] = SPAWN:New( "US CAP Senaki AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Senaki_Kolkhi) -US_PlanesSpawn[6] = SPAWN:New( "US CAP Sochi AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Sochi_Adler) -US_PlanesSpawn[7] = SPAWN:New( "US CAP Soganlug AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Soganlug) -US_PlanesSpawn[8] = SPAWN:New( "US CAP Sukhumi AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Sukhumi_Babushara) -US_PlanesSpawn[9] = SPAWN:New( "US CAP Vaziani AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Vaziani) -US_PlanesSpawn[10] = SPAWN:New( "US CAP Tbilisi AB" ):InitCleanUp( 45 ):InitAirbase(AIRBASE.Caucasus.Tbilisi_Lochini) - ---United States Client Aircraft (via AI_BALANCER, AI will replace these if no human players are in the slot) - -US_PlanesClientSet = {} -US_PlanesClientSet[1] = SET_CLIENT:New():FilterPrefixes("US CLIENT Batumi AB") -US_PlanesClientSet[2] = SET_CLIENT:New():FilterPrefixes("US CLIENT Gudauta AB") -US_PlanesClientSet[3] = SET_CLIENT:New():FilterPrefixes("US CLIENT Kobuleti AB") -US_PlanesClientSet[4] = SET_CLIENT:New():FilterPrefixes("US CLIENT Kutaisi AB") -US_PlanesClientSet[5] = SET_CLIENT:New():FilterPrefixes("US CLIENT Senaki AB") -US_PlanesClientSet[6] = SET_CLIENT:New():FilterPrefixes("US CLIENT Sochi AB") -US_PlanesClientSet[7] = SET_CLIENT:New():FilterPrefixes("US CLIENT Soganlug AB") -US_PlanesClientSet[8] = SET_CLIENT:New():FilterPrefixes("US CLIENT Sukhumi AB") -US_PlanesClientSet[9] = SET_CLIENT:New():FilterPrefixes("US CLIENT Vaziani AB") -US_PlanesClientSet[10] = SET_CLIENT:New():FilterPrefixes("US CLIENT Tbilisi AB") - -US_AI_Balancer = {} -for i=1, 10 do - US_AI_Balancer[i] = AI_BALANCER:New( US_PlanesClientSet[i], US_PlanesSpawn[i] ) - - local curAIBalancer = US_AI_Balancer[i] - function curAIBalancer:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - local Patrol = AI_PATROL_ZONE:New( BluePatrolZone[math.random( 1, table.getn(BluePatrolZone))], 1500, 5500, 700, 1400 ) - Patrol:ManageFuel( 0.2, 60 ) - Patrol:SetControllable( AIGroup ) - Patrol:Start() - end -end diff --git a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.miz b/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.miz deleted file mode 100644 index 3d5edee..0000000 Binary files a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/AIB-007 - All Airports.miz and /dev/null differ diff --git a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/pack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/unpack.ps1 b/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AIB - AI Balancing/AIB-007 - All Airports/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.lua deleted file mode 100644 index 9c54a2b..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.lua +++ /dev/null @@ -1,20 +0,0 @@ ---- --- Name: AIC-APC-000 - APC --- Author: FlightControl --- Date Created: 26 Mar 2018 --- Date Checked: 01 Jan 2021 --- Working example --- --- A demonstration of the AI_CARGO_APC class. --- This simple example transports Infantry. --- The CARGO_GROUP objects are declared within the mission script. - -local Infantry1 = CARGO_GROUP:New( GROUP:FindByName( "Infantry1" ), "Infantry", "Infantry1", 500, 25 ) -local Infantry2 = CARGO_GROUP:New( GROUP:FindByName( "Infantry2" ), "Infantry", "Infantry2", 500, 25 ) -local Infantry3 = CARGO_GROUP:New( GROUP:FindByName( "Infantry3" ), "Infantry", "Infantry3", 500, 25 ) - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local APC = GROUP:FindByName( "APC" ) -AICargoAPC = AI_CARGO_APC:New( APC, InfantryCargoSet, 500 ) -AICargoAPC:__Pickup( 5 ) - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.miz deleted file mode 100644 index ababef0..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/AIC-APC-000 - APC.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-000 - APC/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.lua deleted file mode 100644 index d142a3b..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.lua +++ /dev/null @@ -1,18 +0,0 @@ ---- --- Name: AIC-APC-001 - APC with Cargo declared in ME --- Author: FlightControl --- Date Created: 26 Mar 2018 --- Date Checked: 01 Dec 2021 --- Changed Cargo auto tag from ~ to #, working example --- --- A demonstration of the AI_CARGO_APC class. --- This simple example transports Infantry. --- The cargo is declared with the #CARGO tag in the mission editor. --- So, within the mission, the infantry groups have the name: --- e.g. Infantry1#CARGO(T=Infantry,RR=2000,NR=25) - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local APC = GROUP:FindByName( "APC" ) -AICargoAPC = AI_CARGO_APC:New( APC, InfantryCargoSet, 500 ) -AICargoAPC:__Pickup( 5 ) - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.miz deleted file mode 100644 index 7a665b6..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/AIC-APC-001 - APC with Cargo declared in ME.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-001 - APC with Cargo declared in ME/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.lua deleted file mode 100644 index b52a229..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.lua +++ /dev/null @@ -1,12 +0,0 @@ ---- --- Name: AIC-APC-002 - APC Move by Game Master --- Author: FlightControl --- Date Created: 26 Mar 2018 --- Date Checked: 01 Jan 2021. Changed ~ to # in ME Group Names. Not sure how this is supposed to work for the Game Master - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() - -local CargoCarrier = GROUP:FindByName( "Carrier" ) - -CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 500 ) - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.miz deleted file mode 100644 index 626a6f9..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/AIC-APC-002 - APC Move by Game Master.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-002 - APC Move by Game Master/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.lua deleted file mode 100644 index 28e0bf1..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.lua +++ /dev/null @@ -1,15 +0,0 @@ ---- --- Name: AIC-APC-003 - APC Troops and Equipment --- Author: FlightControl --- Date Created: 07 Apr 2018 --- Date Checked: 01 Jan 2021 --- Not sure what the test case is - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() - -local CargoCarrier = GROUP:FindByName( "Carrier" ) - -CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 350 ) - - - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.miz deleted file mode 100644 index 20e688e..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/AIC-APC-003 - APC Troops and Equipment.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-003 - APC Troops and Equipment/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.lua deleted file mode 100644 index 9e6b30f..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: AIC-APC-004 - APC Pickup --- Author: FlightControl --- Date Created: 23 Apr 2018 --- Date Checked: 01 Jan 2021, working example, changed Deploy to async call - -BASE:TraceClass("AI_CARGO_APC") -BASE:TraceOn() - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local APC = GROUP:FindByName( "APC" ) -Cargo_APC = AI_CARGO_APC:New( APC, InfantryCargoSet, 350 ) -Cargo_APC:__Pickup( 1, ZONE:New( "Pickup" ):GetCoordinate() ) - - - ---- Loaded Handler OnAfter for Cargo_APC --- @function [parent=#Cargo_APC] OnAfterLoaded --- @param #Cargo_APC self --- @param Wrapper.Group#GROUP APC --- @param #string From --- @param #string Event --- @param #string To -function Cargo_APC:OnAfterLoaded( APC, From, Event, To ) - Cargo_APC:__Deploy( 1, ZONE:New( "Deploy" ):GetCoordinate() ) -end - - - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.miz deleted file mode 100644 index d1ee46b..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/AIC-APC-004 - APC Pickup.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-004 - APC Pickup/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-001 - Troops Relocate APC.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-001 - Troops Relocate APC.lua deleted file mode 100644 index abb399f..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-001 - Troops Relocate APC.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: AIC-APC-001 - Troops Relocate APC --- Author: FlightControl --- Date Created: 07 Apr 2018 --- Date Checked: 01 Jan 2021, working --- --- Demonstration of troops relocation when carrier is destroyed... --- Carrier will relocate to the rescue carrier. --- - -BASE:TraceClass("AI_CARGO_APC") - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() - -local CargoCarrier = GROUP:FindByName( "Carrier" ) - -CargoTroops = AI_CARGO_APC:New( CargoCarrier, InfantryCargoSet, 500 ) - - -function CargoTroops:OnAfterDestroyed( CargoCarrier ) - CargoTroops:F( { Destroyed = CargoCarrier } ) - -- The coordinate is passed where the carrier is destroyed. - local NewCarrierGroup = self:FindCarrier( CargoCarrier:GetCoordinate(), 1000 ) -- which returns one Carrier GROUP object or nil. - if NewCarrierGroup then - self:SetCarrier( NewCarrierGroup ) - self:__Pickup(1,ZONE:New("Pickup Zone"):GetCoordinate(),30) - end -end - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-006 - Troops Relocate APC.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-006 - Troops Relocate APC.miz deleted file mode 100644 index 47a367e..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/AIC-APC-006 - Troops Relocate APC.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-006 - Troops Relocate APC/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.lua deleted file mode 100644 index cea8371..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.lua +++ /dev/null @@ -1,14 +0,0 @@ ---- --- Name: AIC-APC-010 - Multiple APC --- Author: FlightControl --- Date Created: 24 Apr 2018 --- Date Checked: 01 Jan 2021, working --- - -local InfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local APC = GROUP:FindByName( "APC" ) -Cargo_APC = AI_CARGO_APC:New( APC, InfantrySet, 250 ) -Cargo_APC:__Pickup( 2 ) - - - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.miz deleted file mode 100644 index 4e69888..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/AIC-APC-010 - Multiple APC.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-010 - Multiple APC/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.lua b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.lua deleted file mode 100644 index 68ab453..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- --- Name: AIC-APC-004 - APC Pickup --- Author: FlightControl --- Date Created: 23 Apr 2018 --- Date Checked: 01 Jan 2021 - -BASE:TraceClass("AI_CARGO_APC") -BASE:TraceOn() - -local InfantryCargoSet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() - -Cargo_APC = {} - -for i = 1, 4 do - Cargo_APC[i] = AI_CARGO_APC:New( GROUP:FindByName( "APC"..i ), InfantryCargoSet, 350 ) - - --- Loaded Handler OnAfter for Cargo_APC - -- @function [parent=#Cargo_APC] OnAfterLoaded - -- @param #Cargo_APC self - -- @param Wrapper.Group#GROUP APC - -- @param #string From - -- @param #string Event - -- @param #string To - Cargo_APC[i].OnAfterLoaded = function( self, APC, From, Event, To ) - self:__Deploy( 5, ZONE:New( "Deploy" ):GetRandomCoordinate( 300, 500 ) ) - end - - --- Unloaded Handler OnAfter for Cargo_APC - -- @function [parent=#Cargo_APC] OnAfterUnloaded - -- @param #Cargo_APC self - -- @param Wrapper.Group#GROUP APC - -- @param #string From - -- @param #string Event - -- @param #string To - Cargo_APC[i].OnAfterUnloaded = function( self, APC, From, Event, To ) - self:Pickup( ZONE:New( "Pickup" ):GetRandomCoordinate( 50, 70 ) ) - end - - Cargo_APC[i]:__Pickup( i * 30, ZONE:New( "Pickup" ):GetRandomCoordinate( 50, 70 ) ) - -end - - - - diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.miz b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.miz deleted file mode 100644 index a3329c5..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/AIC-APC-011 - APC Pickup and Deploy.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/pack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/APC - Armoured Personnel Carrier/AIC-APC-011 - APC Pickup and Deploy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.lua b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.lua deleted file mode 100644 index eeff770..0000000 --- a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.lua +++ /dev/null @@ -1,38 +0,0 @@ ---- --- Name: AIC-HEL-000 - Helicopter --- Author: FlightControl --- Date Created: 13 Apr 2018 --- Date Checked: 01 Jan 2021 --- Updated Moose, needs fix #1417 to work --- -BASE:TraceClass("AI_CARGO") -BASE:TraceClass("AI_CARGO_HELICOPTER") -BASE:TraceOn() - -WorkerCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - - -for i = 1, 5 do - local WorkerGroup = GROUP:FindByName( string.format( "Infantry %03d", i ) ) - local WorkersCargo = CARGO_GROUP:New( WorkerGroup, "Workers", string.format( "Infantry %d", i ), 750, 35 ) -end - -local Helicopter = GROUP:FindByName( "Helicopter" ) - -CargoHelicopter = AI_CARGO_HELICOPTER:New( Helicopter, WorkerCargoSet ) - - -PickupZone = ZONE:New( "PickupZone" ) -DeployZones = { ZONE:New( "DeployZone Alpha" ), ZONE:New( "DeployZone Beta" ), ZONE:New( "DeployZone Gamma" ) } - -CargoHelicopter:Pickup( PickupZone:GetRandomCoordinate( 400, 100 ) ) - -function CargoHelicopter:OnAfterLoaded( Helicopter, From, Event, To, Cargo ) - CargoHelicopter:__Deploy(5,DeployZones[math.random( 1, #DeployZones ) ]:GetRandomCoordinate( 500, 100 ), math.random( 50, 250 ) ) -end - - -function CargoHelicopter:OnAfterUnloaded( Helicopter, From, Event, To, Cargo ) - CargoHelicopter:__Pickup( 5,PickupZone:GetRandomCoordinate( 500, 200 ), math.random( 50, 250 ) ) -end - diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.miz b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.miz deleted file mode 100644 index a0ca3a9..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/AIC-HEL-000 - Helicopter.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/pack.ps1 b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-000 - Helicopter/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/AIC-HEL-010 - Blue Helicopter.lua b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/AIC-HEL-010 - Blue Helicopter.lua deleted file mode 100644 index eeff770..0000000 --- a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/AIC-HEL-010 - Blue Helicopter.lua +++ /dev/null @@ -1,38 +0,0 @@ ---- --- Name: AIC-HEL-000 - Helicopter --- Author: FlightControl --- Date Created: 13 Apr 2018 --- Date Checked: 01 Jan 2021 --- Updated Moose, needs fix #1417 to work --- -BASE:TraceClass("AI_CARGO") -BASE:TraceClass("AI_CARGO_HELICOPTER") -BASE:TraceOn() - -WorkerCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - - -for i = 1, 5 do - local WorkerGroup = GROUP:FindByName( string.format( "Infantry %03d", i ) ) - local WorkersCargo = CARGO_GROUP:New( WorkerGroup, "Workers", string.format( "Infantry %d", i ), 750, 35 ) -end - -local Helicopter = GROUP:FindByName( "Helicopter" ) - -CargoHelicopter = AI_CARGO_HELICOPTER:New( Helicopter, WorkerCargoSet ) - - -PickupZone = ZONE:New( "PickupZone" ) -DeployZones = { ZONE:New( "DeployZone Alpha" ), ZONE:New( "DeployZone Beta" ), ZONE:New( "DeployZone Gamma" ) } - -CargoHelicopter:Pickup( PickupZone:GetRandomCoordinate( 400, 100 ) ) - -function CargoHelicopter:OnAfterLoaded( Helicopter, From, Event, To, Cargo ) - CargoHelicopter:__Deploy(5,DeployZones[math.random( 1, #DeployZones ) ]:GetRandomCoordinate( 500, 100 ), math.random( 50, 250 ) ) -end - - -function CargoHelicopter:OnAfterUnloaded( Helicopter, From, Event, To, Cargo ) - CargoHelicopter:__Pickup( 5,PickupZone:GetRandomCoordinate( 500, 200 ), math.random( 50, 250 ) ) -end - diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/AIC-HEL-010 - Blue Helicopter.miz b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/AIC-HEL-010 - Blue Helicopter.miz deleted file mode 100644 index c77ede2..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/AIC-HEL-010 - Blue Helicopter.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/pack.ps1 b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/HEL - Helicopter/AIC-HEL-010 - Blue Helicopter/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.lua b/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.lua deleted file mode 100644 index 80c4370..0000000 --- a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.lua +++ /dev/null @@ -1,37 +0,0 @@ ---- --- Name: AIC-PLN-000 - Airplane --- Author: FlightControl --- Date Created: 14 Apr 2018 --- Date Checked: 01 Jan 2021 --- Update to latest Moose, working --- - -VehicleCargoSet = SET_CARGO:New():FilterTypes( "Vehicles" ):FilterStart() - -for i = 1, 10 do - local WorkerGroup = GROUP:FindByName( string.format( "Vehicle #%03d", i ) ) - local WorkersCargo = CARGO_GROUP:New( WorkerGroup, "Vehicles", string.format( "Vehicle %d", i ), 5000, 35 ) - WorkersCargo:SetWeight(10000) -end - -local Airplane = GROUP:FindByName( "Airplane" ) - -CargoAirplane = AI_CARGO_AIRPLANE:New( Airplane, VehicleCargoSet ) - - -PickupAirbase = AIRBASE:FindByName( AIRBASE.Caucasus.Kobuleti ) -DeployAirbases = { AIRBASE:FindByName( AIRBASE.Caucasus.Batumi ), AIRBASE:FindByName( AIRBASE.Caucasus.Gudauta ) } - -CargoAirplane:Pickup( PickupAirbase:GetCoordinate() ) - -function CargoAirplane:OnAfterLoaded( Airplane, From, Event, To, Cargo ) - CargoAirplane:__Deploy(0.2, DeployAirbases[math.random(#DeployAirbases)]:GetCoordinate(), math.random( 500, 750 ) ) -end - - ---function CargoAirplane:OnAfterUnloaded( Airplane, From, Event, To, Cargo ) -function CargoAirplane:OnAfterDeployed(Airplane, From, Event, To, DeployZone) - CargoAirplane:__Pickup(0.2, PickupAirbase:GetCoordinate(), math.random( 500, 750 ) ) -end - - diff --git a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.miz b/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.miz deleted file mode 100644 index 4cd6413..0000000 Binary files a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/AIC-PLN-000 - Airplane.miz and /dev/null differ diff --git a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/pack.ps1 b/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/unpack.ps1 b/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AIC - AI Cargo/PLN - Airplane/AIC-PLN-000 - Airplane/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/AID-A2A-700 - Sound Check English.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/AID-A2A-700 - Sound Check English.lua deleted file mode 100644 index c44125a..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/AID-A2A-700 - Sound Check English.lua +++ /dev/null @@ -1,142 +0,0 @@ ---- --- Name: AID-A2A-100 - Demonstration --- Author: FlightControl --- Date Created: 30 May 2017 - -local HQ_Group = GROUP:FindByName( "HQ" ) -local HQ_CC = COMMANDCENTER:New( HQ_Group, "HQ" ) - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -local DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -local Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) -A2ADispatcher:SetCommandCenter( HQ_CC ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( false ) -A2ADispatcher:SetTacticalMenu( "Dispatchers", "A2A" ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 120000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27", "SQ CCCP SU-33", "SQ CCCP MIG-23MLD", "SQ CCCP MIG-25PD" }, 16 ) -A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) -A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 16 ) -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27", "SQ CCCP SU-33", "SQ CCCP MIG-23MLD", "SQ CCCP MIG-25PD", "SQ CCCP SU-34", "SQ CCCP MIG-31", "SQ CCCP MIG-29S" }, 40 ) -A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 16 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) -A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) -A2ADispatcher:SetSquadronOverhead( "Mozdok", 1 ) -A2ADispatcher:SetSquadronOverhead( "Sochi", 2 ) -A2ADispatcher:SetSquadronOverhead( "Novo", 1.5 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Mineralnye", 4 ) -A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) -A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Hot ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Sochi" ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) -A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) -A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) -A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) -A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) - - --- CAP Squadron execution. ---CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) ---A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) ---A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 6, 30, 60, 1 ) - ---CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) ---A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) ---A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - ---CAPZoneMiddle = ZONE:New( "CAP Zone Middle") ---A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) ---A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - --- GCI Squadron execution. -A2ADispatcher:SetSquadronGci2( "Mozdok", 900, 1200, 100, 100, "RADIO" ) -A2ADispatcher:SetSquadronGci2( "Novo", 900, 2100, 100, 100, "RADIO" ) -A2ADispatcher:SetSquadronGci2( "Maykop", 900, 1200, 200, 200, "RADIO" ) - --- Set the language of the squadrons to Russian. -A2ADispatcher:SetSquadronLanguage( "Mozdok", "RU" ) -A2ADispatcher:SetSquadronLanguage( "Novo", "RU" ) -A2ADispatcher:SetSquadronLanguage( "Maykop", "RU" ) - -A2ADispatcher:SetSquadronRadioFrequency( "Mozdok", 127.5 ) -A2ADispatcher:SetSquadronRadioFrequency( "Novo", 127.5 ) -A2ADispatcher:SetSquadronRadioFrequency( "Maykop", 127.5 ) - - --- Set the squadrons visible before startup. ---A2ADispatcher:SetSquadronVisible( "Mineralnye" ) ---A2ADispatcher:SetSquadronVisible( "Sochi" ) ---A2ADispatcher:SetSquadronVisible( "Mozdok" ) ---A2ADispatcher:SetSquadronVisible( "Maykop" ) ---A2ADispatcher:SetSquadronVisible( "Novo" ) - - ---CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) - - --- Blue attack simulation -local Frequency = 300 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn3 = SPAWN - :New( "RT NATO 3" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn4 = SPAWN - :New( "RT NATO 4" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/AID-A2A-700 - Sound Check English.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/AID-A2A-700 - Sound Check English.miz deleted file mode 100644 index 9597388..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/AID-A2A-700 - Sound Check English.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching API V2/AID-A2A-700 - Sound Check English/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.lua deleted file mode 100644 index 6a99afe..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: AID-008 - AI_A2A - CAP Grouping Test --- Author: FlightControl --- Date Created: 06 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" } ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200 ) -A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 10, 30, 1 ) -A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.miz deleted file mode 100644 index 4d41e94..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/AID-A2A-008 - CAP Grouping Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-008 - CAP Grouping Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.lua deleted file mode 100644 index 4d82132..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.lua +++ /dev/null @@ -1,30 +0,0 @@ ---- --- Name: AID-A2A-009 - Border Test --- Author: FlightControl --- Date Created: 06 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Setup the border zone. --- In this case the border is a POLYGON, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - -A2ADispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Sochi", 1000, 1500 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.miz deleted file mode 100644 index 57e620f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/AID-A2A-009 - Border Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-009 - Border Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.lua deleted file mode 100644 index 56a68ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.lua +++ /dev/null @@ -1,50 +0,0 @@ ---- --- Name: AID-A2A-010 - RTB and ReEngage --- Author: FlightControl --- Date Created: 30 May 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) - -A2ADispatcher:SetDefaultTakeoffFromParkingCold() -A2ADispatcher:SetDefaultLandingAtEngineShutdown() - --- Blue attack simulation - -local Frequency = 180 - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 8, 40 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - :InitDelayOn() - :SpawnScheduled( Frequency, 0.5 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.miz deleted file mode 100644 index 456064d..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/AID-A2A-010 - RTB and ReEngage.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-010 - RTB and ReEngage/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.lua deleted file mode 100644 index a3ec875..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.lua +++ /dev/null @@ -1,51 +0,0 @@ ---- --- Name: AID-A2A-011 - RTB Fuel Treshold test --- Author: FlightControl --- Date Created: 30 Jul 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Set the fuel treshold to 40%. Airplanes will return when only 40% of fuel left in the tank. -A2ADispatcher:SetDefaultFuelThreshold( 0.4 ) - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) -A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) - --- CAP Squadron execution. - -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) - -A2ADispatcher:SetSquadronTakeoffFromParkingHot("Sochi") -A2ADispatcher:SetSquadronLandingAtEngineShutdown("Sochi") - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.miz deleted file mode 100644 index f3e10b7..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/AID-A2A-011 - RTB Fuel Treshold test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-011 - RTB Fuel Treshold test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.lua deleted file mode 100644 index 4d3131a..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.lua +++ /dev/null @@ -1,51 +0,0 @@ ---- --- Name: AID-A2A-012 - CAP Time Interval Test --- Author: FlightControl --- Date Created: 30 Jul 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - - -A2ADispatcher:SetTacticalDisplay( true ) - -A2ADispatcher:SetDefaultCapLimit( 2 ) -A2ADispatcher:SetDefaultCapTimeInterval( 300, 300 ) -- Spawn each 5 minutes. - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronOverhead( "Sochi", 1 ) -A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) - --- CAP Squadron execution. - -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) - - -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) - -A2ADispatcher:SetSquadronTakeoffFromParkingHot("Sochi") -A2ADispatcher:SetSquadronLandingAtEngineShutdown("Sochi") - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.miz deleted file mode 100644 index 7878119..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/AID-A2A-012 - CAP Time Interval Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-012 - CAP Time Interval Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.lua deleted file mode 100644 index 5812b35..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- --- Name: AID-A2A-013 - Intercept Test --- Author: FlightControl --- Date Created: 31 Jul 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Test intercept. -A2ADispatcher:SetIntercept( 450 ) - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" }, 20 ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) -A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Sochi" ) - -A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Gelend" ) -A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Gelend" ) - -A2ADispatcher:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.miz deleted file mode 100644 index 0a3a72f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/AID-A2A-013 - Intercept Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-013 - Intercept Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.lua deleted file mode 100644 index 440fd29..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.lua +++ /dev/null @@ -1,48 +0,0 @@ ---- --- Name: AID-A2A-014 - DisengageRange Test --- Author: FlightControl --- Date Created: 31 Jul 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Test intercept. -A2ADispatcher:SetIntercept( 450 ) - --- Test an other disengage radius. -A2ADispatcher:SetDisengageRadius( 150000 ) - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" }, 20 ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) - - -A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Gelend" ) - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.miz deleted file mode 100644 index c57d8a4..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/AID-A2A-014 - DisengageRange Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-014 - DisengageRange Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.lua deleted file mode 100644 index 583dc9e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.lua +++ /dev/null @@ -1,53 +0,0 @@ ---- --- Name: AID-A2A-015 - Takeoff Test --- Author: FlightControl --- Date Created: 01 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Test intercept. -A2ADispatcher:SetIntercept( 450 ) - --- Test an other disengage radius. -A2ADispatcher:SetDisengageRadius( 20000 ) - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" }, 20 ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) - -A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Gelend" ) - -A2ADispatcher:SetSquadron( "Anapa", AIRBASE.Caucasus.Anapa_Vityazevo, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Anapa", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffInAir( "Anapa" ) - -A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Novo", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.miz deleted file mode 100644 index fe05fea..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/AID-A2A-015 - Takeoff Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-015 - Takeoff Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.lua deleted file mode 100644 index e55be8b..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.lua +++ /dev/null @@ -1,50 +0,0 @@ ---- --- Name: AID-A2A-016 - Refuel Tanker Test --- Author: FlightControl --- Date Created: 01 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Test intercept. -A2ADispatcher:SetIntercept( 450 ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 ) -A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 ) -A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) - - -A2ADispatcher:SetDefaultFuelThreshold( 0.9 ) -A2ADispatcher:SetDefaultTanker( "Tanker" ) - - -A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 ) -A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 ) -A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 ) -A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 ) - -A2ADispatcher:SetSquadronFuelThreshold( "Gelend", 0.8 ) -A2ADispatcher:SetSquadronTanker( "Gelend", "TankerGelend" ) - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.miz deleted file mode 100644 index 0769f3f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/AID-A2A-016 - Refuel Tanker Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-016 - Refuel Tanker Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.lua deleted file mode 100644 index c9cb820..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.lua +++ /dev/null @@ -1,44 +0,0 @@ ---- --- Name: AID-A2A-017 - Spawn Altitude Test --- Author: FlightControl --- Date Created: 05 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) - --- Set the default takeoff method in the air. -A2ADispatcher:SetDefaultTakeoffInAir() - --- Set the default takeoff altitude at 2000 meters. -A2ADispatcher:SetDefaultTakeoffInAirAltitude( 2000 ) -- Takeoff by default at 2000 meters. - - --- Spawn for Sochi airbase. -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-34" }, 20 ) -A2ADispatcher:SetSquadronCap( "Sochi", ZONE:New( "PatrolZone" ), 4000, 8000, 600, 800, 1000, 1300 ) -A2ADispatcher:SetSquadronCapInterval("Sochi", 2, 30, 600, 1 ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) - - --- Spawn for Gelend airbase. -A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-30" }, 20 ) -A2ADispatcher:SetSquadronCap( "Gelend", ZONE:New( "PatrolZoneGelend" ), 4000, 8000, 600, 800, 1000, 1300 ) -A2ADispatcher:SetSquadronCapInterval( "Gelend", 2, 30, 600, 1 ) -A2ADispatcher:SetSquadronGci( "Gelend", 900, 1200 ) - --- Let Gelend squadron take off in the air at 4000 meters. -A2ADispatcher:SetSquadronTakeoffInAir( "Gelend", 4000 ) -- Takeoff in Gelend at 4000 meters. - - --- Run the mission and observe the spawning altitudes. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.miz deleted file mode 100644 index a97bb87..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/AID-A2A-017 - Spawn Altitude Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-017 - Spawn Altitude Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.lua deleted file mode 100644 index 1b7477d..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- --- Name: AID-A2A-018 - Unlimited Resources Test --- Author: FlightControl --- Date Created: 05 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - - -A2ADispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. --- Unlimited resources, as the Resources parameter of the :SetSquadron method is not given. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP MIG-31" } ) -A2ADispatcher:SetSquadronGci( "Sochi", 900, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Sochi" ) - -A2ADispatcher:SetSquadron( "Gelend", AIRBASE.Caucasus.Gelendzhik, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Gelend", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Gelend" ) - -A2ADispatcher:SetSquadron( "Anapa", AIRBASE.Caucasus.Anapa_Vityazevo, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Anapa", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Anapa" ) - -A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Novo", 800, 1200 ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Novo" ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.miz deleted file mode 100644 index 35d17f9..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/AID-A2A-018 - Unlimited Resources Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-018 - Unlimited Resources Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.lua deleted file mode 100644 index e9a94f2..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.lua +++ /dev/null @@ -1,31 +0,0 @@ ---- --- Name: AID-A2A-019 - Engage Range Test --- Author: FlightControl --- Date Created: 06 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a radius of 50km where any airborne friendly --- without an assignment within 50km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 50000 ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27" } ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200 ) -A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 10, 30, 1 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.miz deleted file mode 100644 index 99c5c0f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/AID-A2A-019 - Engage Range Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-019 - Engage Range Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.lua deleted file mode 100644 index 958046a..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.lua +++ /dev/null @@ -1,60 +0,0 @@ ---- --- Name: AID-A2A-020 - GCI RTB and ReEngage --- Author: FlightControl --- Date Created: 30 May 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) ---A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Center, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Kras1", 900, 1200 ) - -A2ADispatcher:SetSquadron( "Kras2", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Kras2", 900, 1200 ) - -A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "May", 900, 1200 ) - - - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - -A2ADispatcher:Start() - --- Blue attack simulation - -local Frequency = 300 - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 8, 40 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - :InitDelayOn() - :SpawnScheduled( Frequency, 0.5 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.miz deleted file mode 100644 index 288fb53..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/AID-A2A-020 - GCI RTB and ReEngage.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-020 - GCI RTB and ReEngage/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.lua deleted file mode 100644 index d71552d..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.lua +++ /dev/null @@ -1,42 +0,0 @@ ---- --- Name: AID-A2A-021 - GCI Radius Test --- Author: FlightControl --- Date Created: 30 May 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - -A2ADispatcher:SetGciRadius( 100000 ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Center, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Kras1", 900, 1200 ) - -A2ADispatcher:SetSquadron( "Kras2", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Kras2", 900, 1200 ) - -A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "May", 900, 1200 ) - - - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.miz deleted file mode 100644 index 7a5147e..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/AID-A2A-021 - GCI Radius Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-021 - GCI Radius Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.lua deleted file mode 100644 index 0eb253c..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.lua +++ /dev/null @@ -1,49 +0,0 @@ ---- --- Name: AID-A2A-022 - GCI Overhead --- Author: FlightControl --- Date Created: 05 Sep 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "May", 900, 1200 ) -A2ADispatcher:SetSquadronOverhead( "May", 0.25 ) - -A2ADispatcher:SetSquadron( "Kras", AIRBASE.Caucasus.Krasnodar_Center, { "SQ CCCP SU-27" } ) -A2ADispatcher:SetSquadronGci( "Kras", 900, 1200 ) -A2ADispatcher:SetSquadronOverhead( "Kras", 1.5 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - --- Blue attack simulation - -local Frequency = 30 - -BlueSpawn2 = SPAWN - :New( "RT NATO" ) - :InitLimit( 1, 40 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - :InitDelayOn() - :SpawnScheduled( Frequency, 0.5 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.miz deleted file mode 100644 index 1ab1c98..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/AID-A2A-022 - GCI Overhead.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-022 - GCI Overhead/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.lua deleted file mode 100644 index c737f8b..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.lua +++ /dev/null @@ -1,54 +0,0 @@ ---- --- Name: AID-A2A-030 - CAP RTB and ReEngage --- Author: FlightControl --- Date Created: 30 May 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) ---Detection:BoundDetectedZones() - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 200000 ) - -A2ADispatcher:SetDisengageRadius( 200000 ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Kras1", 800, 1200, 4000, 8000, CAPZoneWest, 600, 800, 4000, 8000, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Kras1", 4, 30, 120, 1 ) - -A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCapV2( "May", 800, 1200, 400, 500, "RADIO", CAPZoneWest, 600, 800, 4000, 8000, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120, 1 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - --- Blue attack simulation - -local Frequency = 150 - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 6, 40 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - :InitDelayOn() - :SpawnScheduled( Frequency, 0.5 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.miz deleted file mode 100644 index 75e8a8d..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/AID-A2A-030 - CAP RTB and ReEngage.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-030 - CAP RTB and ReEngage/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.lua deleted file mode 100644 index 86e2345..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.lua +++ /dev/null @@ -1,35 +0,0 @@ ---- --- Name: AID-A2A-031 - CAP out of fuel --- Author: FlightControl --- Date Created: 30 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Kras1", 1, 30, 120, 1 ) - -A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCapV2( "May", 1000, 1200, 30, 30, "RADIO", CAPZoneWest, 600, 800, 4000, 8000, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120, 1 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.miz deleted file mode 100644 index 4ab1e4f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/AID-A2A-031 - CAP out of fuel.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-031 - CAP out of fuel/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.lua deleted file mode 100644 index 46d2855..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.lua +++ /dev/null @@ -1,46 +0,0 @@ ---- --- Name: AID-A2A-032 - CAP Damage --- Author: FlightControl --- Date Created: 29 Oct 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP MIG-31" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Kras1", 2, 30, 120, 1 ) - ---A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) ---CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) ---A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) ---A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120, 1 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingAtEngineShutdown() - --- Blue attack simulation - -local Frequency = 300 - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 6, 40 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - :InitDelayOn() - :SpawnScheduled( Frequency, 0.5 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.miz deleted file mode 100644 index 2c470ce..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/AID-A2A-032 - CAP Damage.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-032 - CAP Damage/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.lua deleted file mode 100644 index 9087d30..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- --- Name: AID-A2A-040 - CAP Independent Detection in EWR --- Author: FlightControl --- Date Created: 30 Aug 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) - - -A2ADispatcher:SetEngageRadius( 90000 ) --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Kras1", 4, 30, 120 ) - ---A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) ---CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) ---A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) ---A2ADispatcher:SetSquadronCapInterval( "May", 1, 30, 120 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - --- Blue attack simulation - -local Frequency = 180 - -BlueSpawn2 = SPAWN - :New( "RT NATO" ) - :InitLimit( 2, 40 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - :InitDelayOn() - :SpawnScheduled( Frequency, 0.5 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.miz deleted file mode 100644 index ee5726e..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/AID-A2A-040 - CAP Independent Detection in EWR.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-040 - CAP Independent Detection in EWR/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.lua deleted file mode 100644 index 17988a2..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.lua +++ /dev/null @@ -1,49 +0,0 @@ ---- --- Name: AID-A2A-041 - CAP Independent Detection in EWR with Clients --- Author: FlightControl --- Date Created: 01 Sep 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) -Detection:SetRefreshTimeInterval( 10 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) -A2ADispatcher:SetRefreshTimeInterval( 10 ) - - -A2ADispatcher:SetEngageRadius( 90000 ) --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" } ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Kras1", 2, 30, 120 ) - -A2ADispatcher:SetSquadron( "May", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP SU-27" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "May", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "May", 2, 30, 120 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - --- Blue attack simulation - ---local Frequency = 600 --- ---BlueSpawn2 = SPAWN --- :New( "RT NATO" ) --- :InitLimit( 2, 40 ) --- :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) --- :InitRandomizeRoute( 0, 0, 30000 ) --- :InitDelayOn() --- :SpawnScheduled( Frequency, 0.5 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.miz deleted file mode 100644 index 14c7e12..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/AID-A2A-041 - CAP Independent Detection in EWR with Clients.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-041 - CAP Independent Detection in EWR with Clients/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.lua deleted file mode 100644 index 0187eec..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.lua +++ /dev/null @@ -1,68 +0,0 @@ ---- --- Name: AID-A2A-050 - Resources --- Author: FlightControl --- Date Created: 21 Sep 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 250000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 6 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Hot ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mineralnye" ) - - --- Setup the visibility before start. -A2ADispatcher:SetSquadronVisible( "Mineralnye" ) - --- CAP Squadron execution. -CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) -A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) -A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 1, 30, 60, 1 ) -A2ADispatcher:SetSquadronFuelThreshold( "Mineralnye", 0.20 ) - --- GCI Squadron execution. ---A2ADispatcher:SetSquadronGci( "Mineralnye", 900, 1200 ) - --- Blue attack simulation -local Frequency = 60 - ---BlueSpawn1 = SPAWN --- :New( "RT NATO 1" ) --- :InitLimit( 2, 10 ) --- :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) --- :InitRandomizeRoute( 0, 0, 30000 ) --- --:InitDelayOn() --- :SpawnScheduled( Frequency, 0.4 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.miz deleted file mode 100644 index f489dc5..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/AID-A2A-050 - Resources.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-050 - Resources/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/AID-A2A-051 - Airbase Capture.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/AID-A2A-051 - Airbase Capture.lua deleted file mode 100644 index ef54610..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/AID-A2A-051 - Airbase Capture.lua +++ /dev/null @@ -1,67 +0,0 @@ ---- --- Name: AID-A2A-050 - Resources --- Author: FlightControl --- Date Created: 21 Sep 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 250000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 30 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Air ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) - - --- CAP Squadron execution. ---CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) ---A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) ---A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) - --- GCI Squadron execution. -A2ADispatcher:SetSquadronGci( "Mineralnye", 900, 1200 ) - -CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) - - --- Blue attack simulation -local Frequency = 60 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/AID-A2A-051 - Airbase Capture.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/AID-A2A-051 - Airbase Capture.miz deleted file mode 100644 index 30a6571..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/AID-A2A-051 - Airbase Capture.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-051 - Airbase Capture/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.lua deleted file mode 100644 index 8c83b27..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.lua +++ /dev/null @@ -1,67 +0,0 @@ ---- --- Name: AID-A2A-060 - Takeoff From Runway Test --- Author: FlightControl --- Date Created: 21 Sep 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 250000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27" }, 20 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Mineralnye", 1 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Runway ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) - - --- CAP Squadron execution. ---CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) ---A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) ---A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) - --- GCI Squadron execution. -A2ADispatcher:SetSquadronGci( "Mineralnye", 900, 1200 ) - -CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) - - --- Blue attack simulation -local Frequency = 60 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.miz deleted file mode 100644 index 3b38df0..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/AID-A2A-060 - Takeoff From Runway Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-060 - Takeoff From Runway Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.lua deleted file mode 100644 index e389684..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.lua +++ /dev/null @@ -1,61 +0,0 @@ ---- --- Name: AID-A2A-061 - Takeoff From Ship Runway Test --- Author: FlightControl --- Date Created: 21 Sep 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 250000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Kuznetsov", "Kuznetsov", { "SQ CCCP SU-33" }, 20 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Kuznetsov", 1.2 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Kuznetsov", 1 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Kuznetsov", AI_A2A_DISPATCHER.Takeoff.Runway ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtRunway( "Kuznetsov" ) - - --- CAP Squadron execution. ---CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) ---A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) ---A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 2, 30, 60, 1 ) - --- GCI Squadron execution. -A2ADispatcher:SetSquadronGci( "Kuznetsov", 900, 1200 ) - -CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) - - --- Blue attack simulation -local Frequency = 60 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.miz deleted file mode 100644 index 6320c14..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/AID-A2A-061 - Takeoff From Ship Runway Test.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-061 - Takeoff From Ship Runway Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.lua deleted file mode 100644 index 5b07594..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.lua +++ /dev/null @@ -1,39 +0,0 @@ ---- --- Name: AID-A2A-070 - CAP - Player Exit --- Author: FlightControl --- Date Created: 30 Oct 2017 --- --- Test Scenario(s): --- --- Now take a seat in the client plane as a player. --- Do the following tests after the plane has been spawned. --- 1. Immediately exit the plane. --- 2. Only exit the plane once the defender is engaged. --- 3. Let the defender shoot you. --- In all these scenarios, observe if the defender is continuing its patrol. - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Kras1", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Kras1", 1, 30, 120, 1 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.miz deleted file mode 100644 index 30018be..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/AID-A2A-070 - CAP - Player Exit.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-070 - CAP - Player Exit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.lua deleted file mode 100644 index bac60cd..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.lua +++ /dev/null @@ -1,37 +0,0 @@ ---- --- Name: AID-A2A-071 - GCI - Player Exit --- Author: FlightControl --- Date Created: 30 Oct 2017 --- --- Test Scenario(s): --- --- Now take a seat in the client plane as a player. --- Do the following tests after the plane has been spawned. --- 1. Immediately exit the plane. --- 2. Only exit the plane once the defender is engaged. --- 3. Let the defender shoot you. --- In all these scenarios, observe if the defender is returning to base. - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - -A2ADispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2ADispatcher:SetSquadron( "Kras1", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "SQ CCCP SU-27" }, 20 ) -A2ADispatcher:SetSquadronGci( "Kras1", 800, 1200 ) - -A2ADispatcher:SetDefaultTakeoffInAir() -A2ADispatcher:SetDefaultLandingNearAirbase() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.miz deleted file mode 100644 index 2e3b27b..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/AID-A2A-071 - GCI - Player Exit.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-071 - GCI - Player Exit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.lua deleted file mode 100644 index 5655009..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.lua +++ /dev/null @@ -1,128 +0,0 @@ ---- --- Name: AID-A2A-100 - Demonstration --- Author: FlightControl --- Date Created: 30 May 2017 - - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 120000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27", "SQ CCCP SU-33", "SQ CCCP MIG-23MLD", "SQ CCCP MIG-25PD" }, 16 ) -A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) -A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 16 ) -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27", "SQ CCCP SU-33", "SQ CCCP MIG-23MLD", "SQ CCCP MIG-25PD", "SQ CCCP SU-34", "SQ CCCP MIG-31", "SQ CCCP MIG-29S" }, 40 ) -A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 16 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) -A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) -A2ADispatcher:SetSquadronOverhead( "Mozdok", 1 ) -A2ADispatcher:SetSquadronOverhead( "Sochi", 2 ) -A2ADispatcher:SetSquadronOverhead( "Novo", 1.5 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Mineralnye", 4 ) -A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) -A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Hot ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Sochi" ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) -A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) -A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) -A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) -A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) - - --- CAP Squadron execution. -CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) -A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) -A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 6, 30, 60, 1 ) - -CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) -A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - -CAPZoneMiddle = ZONE:New( "CAP Zone Middle") -A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) -A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - --- GCI Squadron execution. -A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 ) -A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 ) -A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 ) - --- Set the squadrons visible before startup. -A2ADispatcher:SetSquadronVisible( "Mineralnye" ) -A2ADispatcher:SetSquadronVisible( "Sochi" ) -A2ADispatcher:SetSquadronVisible( "Mozdok" ) -A2ADispatcher:SetSquadronVisible( "Maykop" ) ---A2ADispatcher:SetSquadronVisible( "Novo" ) - - ---CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) - - --- Blue attack simulation -local Frequency = 300 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn3 = SPAWN - :New( "RT NATO 3" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn4 = SPAWN - :New( "RT NATO 4" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.miz deleted file mode 100644 index 725b241..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/AID-A2A-100 - Demonstration.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-100 - Demonstration/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/AID-A2A-190 - Communication.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/AID-A2A-190 - Communication.lua deleted file mode 100644 index 6125a77..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/AID-A2A-190 - Communication.lua +++ /dev/null @@ -1,131 +0,0 @@ ---- --- Name: AID-A2A-100 - Demonstration --- Author: FlightControl --- Date Created: 30 May 2017 - - -local CommandCenter = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "HQ" ) - --- Define a SET_GROUP object that builds a collection of groups that define the EWR network. --- Here we build the network with all the groups that have a name starting with DF CCCP AWACS and DF CCCP EWR. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "DF CCCP AWACS", "DF CCCP EWR" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) -A2ADispatcher:SetCommandCenter(CommandCenter) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - --- Initialize the dispatcher, setting up a radius of 100km where any airborne friendly --- without an assignment within 100km radius from a detected target, will engage that target. -A2ADispatcher:SetEngageRadius( 120000 ) - --- Setup the squadrons. -A2ADispatcher:SetSquadron( "Mineralnye", AIRBASE.Caucasus.Mineralnye_Vody, { "SQ CCCP SU-27", "SQ CCCP SU-33", "SQ CCCP MIG-23MLD", "SQ CCCP MIG-25PD" }, 16 ) -A2ADispatcher:SetSquadron( "Maykop", AIRBASE.Caucasus.Maykop_Khanskaya, { "SQ CCCP MIG-31" }, 20 ) -A2ADispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, { "SQ CCCP MIG-31" }, 16 ) -A2ADispatcher:SetSquadron( "Sochi", AIRBASE.Caucasus.Sochi_Adler, { "SQ CCCP SU-27", "SQ CCCP SU-33", "SQ CCCP MIG-23MLD", "SQ CCCP MIG-25PD", "SQ CCCP SU-34", "SQ CCCP MIG-31", "SQ CCCP MIG-29S" }, 40 ) -A2ADispatcher:SetSquadron( "Novo", AIRBASE.Caucasus.Novorossiysk, { "SQ CCCP SU-27" }, 16 ) - --- Setup the overhead -A2ADispatcher:SetSquadronOverhead( "Mineralnye", 1.2 ) -A2ADispatcher:SetSquadronOverhead( "Maykop", 1 ) -A2ADispatcher:SetSquadronOverhead( "Mozdok", 1 ) -A2ADispatcher:SetSquadronOverhead( "Sochi", 2 ) -A2ADispatcher:SetSquadronOverhead( "Novo", 1.5 ) - --- Setup the Grouping -A2ADispatcher:SetSquadronGrouping( "Mineralnye", 4 ) -A2ADispatcher:SetSquadronGrouping( "Sochi", 2 ) -A2ADispatcher:SetSquadronGrouping( "Novo", 3 ) - --- Setup the Takeoff methods -A2ADispatcher:SetSquadronTakeoff( "Mineralnye", AI_A2A_DISPATCHER.Takeoff.Hot ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Sochi" ) -A2ADispatcher:SetSquadronTakeoffFromRunway( "Mozdok" ) -A2ADispatcher:SetSquadronTakeoffFromParkingCold( "Maykop" ) -A2ADispatcher:SetSquadronTakeoffFromParkingHot( "Novo" ) - --- Setup the Landing methods -A2ADispatcher:SetSquadronLandingAtRunway( "Mineralnye" ) -A2ADispatcher:SetSquadronLandingNearAirbase( "Sochi" ) -A2ADispatcher:SetSquadronLandingAtEngineShutdown( "Mozdok" ) -A2ADispatcher:SetSquadronLandingNearAirbase( "Maykop" ) -A2ADispatcher:SetSquadronLanding( "Novo", AI_A2A_DISPATCHER.Landing.AtRunway ) - - --- CAP Squadron execution. ---CAPZoneEast = ZONE_POLYGON:New( "CAP Zone East", GROUP:FindByName( "CAP Zone East" ) ) ---A2ADispatcher:SetSquadronCap( "Mineralnye", CAPZoneEast, 4000, 10000, 500, 600, 800, 900 ) ---A2ADispatcher:SetSquadronCapInterval( "Mineralnye", 6, 30, 60, 1 ) - ---CAPZoneWest = ZONE_POLYGON:New( "CAP Zone West", GROUP:FindByName( "CAP Zone West" ) ) ---A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) ---A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - ---CAPZoneMiddle = ZONE:New( "CAP Zone Middle") ---A2ADispatcher:SetSquadronCap( "Maykop", CAPZoneMiddle, 4000, 8000, 600, 800, 800, 1200, "RADIO" ) ---A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) - --- GCI Squadron execution. -A2ADispatcher:SetSquadronGci( "Mozdok", 900, 1200 ) -A2ADispatcher:SetSquadronGci( "Novo", 900, 2100 ) -A2ADispatcher:SetSquadronGci( "Maykop", 900, 1200 ) - --- Set the squadrons visible before startup. ---A2ADispatcher:SetSquadronVisible( "Mineralnye" ) ---A2ADispatcher:SetSquadronVisible( "Sochi" ) ---A2ADispatcher:SetSquadronVisible( "Mozdok" ) ---A2ADispatcher:SetSquadronVisible( "Maykop" ) ---A2ADispatcher:SetSquadronVisible( "Novo" ) - - ---CleanUp = CLEANUP_AIRBASE:New( { AIRBASE.Caucasus.Novorossiysk } ) - - --- Blue attack simulation -local Frequency = 300 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn3 = SPAWN - :New( "RT NATO 3" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn4 = SPAWN - :New( "RT NATO 4" ) - :InitLimit( 2, 10 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/AID-A2A-190 - Communication.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/AID-A2A-190 - Communication.miz deleted file mode 100644 index c020bf5..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/AID-A2A-190 - Communication.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-190 - Communication/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.lua deleted file mode 100644 index aa67365..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.lua +++ /dev/null @@ -1,75 +0,0 @@ ---- --- Name: AID-A2A-200 - GCICAP Demonstration --- Author: FlightControl --- Date Created: 05 July 2017 - - --- Setup the A2A dispatcher, and initialize it. -A2ADispatcher = AI_A2A_GCICAP:New( { "DF CCCP" }, { "SQ CCCP" }, { "CAP Zone" }, 2 ) - --- Enable the tactical display panel. -A2ADispatcher:SetTacticalDisplay( true ) - --- Initialize the dispatcher, setting up a border zone. This is a polygon, --- which takes the waypoints of a late activated group with the name CCCP Border as the boundaries of the border area. --- Any enemy crossing this border will be engaged. -CCCPBorderZone = ZONE_POLYGON:New( "CCCP Border", GROUP:FindByName( "CCCP Border" ) ) -A2ADispatcher:SetBorderZone( CCCPBorderZone ) - - - -A2ADispatcher:SetDefaultTakeoffFromParkingCold() -A2ADispatcher:SetDefaultLandingAtEngineShutdown() -A2ADispatcher:SetDefaultFuelThreshold( 0.20 ) -A2ADispatcher:SetIntercept( 100 ) -A2ADispatcher:SetDisengageRadius( 100000 ) -A2ADispatcher:SetEngageRadius( 50000 ) -A2ADispatcher:SetGciRadius( 100000 ) - -A2ADispatcher:Start() - -------------------------------- - - - - - - - - - --- Blue attack simulation -local Frequency = 600 - -BlueSpawn1 = SPAWN - :New( "RT NATO 1" ) - :InitLimit( 2, 3 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn2 = SPAWN - :New( "RT NATO 2" ) - :InitLimit( 2, 3 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn3 = SPAWN - :New( "RT NATO 3" ) - :InitLimit( 2, 3 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - -BlueSpawn4 = SPAWN - :New( "RT NATO 4" ) - :InitLimit( 2, 3 ) - :InitRandomizeTemplate( { "SQ NATO A-10C", "SQ NATO F-15C", "SQ NATO F-16A", "SQ NATO F/A-18", "SQ NATO F-16C" } ) - :InitRandomizeRoute( 0, 0, 30000 ) - --:InitDelayOn() - :SpawnScheduled( Frequency, 0.4 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.miz deleted file mode 100644 index 28fc038..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/AID-A2A-200 - GCICAP Demonstration.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-200 - GCICAP Demonstration/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.lua deleted file mode 100644 index 2111443..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.lua +++ /dev/null @@ -1,54 +0,0 @@ - - --- RED - ---- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. -A2A_GCICAP_Red = AI_A2A_GCICAP:New( { "RED EWR" }, { "4477th" }, { }, 2 ) - -A2A_GCICAP_Red:SetBorderZone( ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) ) ) - --- Enable the tactical display panel. This is to see what this dispatcher is doing. ---A2A_GCICAP_Red:SetTacticalDisplay( true ) - - --- Initialize the dispatcher, setting up a radius of 150km where any airborne friendly --- without an assignment within 150km radius from a detected target, will engage that target. -A2A_GCICAP_Red:SetEngageRadius( 150000 ) - --- The default take-off method is planes takeoff right in the air. --- Here we specify to take off from a parking space, with engines already running. -A2A_GCICAP_Red:SetSquadronTakeoffFromParkingHot( AIRBASE.Nevada.Tonopah_Test_Range_Airfield ) ---A2A_GCICAP_Red:SetSquadronTakeoffFromParkingHot( "Groom Lake AFB" ) - - --- BLUE - - ---- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. --- EWR network groups start with BLUE EWR. --- Squadron templates which are placed above the colored airbase, start with 104th or 105th or 106th. --- Perform CAP in a polygon zone placed near 104th, which is Nellis. --- Perform 2 CAP. -A2A_GCICAP_Blue = AI_A2A_GCICAP:New( { "BLUE EWR" }, { "104th", "105th", "106th" }, { "104th CAP" }, 2 ) - -A2A_GCICAP_Blue:SetBorderZone( ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) ) ) - --- Enable the tactical display panel. This is to see what this dispatcher is doing. ---A2A_GCICAP_Blue:SetTacticalDisplay( true ) - - --- Initialize the dispatcher, setting up a radius of 150km where any airborne friendly --- without an assignment within 150km radius from a detected target, will engage that target. -A2A_GCICAP_Blue:SetEngageRadius( 150000 ) - --- The default take-off method is planes takeoff right in the air. --- Here we specify other take off options. -A2A_GCICAP_Blue:SetSquadronTakeoffFromRunway( AIRBASE.Nevada.Boulder_City_Airport ) -- Takeoff from the runway. -A2A_GCICAP_Blue:SetSquadronTakeoffFromParkingCold( AIRBASE.Nevada.McCarran_International_Airport ) -- Takeoff from parking spot, with engines shut off. ---A2A_GCICAP_Blue:SetSquadronTakeoffFromParkingHot( AIRBASE.Nevada.Nellis_AFB ) -- Takaeoff from parking spot, engines running. - --- The Nellis airbase contains a squadron that flies an F-5... Less modern airplane. --- So it needs a stronger "overhead". -A2A_GCICAP_Blue:SetSquadronOverhead( AIRBASE.Nevada.Nellis_AFB, 2 ) -- When 2 airplanes are attacking, we spawn 4 airplanes for defense. -A2A_GCICAP_Blue:SetSquadronGrouping( AIRBASE.Nevada.Nellis_AFB, 2 ) -- We group the spawned defence airplanes per 2 units. - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.miz deleted file mode 100644 index f7c0d95..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/AID-A2A-210 - GCICAP Demonstration.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-210 - GCICAP Demonstration/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - AI_A2A_GCICAP Demonstration.lua b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - AI_A2A_GCICAP Demonstration.lua deleted file mode 100644 index b394c5a..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - AI_A2A_GCICAP Demonstration.lua +++ /dev/null @@ -1,27 +0,0 @@ - - --- RED - ---- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. --- EWR network groups start with RED EWR, which are ships and patrols. --- Squadron templates which are placed above the colored airbases, start with TR SQ. --- Perform CAP, the zone for CAP starts with TR CAP, send minimal 10 groups of planes in the air. -A2A_GCICAP_Red = AI_A2A_GCICAP:New( { "TR SQ"}, { "TR SQ" }, { "TR CAP" }, 10 ) - -A2A_GCICAP_Red:SetBorderZone( ZONE_POLYGON:New( "Red Border", GROUP:FindByName( "Red Border" ) ) ) - --- Enable the tactical display panel. This is to see what this dispatcher is doing. ---A2A_GCICAP_Red:SetTacticalDisplay( true ) - --- BLUE - ---- Setup the Red Coalition A2A GCICAP dispatcher, and initialize it. --- EWR network groups start with BLUE EWR. --- Squadron templates which are placed above the colored airbases, start with UK SQ. --- Perform no CAP. -A2A_GCICAP_Blue = AI_A2A_GCICAP:New( { "BLUE EWR" }, { "UK SQ" }, { }, 2 ) - -A2A_GCICAP_Blue:SetBorderZone( ZONE_POLYGON:New( "Blue Border", GROUP:FindByName( "Blue Border" ) ) ) - - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - GCICAP Demonstration.miz b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - GCICAP Demonstration.miz deleted file mode 100644 index 5a9f9f6..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/AID-A2A-220 - GCICAP Demonstration.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2A - AI A2A Dispatching/AID-A2A-220 - GCICAP Demonstration/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/AID-A2G-001 - Detection and Engage.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/AID-A2G-001 - Detection and Engage.lua deleted file mode 100644 index 15e4dcc..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/AID-A2G-001 - Detection and Engage.lua +++ /dev/null @@ -1,56 +0,0 @@ ---- Detect and attack a set of enemy units. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -local DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -DetectionSetGroup:FilterStart() - -local Detection = DETECTION_AREAS:New( DetectionSetGroup, 5000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- The Command Center (HQ) is the defense point and will also handle the communication to the coalition. -local HQ_Group = GROUP:FindByName( "HQ" ) -local HQ_CC = COMMANDCENTER:New( HQ_Group, "HQ" ) - --- The HQ is the defense point, so this point will be defended. -A2GDispatcher:AddDefenseCoordinate( "HQ", HQ_Group:GetCoordinate() ) -A2GDispatcher:SetDefenseReactivityHigh() -- High defense reactivity. So far proximity of a threat will trigger a defense action. -A2GDispatcher:SetDefenseRadius( 200000 ) -- Defense radius wide enough to also trigger defenses far away. - --- Communication to the players within the coalition. The HQ services the communication of the defense actions. -A2GDispatcher:SetCommandCenter( HQ_CC ) - --- Show a tactical display. -A2GDispatcher:SetTacticalDisplay( true ) - - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCas2( "Maykop CAS", 200, 250, 300, 500, "RADIO" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP MIL-8MTV" }, 10 ) -A2GDispatcher:SetSquadronBai2( "Maykop BAI", 200, 250, 300, 500, "RADIO" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - -A2GDispatcher:SetSquadron( "Krasnodar", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "CCCP SU-25TM" }, 10 ) -A2GDispatcher:SetSquadronSead2( "Krasnodar", 600, 800, 2000, 2000, "RADIO" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Krasnodar" ) -A2GDispatcher:SetSquadronOverhead( "Krasnodar", 0.2 ) - - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Krasnodar", 10 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/AID-A2G-001 - Detection and Engage.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/AID-A2G-001 - Detection and Engage.miz deleted file mode 100644 index f6dbd85..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/AID-A2G-001 - Detection and Engage.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-001 - Detection and Engage/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/AID-A2G-002 - Patrol during Detection and Engage.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/AID-A2G-002 - Patrol during Detection and Engage.lua deleted file mode 100644 index 19dbf08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/AID-A2G-002 - Patrol during Detection and Engage.lua +++ /dev/null @@ -1,66 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -local DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -DetectionSetGroup:FilterStart() - -local Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- The Command Center (HQ) is the defense point and will also handle the communication to the coalition. -local HQ_Group = GROUP:FindByName( "HQ" ) -local HQ_CC = COMMANDCENTER:New( HQ_Group, "HQ" ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", HQ_Group:GetCoordinate() ) -A2GDispatcher:SetDefenseReactivityHigh() -- High defense reactivity. So far proximity of a threat will trigger a defense action. -A2GDispatcher:SetDefenseRadius( 200000 ) -- Defense radius wide enough to also trigger defenses far away. - --- Communication to the players within the coalition. The HQ services the communication of the defense actions. -A2GDispatcher:SetCommandCenter( HQ_CC ) - --- Show a tactical display. -A2GDispatcher:SetTacticalDisplay( true ) - - --- Setup the patrols. - --- The patrol zone. -local PatrolZone = ZONE:New( "PatrolZone" ) - - --- SEADing from Krasnodar. -A2GDispatcher:SetSquadron( "Krasnodar", AIRBASE.Caucasus.Krasnodar_Pashkovsky, { "CCCP SU-25TM" }, 10 ) -A2GDispatcher:SetSquadronSeadPatrol2( "Krasnodar", PatrolZone, 500, 550, 2000, 2000, "BARO", 750, 800, 30, 30, "RADIO" ) -- New API -A2GDispatcher:SetSquadronSeadPatrolInterval( "Krasnodar", 2, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Krasnodar" ) -A2GDispatcher:SetSquadronOverhead( "Krasnodar", 0.2 ) - - --- Close Air Support from the CAS farp. -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCasPatrol2( "Maykop CAS", PatrolZone, 50, 80, 600, 700, "BARO", 200, 230, 30, 30, "RADIO" ) -- New API -A2GDispatcher:SetSquadronCasPatrolInterval( "Maykop CAS", 2, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - --- Battlefield Air Interdiction from the BAI farp. -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP MIL-8MTV" }, 10 ) -A2GDispatcher:SetSquadronBaiPatrol2( "Maykop BAI", PatrolZone, 50, 80, 600, 700, "BARO", 200, 230, 800, 900, "RADIO" ) -- New API -A2GDispatcher:SetSquadronBaiPatrolInterval( "Maykop BAI", 5, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.75 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Krasnodar", 10 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/AID-A2G-002 - Patrol during Detection and Engage.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/AID-A2G-002 - Patrol during Detection and Engage.miz deleted file mode 100644 index af0945a..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/AID-A2G-002 - Patrol during Detection and Engage.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching API V2/AID-A2G-002 - Patrol during Detection and Engage/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/AID-A2G-001 - Detection and Attack Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/AID-A2G-001 - Detection and Attack Helicopters.lua deleted file mode 100644 index 5118b7f..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/AID-A2G-001 - Detection and Attack Helicopters.lua +++ /dev/null @@ -1,48 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 5000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 200000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.2 ) - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCas( "Maykop CAS", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/AID-A2G-001 - Detection and Attack Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/AID-A2G-001 - Detection and Attack Helicopters.miz deleted file mode 100644 index c05a7b0..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/AID-A2G-001 - Detection and Attack Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-001 - Detection and Attack Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/AID-A2G-002 - Patrol and Engage Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/AID-A2G-002 - Patrol and Engage Helicopters.lua deleted file mode 100644 index 82403dd..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/AID-A2G-002 - Patrol and Engage Helicopters.lua +++ /dev/null @@ -1,52 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", "SEAD", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 300, 500, 50, 80, 250, 300 ) -A2GDispatcher:SetSquadronPatrolInterval( "Maykop SEAD", 2, 30, 60, 1, "SEAD" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCasPatrol( "Maykop CAS", PatrolZone, 600, 700, 50, 80, 250, 300 ) -A2GDispatcher:SetSquadronPatrolInterval( "Maykop CAS", 2, 30, 60, 1, "CAS" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronBaiPatrol( "Maykop BAI", PatrolZone, 800, 900, 50, 80, 250, 300 ) -A2GDispatcher:SetSquadronPatrolInterval( "Maykop BAI", 2, 30, 60, 1, "BAI" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) \ No newline at end of file diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/AID-A2G-002 - Patrol and Engage Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/AID-A2G-002 - Patrol and Engage Helicopters.miz deleted file mode 100644 index 8fa2984..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/AID-A2G-002 - Patrol and Engage Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-002 - Patrol and Engage Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/AID-A2G-003 - Detection and Attack one Group Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/AID-A2G-003 - Detection and Attack one Group Helicopters.lua deleted file mode 100644 index 75ce3f0..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/AID-A2G-003 - Detection and Attack one Group Helicopters.lua +++ /dev/null @@ -1,52 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - - -CC = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "HQ" ) - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) -A2GDispatcher:SetCommandCenter( CC ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 200000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.2 ) - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCas( "Maykop CAS", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/AID-A2G-003 - Detection and Attack one Group Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/AID-A2G-003 - Detection and Attack one Group Helicopters.miz deleted file mode 100644 index 72f2097..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/AID-A2G-003 - Detection and Attack one Group Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-003 - Detection and Attack one Group Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-004 - Detection and attack close defense point Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-004 - Detection and attack close defense point Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-004 - Detection and attack close defense point Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-004 - Detection and attack close defense point Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-004 - Detection and attack close defense point Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-004 - Detection and attack close defense point Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/AID-A2G-100 - DefenseRadius.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/AID-A2G-100 - DefenseRadius.lua deleted file mode 100644 index 3354a20..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/AID-A2G-100 - DefenseRadius.lua +++ /dev/null @@ -1,50 +0,0 @@ ---- Test the defense radius. --- Defenses should pickup targets within the defense radius, but not outside of it! --- Defenses should engage targets closer to the HQ with higher probability than targets at longer distance from the HQ. --- The tests are with SEAD only. --- Name: AID-A2G-003 - DefenseRadius --- Author: FlightControl --- Date Created: 11 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the SEAD squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T SEAD" }, 10 ) -A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) -A2GDispatcher:SetSquadronSeadPatrolInterval( "Maykop SEAD", 1, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffInAir( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) - --- Setup the CAS squadrons. -A2GDispatcher:SetSquadron( "Maykop CAS", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T CAS" }, 10 ) -A2GDispatcher:SetSquadronCasPatrol( "Maykop CAS", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) -A2GDispatcher:SetSquadronCasPatrolInterval( "Maykop CAS", 1, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffInAir( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/AID-A2G-100 - DefenseRadius.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/AID-A2G-100 - DefenseRadius.miz deleted file mode 100644 index f02a769..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/AID-A2G-100 - DefenseRadius.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-100 - DefenseRadius/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/AID-A2G-110 - Default Engage Limit.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/AID-A2G-110 - Default Engage Limit.lua deleted file mode 100644 index 4b77c74..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/AID-A2G-110 - Default Engage Limit.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- Test the default engage limit. --- Defenses should engage enemy units, but not more defenses than the defense limit! --- Name: AID-A2G-110 - Default DefenseLimit --- Author: FlightControl --- Date Created: 15 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - --- This is the test, not more than 4 defenses in total should engage! -A2GDispatcher:SetDefaultEngageLimit( 6 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T SEAD" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 250, 350 ) ---A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) ---A2GDispatcher:SetSquadronSeadPatrolInterval( "Maykop SEAD", 4, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffInAir( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/AID-A2G-110 - Default Engage Limit.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/AID-A2G-110 - Default Engage Limit.miz deleted file mode 100644 index a77012b..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/AID-A2G-110 - Default Engage Limit.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-110 - Default Engage Limit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/AID-A2G-190 - Communication.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/AID-A2G-190 - Communication.lua deleted file mode 100644 index bcf6fe2..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/AID-A2G-190 - Communication.lua +++ /dev/null @@ -1,80 +0,0 @@ ---- Test the communication system to other players. --- A command center will facilitate the A2G defenses communication to the players, who reporting to the same command center. --- The task system needs to be used to have this reporting facilitated. --- Name: AID-A2G-190 - Communication --- Author: FlightControl --- Date Created: 11 Jan 2019 - --- Define a command center that will communicate with the players. -CC_Red = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "Command" ) - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection_Red = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -AI_A2G_Dispatcher_Red = AI_A2G_DISPATCHER:New( Detection_Red ) - - - - --- Add defense coordinates. -AI_A2G_Dispatcher_Red:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -AI_A2G_Dispatcher_Red:SetDefenseReactivityHigh() - -AI_A2G_Dispatcher_Red:SetDefenseRadius( 100000 ) - --- This is the test, not more than 4 defenses in total should engage! -AI_A2G_Dispatcher_Red:SetDefaultEngageLimit( 6 ) - -AI_A2G_Dispatcher_Red:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. - --- SEAD -AI_A2G_Dispatcher_Red:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP AI SU-25T SEAD #001", "CCCP AI SU-25T SEAD #002", "CCCP AI SU-25T SEAD #003" }, 10 ) -AI_A2G_Dispatcher_Red:SetSquadronSead( "Maykop SEAD", 600, 800 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -AI_A2G_Dispatcher_Red:SetSquadronOverhead( "Maykop SEAD", 0.2 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) - --- CAS -AI_A2G_Dispatcher_Red:SetSquadron( "Maykop CAS", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP AI SU-25T CAS" }, 10 ) -AI_A2G_Dispatcher_Red:SetSquadronCas( "Maykop CAS", 600, 800 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -AI_A2G_Dispatcher_Red:SetSquadronOverhead( "Maykop CAS", 0.25 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) - --- BAI -AI_A2G_Dispatcher_Red:SetSquadron( "Maykop BAI", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP AI SU-25T BAI" }, 10 ) -AI_A2G_Dispatcher_Red:SetSquadronBai( "Maykop BAI", 600, 800 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -AI_A2G_Dispatcher_Red:SetSquadronOverhead( "Maykop BAI", 0.25 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) - - - - --- Now we setup the TASK A2G dispatcher, that will use the same detection system, as the AI A2G dispatcher! -Mission_Red = MISSION:New( CC_Red, "Comms Demo", "Example", "This mission demonstrates the communications between the AI A2G dispatcher and the TASK A2G dispatcher to the involved players.", coalition.side.RED ) -Players_Red = SET_GROUP:New():FilterPrefixes( "CCCP Player" ):FilterStart() -Task_A2G_Dispatcher_Red = TASK_A2G_DISPATCHER:New( Mission_Red, Players_Red, Detection_Red ) -Task_A2G_Dispatcher_Red:Start() - --- Here we set the command center, which will faciliate the communication to the Players_Red, using the same Detection_Red. -AI_A2G_Dispatcher_Red:SetCommandCenter( CC_Red ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/AID-A2G-190 - Communication.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/AID-A2G-190 - Communication.miz deleted file mode 100644 index 1341165..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/AID-A2G-190 - Communication.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-190 - Communication/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/AID-A2G-191 - Communication Engage One Unit.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/AID-A2G-191 - Communication Engage One Unit.lua deleted file mode 100644 index 7162634..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/AID-A2G-191 - Communication Engage One Unit.lua +++ /dev/null @@ -1,63 +0,0 @@ ---- Test the communication system to other players. --- A command center will facilitate the A2G defenses communication to the players, who reporting to the same command center. --- The task system needs to be used to have this reporting facilitated. --- --- Author: FlightControl --- Date Created: 20 Jan 2019 - --- Define a command center that will communicate with the players. -CC_Red = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "Command" ) - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection_Red = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -AI_A2G_Dispatcher_Red = AI_A2G_DISPATCHER:New( Detection_Red ) - - - - --- Add defense coordinates. -AI_A2G_Dispatcher_Red:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -AI_A2G_Dispatcher_Red:SetDefenseReactivityHigh() - -AI_A2G_Dispatcher_Red:SetDefenseRadius( 100000 ) - --- This is the test, not more than 4 defenses in total should engage! -AI_A2G_Dispatcher_Red:SetDefaultEngageLimit( 6 ) - -AI_A2G_Dispatcher_Red:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. - --- SEAD -AI_A2G_Dispatcher_Red:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP AI SU-25T SEAD #001", "CCCP AI SU-25T SEAD #002", "CCCP AI SU-25T SEAD #003" }, 10 ) -AI_A2G_Dispatcher_Red:SetSquadronSead( "Maykop SEAD", 600, 800 ) -AI_A2G_Dispatcher_Red:SetSquadronOverhead( "Maykop SEAD", 0.2 ) -AI_A2G_Dispatcher_Red:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) - - --- Now we setup the TASK A2G dispatcher, that will use the same detection system, as the AI A2G dispatcher! -Mission_Red = MISSION:New( CC_Red, "Comms Demo", "Example", "This mission demonstrates the communications between the AI A2G dispatcher and the TASK A2G dispatcher to the involved players.", coalition.side.RED ) -Players_Red = SET_GROUP:New():FilterPrefixes( "CCCP Player" ):FilterStart() -Task_A2G_Dispatcher_Red = TASK_A2G_DISPATCHER:New( Mission_Red, Players_Red, Detection_Red ) -Task_A2G_Dispatcher_Red:Start() - --- Here we set the command center, which will faciliate the communication to the Players_Red, using the same Detection_Red. -AI_A2G_Dispatcher_Red:SetCommandCenter( CC_Red ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/AID-A2G-191 - Communication Engage One Unit.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/AID-A2G-191 - Communication Engage One Unit.miz deleted file mode 100644 index ba55c29..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/AID-A2G-191 - Communication Engage One Unit.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-191 - Communication Engage One Unit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/AID-A2G-210 - Depart from Ramp.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/AID-A2G-210 - Depart from Ramp.lua deleted file mode 100644 index dec2870..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/AID-A2G-210 - Depart from Ramp.lua +++ /dev/null @@ -1,42 +0,0 @@ ---- Test the default engage limit. --- Defenses should engage enemy units, but not more defenses than the defense limit! --- Name: AID-A2G-110 - Default DefenseLimit --- Author: FlightControl --- Date Created: 15 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T SEAD" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 250, 350 ) ---A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) ---A2GDispatcher:SetSquadronSeadPatrolInterval( "Maykop SEAD", 4, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffFromParkingCold( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/AID-A2G-210 - Depart from Ramp.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/AID-A2G-210 - Depart from Ramp.miz deleted file mode 100644 index c5c5317..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/AID-A2G-210 - Depart from Ramp.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-210 - Depart from Ramp/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/AID-A2G-211 - Depart from Hot.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/AID-A2G-211 - Depart from Hot.lua deleted file mode 100644 index d7f26d9..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/AID-A2G-211 - Depart from Hot.lua +++ /dev/null @@ -1,42 +0,0 @@ ---- Test the default engage limit. --- Defenses should engage enemy units, but not more defenses than the defense limit! --- Name: AID-A2G-110 - Default DefenseLimit --- Author: FlightControl --- Date Created: 15 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T SEAD" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 250, 350 ) ---A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) ---A2GDispatcher:SetSquadronSeadPatrolInterval( "Maykop SEAD", 4, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/AID-A2G-211 - Depart from Hot.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/AID-A2G-211 - Depart from Hot.miz deleted file mode 100644 index cd41585..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/AID-A2G-211 - Depart from Hot.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-211 - Depart from Hot/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/AID-A2G-212 - Depart from Runway.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/AID-A2G-212 - Depart from Runway.lua deleted file mode 100644 index d22dd6a..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/AID-A2G-212 - Depart from Runway.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- Test the default engage limit. --- Defenses should engage enemy units, but not more defenses than the defense limit! --- Name: AID-A2G-110 - Default DefenseLimit --- Author: FlightControl --- Date Created: 15 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - --- This is the test, not more than 4 defenses in total should engage! -A2GDispatcher:SetDefaultEngageLimit( 6 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T SEAD" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 250, 350 ) ---A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) ---A2GDispatcher:SetSquadronSeadPatrolInterval( "Maykop SEAD", 4, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffFromRunway( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/AID-A2G-212 - Depart from Runway.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/AID-A2G-212 - Depart from Runway.miz deleted file mode 100644 index c997f58..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/AID-A2G-212 - Depart from Runway.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-212 - Depart from Runway/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/AID-A2G-213 - Depart from Air.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/AID-A2G-213 - Depart from Air.lua deleted file mode 100644 index 4b77c74..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/AID-A2G-213 - Depart from Air.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- Test the default engage limit. --- Defenses should engage enemy units, but not more defenses than the defense limit! --- Name: AID-A2G-110 - Default DefenseLimit --- Author: FlightControl --- Date Created: 15 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - --- This is the test, not more than 4 defenses in total should engage! -A2GDispatcher:SetDefaultEngageLimit( 6 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T SEAD" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 250, 350 ) ---A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) ---A2GDispatcher:SetSquadronSeadPatrolInterval( "Maykop SEAD", 4, 30, 60, 1 ) -A2GDispatcher:SetSquadronTakeoffInAir( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/AID-A2G-213 - Depart from Air.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/AID-A2G-213 - Depart from Air.miz deleted file mode 100644 index d2d5ba0..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/AID-A2G-213 - Depart from Air.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-213 - Depart from Air/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/AID-A2G-250 - Visible before start.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/AID-A2G-250 - Visible before start.lua deleted file mode 100644 index 0adcd7b..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/AID-A2G-250 - Visible before start.lua +++ /dev/null @@ -1,48 +0,0 @@ ---- Test the default engage limit. --- Defenses should engage enemy units, but not more defenses than the defense limit! --- Name: AID-A2G-110 - Default DefenseLimit --- Author: FlightControl --- Date Created: 15 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -- Defene a set of group objects, caled DetectionSetGroup. - -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -- The DetectionSetGroup will search for groups that start with the name "CCCP Recce". - --- This command will start the dynamic filtering, so when groups spawn in or are destroyed, --- which have a group name starting with "CCCP Recce", then these will be automatically added or removed from the set. -DetectionSetGroup:FilterStart() - --- This command defines the reconnaissance network. --- It will group any detected ground enemy targets within a radius of 1km. --- It uses the DetectionSetGroup, which defines the set of reconnaissance groups to detect for enemy ground targets. -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 200000 ) - --- This is the test, not more than 4 defenses in total should engage! -A2GDispatcher:SetDefaultEngageLimit( 6 ) - -A2GDispatcher:SetTacticalDisplay( true ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Krymsk SEAD", AIRBASE.Caucasus.Krymsk, { "CCCP SEAD Su-30", "CCCP SEAD Su-25T", "CCCP SEAD Su-25TM", "CCCP SEAD Su-34" }, 20 ) -A2GDispatcher:SetSquadronSead( "Krymsk SEAD", 600, 800 ) ---A2GDispatcher:SetSquadronSeadPatrol( "Krymsk SEAD", PatrolZone, 1000, 2500, 400, 600, 1100, 1500 ) ---A2GDispatcher:SetSquadronSeadPatrolInterval( "Krymsk SEAD", 4, 30, 60, 1 ) -A2GDispatcher:SetSquadronOverhead( "Krymsk SEAD", 0.2 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Krymsk SEAD" ) -A2GDispatcher:SetSquadronLandingAtEngineShutdown( "Krymsk SEAD" ) - ---A2GDispatcher:SetSquadronVisible( "Krymsk SEAD" ) \ No newline at end of file diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/AID-A2G-250 - Visible before start.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/AID-A2G-250 - Visible before start.miz deleted file mode 100644 index 4823b15..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/AID-A2G-250 - Visible before start.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-250 - Visible before start/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/AID-A2G-300 - CAS Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/AID-A2G-300 - CAS Helicopters.lua deleted file mode 100644 index 91bf32f..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/AID-A2G-300 - CAS Helicopters.lua +++ /dev/null @@ -1,31 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Sq34", "FARP CAS", { "Defender" }, 10 ) -A2GDispatcher:SetSquadronCas( "Sq34", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.75 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/AID-A2G-300 - CAS Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/AID-A2G-300 - CAS Helicopters.miz deleted file mode 100644 index a0e6c7d..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/AID-A2G-300 - CAS Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-300 - CAS Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/AID-A2G-310 - CAS Helicopters Patrol.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/AID-A2G-310 - CAS Helicopters Patrol.lua deleted file mode 100644 index 9a4a75f..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/AID-A2G-310 - CAS Helicopters Patrol.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) -A2GDispatcher:SetSquadron( "Sq34", "FARP CAS", { "Defender" }, 10 ) -A2GDispatcher:SetSquadronCasPatrol( "Sq34", CASPatrolZone, 200, 500, 70, 100, 250, 300 ) -A2GDispatcher:SetSquadronCasPatrolInterval( "Sq34", 2, 30, 60 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/AID-A2G-310 - CAS Helicopters Patrol.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/AID-A2G-310 - CAS Helicopters Patrol.miz deleted file mode 100644 index 228e653..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/AID-A2G-310 - CAS Helicopters Patrol.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-310 - CAS Helicopters Patrol/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/AID-A2G-350 - CAS Airplanes.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/AID-A2G-350 - CAS Airplanes.lua deleted file mode 100644 index 3e5beef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/AID-A2G-350 - CAS Airplanes.lua +++ /dev/null @@ -1,61 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - -Detection:SetFriendliesRange( 20000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - --- Setup the squadron Sq34. -A2GDispatcher:SetSquadron( "Sq34", AIRBASE.Caucasus.Vaziani, { "Defender Sq34" }, 10 ) - --- This will setup the squadron Sq34 for CAS from Vaziani. --- Attack speed between 1000 and 1500 km/h. --- Attack altitude between 4000 and 6000 meters. -A2GDispatcher:SetSquadronCas( "Sq34", 1000, 1500, 4000, 6000 ) - - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) - --- For every 2 targets, there will be one plane spawned, so we give a 0.5 value. -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.5 ) - - --- Setup the squadron Sq25. -A2GDispatcher:SetSquadron( "Sq25", AIRBASE.Caucasus.Soganlug, { "Defender Sq25" }, 10 ) - --- This will setup the squadron Sq34 for CAS from Vaziani. --- No additional altitude and speed parameters are given, so the defaults are assigned. --- Default speed between 50% and 75% of the maximum speed of the units in the group. --- Default altitude is between 1000 and 1500 meters. -A2GDispatcher:SetSquadronCas( "Sq25" ) - - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq25" ) - --- For every 2 targets, there will be one plane spawned, so we give a 0.5 value. -A2GDispatcher:SetSquadronOverhead( "Sq25", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/AID-A2G-350 - CAS Airplanes.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/AID-A2G-350 - CAS Airplanes.miz deleted file mode 100644 index 79b88b4..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/AID-A2G-350 - CAS Airplanes.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-350 - CAS Airplanes/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/AID-A2G-351 - CAS Airplanes.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/AID-A2G-351 - CAS Airplanes.lua deleted file mode 100644 index 5fc04b7..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/AID-A2G-351 - CAS Airplanes.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - -Detection:SetFriendliesRange( 20000 ) --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 250000 ) - - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) - --- Setup the squadron Sq25. -A2GDispatcher:SetSquadron( "Sq25", AIRBASE.Caucasus.Beslan, { "Defender" }, 10 ) - --- This will setup the squadron Sq34 for CAS from Beslan. --- No additional altitude and speed parameters are given, so the defaults are assigned. --- Default speed between 50% and 75% of the maximum speed of the units in the group. --- Default altitude is between 1000 and 1500 meters. -A2GDispatcher:SetSquadronCas( "Sq25" ) - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq25" ) - --- For every 2 targets, there will be one plane spawned. -A2GDispatcher:SetSquadronOverhead( "Sq25", 0.5 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/AID-A2G-351 - CAS Airplanes.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/AID-A2G-351 - CAS Airplanes.miz deleted file mode 100644 index 6e559a6..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/AID-A2G-351 - CAS Airplanes.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-351 - CAS Airplanes/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/AID-A2G-352 - CAS Airplanes.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/AID-A2G-352 - CAS Airplanes.lua deleted file mode 100644 index bbaa5be..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/AID-A2G-352 - CAS Airplanes.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- --- Author: FlightControl --- Date Created: 23 Jan 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - -Detection:SetFriendliesRange( 20000 ) --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 250000 ) - - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) - --- Setup the squadron Sq25. -A2GDispatcher:SetSquadron( "Sq26", AIRBASE.Caucasus.Nalchik, { "Defender" }, 10 ) - --- This will setup the squadron Sq34 for CAS from Beslan. --- No additional altitude and speed parameters are given, so the defaults are assigned. --- Default speed between 50% and 75% of the maximum speed of the units in the group. --- Default altitude is between 1000 and 1500 meters. -A2GDispatcher:SetSquadronCas( "Sq26" ) - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq26" ) - --- For every 2 targets, there will be one plane spawned. -A2GDispatcher:SetSquadronOverhead( "Sq26", 0.20 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/AID-A2G-352 - CAS Airplanes.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/AID-A2G-352 - CAS Airplanes.miz deleted file mode 100644 index 4e33c88..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/AID-A2G-352 - CAS Airplanes.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-352 - CAS Airplanes/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/AID-A2G-360 - CAS Airplanes Patrol.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/AID-A2G-360 - CAS Airplanes Patrol.lua deleted file mode 100644 index 5ebff04..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/AID-A2G-360 - CAS Airplanes Patrol.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) - --- Setup the squadron Sq34. -A2GDispatcher:SetSquadron( "Sq34", AIRBASE.Caucasus.Vaziani, { "Defender" }, 10 ) - --- This will setup the squadron Sq34 for patrol and CAS from Vaziani. -A2GDispatcher:SetSquadronCasPatrol( "Sq34", CASPatrolZone, 1500, 2500, 600, 800, 800, 1200 ) - --- Maximum 6 units for patrol, with a spawn interval between 30 and 60 seconds. -A2GDispatcher:SetSquadronCasPatrolInterval( "Sq34", 2, 30, 60 ) - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) - --- For every 4 targets, there will be one plane spawned. -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/AID-A2G-360 - CAS Airplanes Patrol.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/AID-A2G-360 - CAS Airplanes Patrol.miz deleted file mode 100644 index 9de8161..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/AID-A2G-360 - CAS Airplanes Patrol.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-360 - CAS Airplanes Patrol/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/AID-A2G-361 - CAS Airplanes Patrol.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/AID-A2G-361 - CAS Airplanes Patrol.lua deleted file mode 100644 index 97a124f..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/AID-A2G-361 - CAS Airplanes Patrol.lua +++ /dev/null @@ -1,40 +0,0 @@ --- Date Created: 09 Mar 2019 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) - --- Setup the squadron Sq34. -A2GDispatcher:SetSquadron( "Sq34", AIRBASE.Caucasus.Vaziani, { "Defender" }, 10 ) - --- This will setup the squadron Sq34 for patrol and CAS from Vaziani. -A2GDispatcher:SetSquadronCasPatrol( "Sq34", CASPatrolZone, 1500, 2500, 600, 800, 800, 1200 ) - --- Maximum 6 units for patrol, with a spawn interval between 30 and 60 seconds. ---A2GDispatcher:SetSquadronCasPatrolInterval( "Sq34", 2, 30, 60 ) - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) - --- For every 4 targets, there will be one plane spawned. -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/AID-A2G-361 - CAS Airplanes Patrol.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/AID-A2G-361 - CAS Airplanes Patrol.miz deleted file mode 100644 index 2a462e6..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/AID-A2G-361 - CAS Airplanes Patrol.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-361 - CAS Airplanes Patrol/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/AID-A2G-362 - CAS Airplanes Patrol Visible.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/AID-A2G-362 - CAS Airplanes Patrol Visible.lua deleted file mode 100644 index 08614f8..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/AID-A2G-362 - CAS Airplanes Patrol Visible.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) - --- Setup the squadron Sq34 at Kutaisi, using template Defender for 10 units. -A2GDispatcher:SetSquadron( "Sq34", AIRBASE.Caucasus.Kutaisi, { "Defender" }, 10 ) - --- This will setup the squadron Sq34 for patrol and CAS. -A2GDispatcher:SetSquadronCasPatrol( "Sq34", CASPatrolZone, 1500, 2500, 600, 800, 800, 1200 ) - --- Maximum 2 units for patrol, with a spawn interval between 30 and 60 seconds. -A2GDispatcher:SetSquadronCasPatrolInterval( "Sq34", 2, 30, 60 ) - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) - --- For every 4 targets, there will be one plane spawned. -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.25 ) - --- Make planes visible before start ... -A2GDispatcher:SetSquadronVisible( "Sq34" ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/AID-A2G-362 - CAS Airplanes Patrol Visible.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/AID-A2G-362 - CAS Airplanes Patrol Visible.miz deleted file mode 100644 index 6ae79bd..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/AID-A2G-362 - CAS Airplanes Patrol Visible.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-362 - CAS Airplanes Patrol Visible/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/AID-A2G-363 - CAS Airplanes Patrol Refuel.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/AID-A2G-363 - CAS Airplanes Patrol Refuel.lua deleted file mode 100644 index 7ec4ae9..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/AID-A2G-363 - CAS Airplanes Patrol Refuel.lua +++ /dev/null @@ -1,44 +0,0 @@ --- Date Created: 09 Mar 2019 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -local CASPatrolZone = ZONE:New( "CASPatrolZone" ) - --- Setup the squadron Sq34. -A2GDispatcher:SetSquadron( "Sq34", AIRBASE.Caucasus.Vaziani, { "Defender" }, 10 ) - --- This will setup the squadron Sq34 for patrol and CAS from Vaziani. -A2GDispatcher:SetSquadronCasPatrol( "Sq34", CASPatrolZone, 1500, 2500, 600, 800, 800, 1200 ) - --- Maximum 6 units for patrol, with a spawn interval between 30 and 60 seconds. ---A2GDispatcher:SetSquadronCasPatrolInterval( "Sq34", 2, 30, 60 ) - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) - --- For every 4 targets, there will be one plane spawned. -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.25 ) - -A2GDispatcher:SetDefaultTanker( "Tanker" ) -A2GDispatcher:SetDefaultFuelThreshold( 0.9 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/AID-A2G-363 - CAS Airplanes Patrol Refuel.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/AID-A2G-363 - CAS Airplanes Patrol Refuel.miz deleted file mode 100644 index db169c2..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/AID-A2G-363 - CAS Airplanes Patrol Refuel.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-363 - CAS Airplanes Patrol Refuel/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/AID-A2G-400 - BAI Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/AID-A2G-400 - BAI Helicopters.lua deleted file mode 100644 index e90889b..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/AID-A2G-400 - BAI Helicopters.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Author: FlightControl --- Date Created: 27 Jan 2019 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "CCCP Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityMedium() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50 BAI" }, 10 ) -A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250, 1000, 1500 ) -A2GDispatcher:SetSquadronTakeoffFromParkingCold( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - --- Wait for each helicopter to spawn about 4 minutes from cold start. --- So the FARP has 4 spots, that means every 60 seconds one helo. --- Otherwise the FARP will clutter. --- This will result in helicopters not guided properly by the dispatcher. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/AID-A2G-400 - BAI Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/AID-A2G-400 - BAI Helicopters.miz deleted file mode 100644 index 8cd76c6..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/AID-A2G-400 - BAI Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-400 - BAI Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/AID-A2G-550 - SEAD Airplanes.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/AID-A2G-550 - SEAD Airplanes.lua deleted file mode 100644 index 0282694..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/AID-A2G-550 - SEAD Airplanes.lua +++ /dev/null @@ -1,61 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- --- Author: FlightControl --- Date Created: 23 Jan 2018 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "Recce" } ) -DetectionSetGroup:FilterStart() - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 20000 ) - -Detection:SetFriendliesRange( 20000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 200000 ) - - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - --- Setup the squadron Sq34. -A2GDispatcher:SetSquadron( "Sq34", AIRBASE.Caucasus.Vaziani, { "Defender Sq34" }, 10 ) - --- This will setup the squadron Sq34 for SEAD from Vaziani. --- Attack speed between 1000 and 1500 km/h. --- Attack altitude between 4000 and 6000 meters. -A2GDispatcher:SetSquadronSead( "Sq34", 600, 800, 4500, 6000 ) - - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq34" ) - --- For every 2 targets, there will be one plane spawned, so we give a 0.5 value. -A2GDispatcher:SetSquadronOverhead( "Sq34", 0.5 ) - - --- Setup the squadron Sq25. -A2GDispatcher:SetSquadron( "Sq25", AIRBASE.Caucasus.Soganlug, { "Defender Sq25" }, 10 ) - --- This will setup the squadron Sq34 for CAS from Vaziani. --- No additional altitude and speed parameters are given, so the defaults are assigned. --- Default speed between 50% and 75% of the maximum speed of the units in the group. --- Default altitude is between 1000 and 1500 meters. -A2GDispatcher:SetSquadronCas( "Sq25" ) - - --- Start from airbase hot. -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Sq25" ) - --- For every 2 targets, there will be one plane spawned, so we give a 0.5 value. -A2GDispatcher:SetSquadronOverhead( "Sq25", 0.25 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/AID-A2G-550 - SEAD Airplanes.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/AID-A2G-550 - SEAD Airplanes.miz deleted file mode 100644 index e72eda9..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/AID-A2G-550 - SEAD Airplanes.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-550 - SEAD Airplanes/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/AID-A2G-600 - Detection Zones and Attack Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/AID-A2G-600 - Detection Zones and Attack Helicopters.lua deleted file mode 100644 index 2394330..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/AID-A2G-600 - Detection Zones and Attack Helicopters.lua +++ /dev/null @@ -1,46 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - - - -local DetectionZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone " } ):FilterOnce() - -Detection = DETECTION_ZONES:New( DetectionZones, coalition.side.BLUE ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 200000 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.2 ) - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCas( "Maykop CAS", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/AID-A2G-600 - Detection Zones and Attack Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/AID-A2G-600 - Detection Zones and Attack Helicopters.miz deleted file mode 100644 index 6f57136..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/AID-A2G-600 - Detection Zones and Attack Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-600 - Detection Zones and Attack Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/AID-A2G-601 - Detection Zones and Defense Limit.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/AID-A2G-601 - Detection Zones and Defense Limit.lua deleted file mode 100644 index 0350aa5..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/AID-A2G-601 - Detection Zones and Defense Limit.lua +++ /dev/null @@ -1,48 +0,0 @@ ---- Detect and attack a set of enemy units using helicopters. --- Name: AID-A2G-001 - Detection and Attack Helicopters --- Author: FlightControl --- Date Created: 02 Nov 2018 - - - -local DetectionZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone " } ):FilterOnce() - -Detection = DETECTION_ZONES:New( DetectionZones, coalition.side.BLUE ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 200000 ) - -A2GDispatcher:SetDefenseLimit( 1 ) - -A2GDispatcher:SetTacticalDisplay( true ) - --- Setup the squadrons. - -A2GDispatcher:SetSquadron( "Maykop SEAD", AIRBASE.Caucasus.Maykop_Khanskaya, { "CCCP SU-25T" }, 10 ) -A2GDispatcher:SetSquadronSead( "Maykop SEAD", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.2 ) - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronCas( "Maykop CAS", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "CCCP KA-50" }, 10 ) -A2GDispatcher:SetSquadronBai( "Maykop BAI", 120, 250 ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/AID-A2G-601 - Detection Zones and Defense Limit.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/AID-A2G-601 - Detection Zones and Defense Limit.miz deleted file mode 100644 index 922b95f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/AID-A2G-601 - Detection Zones and Defense Limit.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-601 - Detection Zones and Defense Limit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/AID-A2G-702 - Patrol and Engage Sound Check.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/AID-A2G-702 - Patrol and Engage Sound Check.lua deleted file mode 100644 index f710b92..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/AID-A2G-702 - Patrol and Engage Sound Check.lua +++ /dev/null @@ -1,60 +0,0 @@ ---- Sound check using patrol and engage for helicopters. --- Author: FlightControl --- Date Created: 14 Sep 2019 - --- Define a SET_GROUP object that builds a collection of groups that define the recce network. --- Here we build the network with all the groups that have a name starting with CCCP Recce. -DetectionSetGroup = SET_GROUP:New() -DetectionSetGroup:FilterPrefixes( { "US Recce" } ) -DetectionSetGroup:FilterStart() - -CCGroup = GROUP:FindByName( "HQ" ) -CC = COMMANDCENTER:New( CCGroup, "HQ" ) - -Detection = DETECTION_AREAS:New( DetectionSetGroup, 1000 ) - --- Setup the A2A dispatcher, and initialize it. -A2GDispatcher = AI_A2G_DISPATCHER:New( Detection ) - -A2GDispatcher:SetCommandCenter( CC ) -A2GDispatcher:SetTacticalMenu( "Dispatchers", "A2G Tactical Situation" ) - --- Add defense coordinates. -A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ" ):GetCoordinate() ) - -A2GDispatcher:SetDefenseReactivityHigh() - -A2GDispatcher:SetDefenseRadius( 100000 ) - -A2GDispatcher:SetTacticalDisplay( false ) - -local PatrolZone = ZONE:New( "PatrolZone" ) - --- Setup the squadrons. -A2GDispatcher:SetSquadron( "Maykop SEAD", "SEAD", { "US KA-50" }, 10 ) -A2GDispatcher:SetSquadronSeadPatrol( "Maykop SEAD", PatrolZone, 300, 500, 50, 80, 250, 300 ) -A2GDispatcher:SetSquadronPatrolInterval( "Maykop SEAD", 2, 30, 60, 1, "SEAD" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop SEAD" ) -A2GDispatcher:SetSquadronOverhead( "Maykop SEAD", 0.25 ) -A2GDispatcher:SetSquadronRadioFrequency( "Maykop SEAD", 124 ) - -A2GDispatcher:SetSquadron( "Maykop CAS", "CAS", { "US KA-50" }, 10 ) -A2GDispatcher:SetSquadronCasPatrol( "Maykop CAS", PatrolZone, 600, 700, 50, 80, 250, 300 ) -A2GDispatcher:SetSquadronPatrolInterval( "Maykop CAS", 2, 30, 60, 1, "CAS" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop CAS" ) -A2GDispatcher:SetSquadronOverhead( "Maykop CAS", 0.25 ) -A2GDispatcher:SetSquadronRadioFrequency( "Maykop CAS", 126 ) - -A2GDispatcher:SetSquadron( "Maykop BAI", "BAI", { "US KA-50" }, 10 ) -A2GDispatcher:SetSquadronBaiPatrol( "Maykop BAI", PatrolZone, 800, 900, 50, 80, 250, 300 ) -A2GDispatcher:SetSquadronPatrolInterval( "Maykop BAI", 2, 30, 60, 1, "BAI" ) -A2GDispatcher:SetSquadronTakeoffFromParkingHot( "Maykop BAI" ) -A2GDispatcher:SetSquadronOverhead( "Maykop BAI", 0.25 ) -A2GDispatcher:SetSquadronRadioFrequency( "Maykop BAI", 128 ) - --- We set for each squadron a takeoff interval, as each helicopter will launch from a FARP. --- This to prevent helicopters to clutter. --- Each helicopter group is taking off the FARP in hot start. -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop SEAD", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop CAS", 60 ) -A2GDispatcher:SetSquadronTakeoffInterval( "Maykop BAI", 60 ) \ No newline at end of file diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/AID-A2G-702 - Patrol and Engage Sound Check.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/AID-A2G-702 - Patrol and Engage Sound Check.miz deleted file mode 100644 index 7803319..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/AID-A2G-702 - Patrol and Engage Sound Check.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-702 - Patrol and Engage Sound Check/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.lua deleted file mode 100644 index b3f5f71..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.lua +++ /dev/null @@ -1,28 +0,0 @@ - -Recce_Blue = SET_GROUP:New():FilterPrefixes( "RECCE" ):FilterStart() - -Detection_Blue = DETECTION_AREAS:New( Recce_Blue, 3000 ) - -A2G_Blue = AI_A2G_DISPATCHER:New(Detection_Blue) - -A2G_Blue:SetTacticalDisplay( true ) -- set on using true as a parameter - -DefenseCoordinate = GROUP:FindByName( "COMMAND" ):GetCoordinate() - -A2G_Blue:AddDefenseCoordinate( "Defense Point", DefenseCoordinate ) -A2G_Blue:SetDefenseRadius( 200000 ) -- in meters -A2G_Blue:SetDefenseReactivityHigh() -- we engage almost immediately - -A2G_Blue:SetSquadron( "SQ-1", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-AH-64D-ROCKETS", "A2G-DEFENSE-AH-64D-HELLFIRES" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-1", 200, 280, 160, 500 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-1", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-1" ) -A2G_Blue:SetSquadronOverhead( "SQ-1", 0.25 ) - -A2G_Blue:SetSquadron( "SQ-2", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-AH-SU-25T-SEAD" }, 6 ) -A2G_Blue:SetSquadronSead( "SQ-2", 600, 900, 1000, 2000 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-2", 2000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-2" ) -A2G_Blue:SetSquadronOverhead( "SQ-2", 0.5 ) - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.miz deleted file mode 100644 index ede7efa..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-900 - A fun A2G Mission/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.lua deleted file mode 100644 index b3f5f71..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-900 - A fun A2G Mission.lua +++ /dev/null @@ -1,28 +0,0 @@ - -Recce_Blue = SET_GROUP:New():FilterPrefixes( "RECCE" ):FilterStart() - -Detection_Blue = DETECTION_AREAS:New( Recce_Blue, 3000 ) - -A2G_Blue = AI_A2G_DISPATCHER:New(Detection_Blue) - -A2G_Blue:SetTacticalDisplay( true ) -- set on using true as a parameter - -DefenseCoordinate = GROUP:FindByName( "COMMAND" ):GetCoordinate() - -A2G_Blue:AddDefenseCoordinate( "Defense Point", DefenseCoordinate ) -A2G_Blue:SetDefenseRadius( 200000 ) -- in meters -A2G_Blue:SetDefenseReactivityHigh() -- we engage almost immediately - -A2G_Blue:SetSquadron( "SQ-1", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-AH-64D-ROCKETS", "A2G-DEFENSE-AH-64D-HELLFIRES" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-1", 200, 280, 160, 500 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-1", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-1" ) -A2G_Blue:SetSquadronOverhead( "SQ-1", 0.25 ) - -A2G_Blue:SetSquadron( "SQ-2", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-AH-SU-25T-SEAD" }, 6 ) -A2G_Blue:SetSquadronSead( "SQ-2", 600, 900, 1000, 2000 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-2", 2000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-2" ) -A2G_Blue:SetSquadronOverhead( "SQ-2", 0.5 ) - - diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-901 - A fun A2G Mission.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-901 - A fun A2G Mission.lua deleted file mode 100644 index 090e4a6..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-901 - A fun A2G Mission.lua +++ /dev/null @@ -1,35 +0,0 @@ - -Recce_Blue = SET_GROUP:New():FilterPrefixes( "RECCE" ):FilterStart() - -Detection_Blue = DETECTION_AREAS:New( Recce_Blue, 3000 ) - -A2G_Blue = AI_A2G_DISPATCHER:New(Detection_Blue) - -A2G_Blue:SetTacticalDisplay( true ) -- set on using true as a parameter - -A2G_Blue:AddDefenseCoordinate( "Command", GROUP:FindByName( "COMMAND" ):GetCoordinate() ) -A2G_Blue:AddDefenseCoordinate( "Home", GROUP:FindByName( "HOME" ):GetCoordinate() ) - - -A2G_Blue:SetDefenseRadius( 200000 ) -- in meters -A2G_Blue:SetDefenseReactivityHigh() -- we engage almost immediately - -A2G_Blue:SetSquadron( "SQ-1", AIRBASE.Caucasus.Senaki_Kolkhi, { "A2G-DEFENSE-HELO-001", "A2G-DEFENSE-HELO-002", "A2G-DEFENSE-HELO-003" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-1", 200, 280, 160, 500 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-1", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-1" ) -A2G_Blue:SetSquadronOverhead( "SQ-1", 0.25 ) - -A2G_Blue:SetSquadron( "SQ-2", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-SU-25T-SEAD" }, 10 ) -A2G_Blue:SetSquadronSead( "SQ-2", 600, 900, 1000, 2000 ) -A2G_Blue:SetSquadronTakeoffFromParkingHot( "SQ-2" ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingAtRunway( "SQ-2" ) -A2G_Blue:SetSquadronOverhead( "SQ-2", 0.5 ) - -A2G_Blue:SetSquadron( "SQ-3", AIRBASE.Caucasus.Kobuleti, { "A2G-DEFENSE-AJS37-CAS" }, 6 ) -A2G_Blue:SetSquadronBai( "SQ-3", 600, 900, 1000, 2000 ) -A2G_Blue:SetSquadronTakeoffFromParkingHot( "SQ-3" ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingAtRunway( "SQ-3" ) -A2G_Blue:SetSquadronOverhead( "SQ-3", 0.5 ) -A2G_Blue:SetSquadronBaiPatrol( "SQ-3", ZONE:New( "PatrolZone" ), 2000, 3000, 600, 800, 1000, 1400 ) -A2G_Blue:SetSquadronPatrolInterval( "SQ-3", 4, 30, 60, 1, "BAI" ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-901 - A fun A2G Mission.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-901 - A fun A2G Mission.miz deleted file mode 100644 index 057b2f4..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/AID-A2G-901 - A fun A2G Mission.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-901 - A fun A2G Mission/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/AID-A2G-902 - A fun A2G Mission.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/AID-A2G-902 - A fun A2G Mission.lua deleted file mode 100644 index cda06f4..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/AID-A2G-902 - A fun A2G Mission.lua +++ /dev/null @@ -1,44 +0,0 @@ - -Recce_Blue = SET_GROUP:New():FilterPrefixes( "RECCE" ):FilterStart() - -Detection_Blue = DETECTION_AREAS:New( Recce_Blue, 3000 ) - -A2G_Blue = AI_A2G_DISPATCHER:New(Detection_Blue) - -A2G_Blue:SetTacticalDisplay( true ) -- set on using true as a parameter - -A2G_Blue:AddDefenseCoordinate( "Command", GROUP:FindByName( "COMMAND" ):GetCoordinate() ) -A2G_Blue:AddDefenseCoordinate( "Home", GROUP:FindByName( "HOME" ):GetCoordinate() ) - - -A2G_Blue:SetDefenseRadius( 350000 ) -- in meters -A2G_Blue:SetDefenseReactivityMedium() -- we engage almost immediately - -A2G_Blue:SetSquadron( "SQ-1", AIRBASE.Caucasus.Senaki_Kolkhi, { "A2G-DEFENSE-HELO-001", "A2G-DEFENSE-HELO-002", "A2G-DEFENSE-HELO-003" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-1", 200, 280, 160, 500 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-1", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-1" ) -A2G_Blue:SetSquadronOverhead( "SQ-1", 0.5 ) -A2G_Blue:SetSquadronGrouping( "SQ-1", 4 ) - -A2G_Blue:SetSquadron( "SQ-HELO", AIRBASE.Caucasus.Sukhumi_Babushara, { "A2G-DEFENSE-HELO-004", "A2G-DEFENSE-HELO-005", "A2G-DEFENSE-HELO-006" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-HELO", 200, 280, 1500, 2000 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-HELO", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-HELO" ) -A2G_Blue:SetSquadronOverhead( "SQ-HELO", 0.75 ) -A2G_Blue:SetSquadronGrouping( "SQ-HELO", 4 ) - -A2G_Blue:SetSquadron( "SQ-2", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-SU-25T-SEAD" }, 10 ) -A2G_Blue:SetSquadronSead( "SQ-2", 700, 1100, 2500, 4000 ) -A2G_Blue:SetSquadronTakeoffFromParkingHot( "SQ-2" ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingAtRunway( "SQ-2" ) -A2G_Blue:SetSquadronOverhead( "SQ-2", 0.5 ) - -A2G_Blue:SetSquadron( "SQ-AIR", AIRBASE.Caucasus.Kobuleti, { "A2G-DEFENSE-A-10C-CAS" }, 6 ) -A2G_Blue:SetSquadronBai( "SQ-AIR", 600, 900, 1000, 2000 ) -A2G_Blue:SetSquadronTakeoffFromParkingHot( "SQ-AIR" ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingAtRunway( "SQ-AIR" ) -A2G_Blue:SetSquadronOverhead( "SQ-AIR", 0.75 ) -A2G_Blue:SetSquadronBaiPatrol( "SQ-AIR", ZONE:New( "PatrolZone" ), 2000, 3000, 600, 800, 1000, 1400 ) -A2G_Blue:SetSquadronPatrolInterval( "SQ-AIR", 4, 30, 60, 1, "BAI" ) -A2G_Blue:SetSquadronGrouping( "SQ-AIR", 4 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/AID-A2G-902 - A fun A2G Mission.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/AID-A2G-902 - A fun A2G Mission.miz deleted file mode 100644 index 8b3fe62..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/AID-A2G-902 - A fun A2G Mission.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-902 - A fun A2G Mission/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/AID-A2G-903 - A fun A2G Mission.lua b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/AID-A2G-903 - A fun A2G Mission.lua deleted file mode 100644 index 31108d1..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/AID-A2G-903 - A fun A2G Mission.lua +++ /dev/null @@ -1,56 +0,0 @@ - -Recce_Blue = SET_GROUP:New():FilterPrefixes( "RECCE" ):FilterStart() - -Detection_Blue = DETECTION_AREAS:New( Recce_Blue, 3000 ) - -A2G_Blue = AI_A2G_DISPATCHER:New(Detection_Blue) - -A2G_Blue:SetTacticalDisplay( true ) -- set on using true as a parameter - -A2G_Blue:AddDefenseCoordinate( "Command", GROUP:FindByName( "COMMAND" ):GetCoordinate() ) -A2G_Blue:AddDefenseCoordinate( "Home", GROUP:FindByName( "HOME" ):GetCoordinate() ) - - -A2G_Blue:SetDefenseRadius( 350000 ) -- in meters -A2G_Blue:SetDefenseReactivityMedium() -- we engage almost immediately - -A2G_Blue:SetSquadron( "SQ-HELO-BAI-1", AIRBASE.Caucasus.Senaki_Kolkhi, { "A2G-DEFENSE-HELO-001", "A2G-DEFENSE-HELO-002", "A2G-DEFENSE-HELO-003" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-HELO-BAI-1", 200, 280, 160, 500 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-HELO-BAI-1", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-HELO-BAI-1" ) -A2G_Blue:SetSquadronOverhead( "SQ-HELO-BAI-1", 0.5 ) -A2G_Blue:SetSquadronGrouping( "SQ-HELO-BAI-1", 4 ) - -A2G_Blue:SetSquadron( "SQ-HELO-BAI-2", AIRBASE.Caucasus.Sukhumi_Babushara, { "A2G-DEFENSE-HELO-004", "A2G-DEFENSE-HELO-005", "A2G-DEFENSE-HELO-006" }, 20 ) -A2G_Blue:SetSquadronBai( "SQ-HELO-BAI-2", 200, 280, 1500, 2000 ) -A2G_Blue:SetSquadronTakeoffInAir( "SQ-HELO-BAI-2", 1000 ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingNearAirbase( "SQ-HELO-BAI-2" ) -A2G_Blue:SetSquadronOverhead( "SQ-HELO-BAI-2", 0.75 ) -A2G_Blue:SetSquadronGrouping( "SQ-HELO-BAI-2", 4 ) - -A2G_Blue:SetSquadron( "SQ-SEAD", AIRBASE.Caucasus.Gudauta, { "A2G-DEFENSE-SU-25T-SEAD" }, 10 ) -A2G_Blue:SetSquadronSead( "SQ-SEAD", 700, 1100, 2500, 4000 ) -A2G_Blue:SetSquadronTakeoffFromParkingHot( "SQ-SEAD" ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingAtRunway( "SQ-SEAD" ) -A2G_Blue:SetSquadronOverhead( "SQ-SEAD", 1 ) -A2G_Blue:SetSquadronGrouping( "SQ-SEAD", 2 ) - -A2G_Blue:SetSquadron( "SQ-AIR-BAI", AIRBASE.Caucasus.Kobuleti, { "A2G-DEFENSE-A-10C" }, 6 ) -A2G_Blue:SetSquadronBai( "SQ-AIR-BAI", 600, 900, 1000, 2000 ) -A2G_Blue:SetSquadronTakeoffFromParkingHot( "SQ-AIR-BAI" ) -- altitude in meters when spawning in the air. -A2G_Blue:SetSquadronLandingAtRunway( "SQ-AIR-BAI" ) -A2G_Blue:SetSquadronOverhead( "SQ-AIR-BAI", 0.75 ) -A2G_Blue:SetSquadronBaiPatrol( "SQ-AIR-BAI", ZONE:New( "PatrolZone" ), 2000, 3000, 600, 800, 1000, 1400 ) -A2G_Blue:SetSquadronPatrolInterval( "SQ-AIR-BAI", 4, 30, 60, 1, "BAI" ) -A2G_Blue:SetSquadronGrouping( "SQ-AIR-BAI", 4 ) - - --- A2G task dispatcher - -Command_Blue = COMMANDCENTER:New( GROUP:FindByName( "NATO HQ" ), "NATO HQ" ) - -Mission_Blue = MISSION:New( Command_Blue, "Invasion", "High", "Eliminate 5 targets", coalition.side.BLUE ) - -Players_Blue = SET_GROUP:New():FilterPrefixes( { "NATO Player" } ):FilterStart() - -A2G_Task_Blue = TASK_A2G_DISPATCHER:New( Mission_Blue, Players_Blue, Detection_Blue ) \ No newline at end of file diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/AID-A2G-903 - A fun A2G Mission.miz b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/AID-A2G-903 - A fun A2G Mission.miz deleted file mode 100644 index 6ee8e11..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/AID-A2G-903 - A fun A2G Mission.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-A2G - AI A2G Dispatching/AID-A2G-903 - A fun A2G Mission/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.lua deleted file mode 100644 index d639b67..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.lua +++ /dev/null @@ -1,13 +0,0 @@ ---- --- Name: AID-CGO-100 - APC - Pickup and Deploy --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.miz deleted file mode 100644 index 6911e92..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/AID-CGO-100 - APC - Pickup and Deploy.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-100 - APC - Pickup and Deploy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.lua deleted file mode 100644 index b3f4315..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- --- Name: AID-CGO-110 - APC - Deploy at Group Zones --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -local ZoneGroup = GROUP:FindByName( "Deploy Group") -local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) - - -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.miz deleted file mode 100644 index 6c524a1..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/AID-CGO-110 - APC - Deploy at Group Zones.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-110 - APC - Deploy at Group Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.lua deleted file mode 100644 index d639b67..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.lua +++ /dev/null @@ -1,13 +0,0 @@ ---- --- Name: AID-CGO-100 - APC - Pickup and Deploy --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.miz deleted file mode 100644 index b84816f..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/AID-CGO-120 - APC - Pickup and Deploy Large.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-120 - APC - Pickup and Deploy Large/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.lua deleted file mode 100644 index c630d33..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.lua +++ /dev/null @@ -1,172 +0,0 @@ ---- --- Name: AID-CGO-100 - APC - Pickup and Deploy --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, SetPickupZones, SetDeployZones ) -AICargoDispatcherAPC:SetHomeZone( ZONE:New("Home") ) - ---- Pickup Handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. --- @param #number Height Height in meters to move to the pickup coordinate. --- @param Core.Zone#ZONE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherAPC:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height, PickupZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() - - -end - - ---- Load Handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherAPC:OnAfterLoad( From, Event, To, CarrierGroup, PickupZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - ---- PickedUp Handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a carrier has picked up all cargo objects into the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherAPC:OnAfterPickedUp( From, Event, To, CarrierGroup, PickupZone ) - - -- Write here your own code. - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded all cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - ---- Deploy Handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterDeploy --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The deploy coordinate. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. --- @param #number Height Height in meters to move to the deploy coordinate. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAPC:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - - - - - - ---- Unloaded Handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. --- You can use this event handler to post messages to players, or provide status updates etc. --- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. --- A CarrierUnit can be part of the larger CarrierGroup. --- @function OnAfterUnloaded --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Cargo.Cargo#CARGO Cargo The cargo object. --- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAPC:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) - - local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP - - -- Get the name of the DeployZone - local DeployZoneName = DeployZone:GetName() - - local DeployBuildingNames = { - ["Deploy A"] = "Building A", - } - - - -- Now board the infantry into the respective warehouse building. - if DeployZoneName then - local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) - Cargo:__Board( 5, Building, 25 ) - end - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() - - -end - - ---- Deployed Handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a carrier has deployed all cargo objects from the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterDeployed --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAPC:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - ---- Home event handler OnAfter for AICargoDispatcherAPC. --- Use this event handler to tailor the event when a CarrierGroup is returning to the HomeZone, after it has deployed all cargo objects from the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- If there is no HomeZone is specified, the CarrierGroup will stay at the current location after having deployed all cargo. --- @param #AICargoDispatcherAPC self --- @param #string From A string that contains the "*from state name*" when the event was triggered. --- @param #string Event A string that contains the "*event name*" when the event was triggered. --- @param #string To A string that contains the "*to state name*" when the event was triggered. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The home coordinate the Carrier will arrive and stop it's activities. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the home Coordinate. --- @param #number Height Height in meters to move to the home coordinate. --- @param Core.Zone#ZONE HomeZone The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAPC:OnAfterHome( From, Event, To, CarrierGroup, Coordinate, Speed, Height, HomeZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo and going home to zone " .. HomeZone:GetName(), MESSAGE.Type.Detailed ):ToAll() - -end - - - -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.miz deleted file mode 100644 index 3355520..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/AID-CGO-140 - APC - Event Handling.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-140 - APC - Event Handling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.lua deleted file mode 100644 index f988621..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.lua +++ /dev/null @@ -1,21 +0,0 @@ ---- --- Name: AID-CGO-150 - APC - Manpads against enemy helicopters --- Author: FlightControl --- Date Created: 17 May 2018 --- --- This simulates manpads to fight against enemy helicpters. --- So when the enemy helicopters are within combat range, the manpads will unload and will attack the helos. - - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -local ZoneGroup = GROUP:FindByName( "Deploy Group") -local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) - - --- For the manpads to unload on time, a range of 8000 meters is appropriate. -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 8000 ) -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.miz deleted file mode 100644 index 06a63f5..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/AID-CGO-150 - APC - Manpads against enemy helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-150 - APC - Manpads against enemy helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.lua deleted file mode 100644 index 74f9381..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- --- Name: AID-CGO-151 - APC - Manpads and not defending the carrier --- Author: FlightControl --- Date Created: 08 Sep 2018 --- --- This simulates manpads to board APCs and won't disembark to defend the enemy carrier when enemies are nearby.. --- So when the enemy helicopters are within combat range, the manpads will NOT unload and will NOT attack the helos. --- This is because the combat range was not provided, and thus is 0. - - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -local ZoneGroup = GROUP:FindByName( "Deploy Group") -local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) - - --- For the manpads to unload on time, a range of 8000 meters is appropriate. -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones ) - --- This will work too, so the combat range can be provided, but must be 0. ---AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 0 ) - -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.miz deleted file mode 100644 index 068a2d5..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/AID-CGO-151 - APC - Manpads and not defending the carrier.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-151 - APC - Manpads and not defending the carrier/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/AID-CGO-152 - APC - Defending the carrier.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/AID-CGO-152 - APC - Defending the carrier.lua deleted file mode 100644 index 9ec1df3..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/AID-CGO-152 - APC - Defending the carrier.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: AID-CGO-152 - APC - Defending the carrier --- Author: FlightControl --- Date Created: 18 Oct 2018 --- --- This simulates infantry to board APCs and will disembark to defend the enemy carrier when enemies are nearby.. - - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -local ZoneGroup = GROUP:FindByName( "Deploy Group") -local DeployZone = ZONE_GROUP:New( "Deploy Group", ZoneGroup, 200 ) - - --- For the manpads to unload on time, a range of 8000 meters is appropriate. -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 800 ) - --- This will work too, so the combat range can be provided, but must be 0. ---AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 0 ) - -AICargoDispatcherAPC:Start() - -Sound = USERSOUND:New( "Sounds/BOS05ej9982.ogg" ) - -Sound:ToAll() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/AID-CGO-152 - APC - Defending the carrier.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/AID-CGO-152 - APC - Defending the carrier.miz deleted file mode 100644 index 489f891..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/AID-CGO-152 - APC - Defending the carrier.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-152 - APC - Defending the carrier/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.lua deleted file mode 100644 index 6663908..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: AID-CGO-160 - APC - Spawning of cargo objects --- Author: FlightControl --- Date Created: 11 Sep 2018 --- --- In this demo cargo objects are spawned at random locations within the battle field. --- --- This simulates manpads to board APCs and won't disembark to defend the enemy carrier when enemies are nearby.. --- So when the enemy helicopters are within combat range, the manpads will NOT unload and will NOT attack the helos. --- This is because the combat range was not provided, and thus is 0. - - --- Spawn some random cargo in a zone. - -SpawnInfantry = SPAWN:New( "Infantry" ) -:InitLimit( 30, 100 ) -:InitRandomizePosition(true,500,100) -:InitRandomizeZones( { ZONE:New( "SpawnZone" ) } ) -:OnSpawnGroup( - function( SpawnGroup ) - CARGO_GROUP:New(SpawnGroup,"InfantryType",SpawnGroup:GetName(),150,10) - end -) -:SpawnScheduled( 30, 0 ) - - -local CargoInfantrySet = SET_CARGO:New():FilterTypes( "InfantryType" ):FilterStart() -local SetAPC = SET_GROUP:New():FilterPrefixes( "APC" ):FilterStart() -local PickupZonesSet = SET_ZONE:New():FilterPrefixes( "Spawn" ):FilterOnce() -local DeployZonesSet = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterOnce() - --- For the manpads to unload on time, a range of 8000 meters is appropriate. -AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, CargoInfantrySet, PickupZonesSet, DeployZonesSet ) - --- This will work too, so the combat range can be provided, but must be 0. ---AICargoDispatcherAPC = AI_CARGO_DISPATCHER_APC:New( SetAPC, SetCargoInfantry, nil, SetDeployZones, 0 ) - --- Now also make the carriers spawn in. -CarrierSpawn = SPAWN:New( "APC" ):InitLimit( 10, 10 ):InitRandomizePosition( true, 200, 50 ):SpawnScheduled( 10, 0 ) - - -AICargoDispatcherAPC:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.miz deleted file mode 100644 index e68f34c..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/AID-CGO-160 - APC - Spawning of cargo objects.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-160 - APC - Spawning of cargo objects/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.lua deleted file mode 100644 index 43bc6f1..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.lua +++ /dev/null @@ -1,13 +0,0 @@ ---- --- Name: AID-CGO-200 - Helicopter - Pickup and Deploy --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.miz deleted file mode 100644 index 106b2ce..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/AID-CGO-200 - Helicopter - Pickup and Deploy.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-200 - Helicopter - Pickup and Deploy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.lua deleted file mode 100644 index 993ef0b..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.lua +++ /dev/null @@ -1,14 +0,0 @@ ---- --- Name: AID-CGO-201 - Helicopter - DeployZone Orbit --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) -AICargoDispatcherHelicopter:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.miz deleted file mode 100644 index f221a4d..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/AID-CGO-201 - Helicopter - DeployZone Orbit.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-201 - Helicopter - DeployZone Orbit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.lua deleted file mode 100644 index 24f908c..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.lua +++ /dev/null @@ -1,18 +0,0 @@ ---- --- Name: AID-CGO-202 - Helicopter - Spawning of Helicopters --- Author: FlightControl --- Date Created: 19 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:Start() - -HelicopterSpawn = SPAWN - :New( "Helicopter" ) - :InitLimit( 4, 20 ) - :InitLateActivated( true ) - :SpawnScheduled( 180, 0.5 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.miz deleted file mode 100644 index 688a392..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/AID-CGO-202 - Helicopter - Spawning of Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-202 - Helicopter - Spawning of Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.lua deleted file mode 100644 index d177ea5..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.lua +++ /dev/null @@ -1,30 +0,0 @@ ---- --- Name: AID-CGO-203 - Helicopter - Spawning of Infantry --- Author: FlightControl --- Date Created: 19 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:Start() - -HelicopterSpawn = SPAWN - :New( "Helicopter" ) - :InitLimit( 4, 20 ) - :InitLateActivated( true ) - :SpawnScheduled( 20, 0.5 ) - -InfantrySpawn = SPAWN - :New( "Infantry" ) - :InitLimit( 20, 60 ) - :OnSpawnGroup( - function( SpawnGroup ) - CARGO_GROUP:New( SpawnGroup, "Infantry", SpawnGroup:GetName(), 500, 25 ) - end - ) - :InitRandomizePosition( true, 1000, 250 ) - :SpawnScheduled( 10, 0.5 ) - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.miz deleted file mode 100644 index edb42b8..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/AID-CGO-203 - Helicopter - Spawning of Infantry.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-203 - Helicopter - Spawning of Infantry/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.lua deleted file mode 100644 index c2af7a8..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.lua +++ /dev/null @@ -1,13 +0,0 @@ ---- --- Name: AID-CGO-210 - Helicopter - Home --- Author: FlightControl --- Date Created: 10 May 2018 --- - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) -AICargoDispatcherHelicopter:Start() diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.miz deleted file mode 100644 index 0fbf172..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/AID-CGO-210 - Helicopter - Home.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-210 - Helicopter - Home/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.lua deleted file mode 100644 index e9eca93..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.lua +++ /dev/null @@ -1,16 +0,0 @@ ---- --- Name: AID-CGO-220 - Helicopter - Randomize Coordinates --- Author: FlightControl --- Date Created: 10 May 2018 --- --- Demonstrates the way how the pickup and deploy locations can be randomized. - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:Start() - -AICargoDispatcherHelicopter:SetPickupRadius( 100, 50 ) -AICargoDispatcherHelicopter:SetDeployRadius( 100, 50 ) diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.miz deleted file mode 100644 index 3324abd..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/AID-CGO-220 - Helicopter - Randomize Coordinates.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-220 - Helicopter - Randomize Coordinates/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.lua deleted file mode 100644 index 4a96b97..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.lua +++ /dev/null @@ -1,18 +0,0 @@ ---- --- Name: AID-CGO-230 - Helicopter - DeployZone Probability --- Author: FlightControl --- Date Created: 15 May 2018 --- --- Demonstrates the way how the deploy locations can be set to a specific probability distribution. - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, nil, SetDeployZones ) -AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) -AICargoDispatcherHelicopter:Start() - -SetDeployZones:SetZoneProbability( "Deploy A", 0.1 ) -SetDeployZones:SetZoneProbability( "Deploy B", 0.1 ) -SetDeployZones:SetZoneProbability( "Deploy C", 0.8 ) \ No newline at end of file diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.miz deleted file mode 100644 index c082d5b..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/AID-CGO-230 - Helicopter - DeployZone Probability.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-230 - Helicopter - DeployZone Probability/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.lua deleted file mode 100644 index 808f62c..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.lua +++ /dev/null @@ -1,176 +0,0 @@ ---- --- Name: AID-CGO-240 - Helicopter - Unloaded Event Handling --- Author: FlightControl --- Date Created: 15 May 2018 --- --- Demonstrates the way how the deploy locations can be set to a specific probability distribution. - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Deploy" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetPickupZones, SetDeployZones ) -AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) - - - ---- Pickup Handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. --- @param #number Height Height in meters to move to the pickup coordinate. -function AICargoDispatcherHelicopter:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo.", MESSAGE.Type.Information ):ToAll() - - -end - - ---- Load Handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. -function AICargoDispatcherHelicopter:OnAfterLoad( From, Event, To, CarrierGroup ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo.", MESSAGE.Type.Information ):ToAll() - -end - - ---- Loaded event handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has loaded a cargo object. --- You can use this event handler to post messages to players, or provide status updates etc. --- Note that if more cargo objects were loading or boarding into the CarrierUnit, then this event can be triggered multiple times for each different Cargo/CarrierUnit. --- A CarrierUnit can be part of the larger CarrierGroup. --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was triggered. --- @param #string Event A string that contains the "*event name*" when the event was triggered. --- @param #string To A string that contains the "*to state name*" when the event was triggered. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Cargo.Cargo#CARGO Cargo The cargo object. --- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo loading operation. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherHelicopter:OnAfterLoaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, PickupZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded cargo " .. Cargo:GetName(), MESSAGE.Type.Information ):ToAll() - -end - ---- Deploy Handler OnAfter for AI_CARGO_DISPATCHER. --- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterPickedUp --- @param self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The deploy coordinate. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. --- @param #number Height Height in meters to move to the deploy coordinate. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - - - - - - ---- Unloaded Handler OnAfter for AI_CARGO_DISPATCHER. --- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. --- You can use this event handler to post messages to players, or provide status updates etc. --- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. --- A CarrierUnit can be part of the larger CarrierGroup. --- @function OnAfterUnloaded --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Cargo.Cargo#CARGO Cargo The cargo object. --- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) - - local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP - - -- Get the name of the DeployZone - local DeployZoneName = DeployZone:GetName() - - local DeployBuildingNames = { - ["Deploy A"] = "Building A", - ["Deploy B"] = "Building B", - ["Deploy C"] = "Building C", - } - - - -- Now board the infantry into the respective warehouse building. - if DeployZoneName then - local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) - Cargo:__Board( 5, Building, 25 ) - end - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() - - -end - - ---- Deployed Handler OnAfter for AI_CARGO_DISPATCHER. --- Use this event handler to tailor the event when a carrier has deployed all cargo objects from the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterDeployed --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - ---- Home event handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierGroup is returning to the HomeZone, after it has deployed all cargo objects from the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- If there is no HomeZone is specified, the CarrierGroup will stay at the current location after having deployed all cargo. --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was triggered. --- @param #string Event A string that contains the "*event name*" when the event was triggered. --- @param #string To A string that contains the "*to state name*" when the event was triggered. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The home coordinate the Carrier will arrive and stop it's activities. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the home Coordinate. --- @param #number Height Height in meters to move to the home coordinate. --- @param Core.Zone#ZONE HomeZone The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterHome( From, Event, To, CarrierGroup, Coordinate, Speed, Height, HomeZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo and going home to zone " .. HomeZone:GetName(), MESSAGE.Type.Detailed ):ToAll() - -end - - -AICargoDispatcherHelicopter:Start() diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.miz deleted file mode 100644 index f406ce4..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/AID-CGO-240 - Helicopter - Unloaded Event Handling.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-240 - Helicopter - Unloaded Event Handling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.lua deleted file mode 100644 index c31deab..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.lua +++ /dev/null @@ -1,206 +0,0 @@ ---- --- Name: AID-CGO-250 - Helicopter - Front-Line Enforcements --- Author: FlightControl --- Date Created: 20 Sep 2018 --- --- Demonstrates the way how front-line enforcements can be setup using helicopter transportations. - -local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local SetHelicopter = SET_GROUP:New():FilterPrefixes( "Helicopter" ):FilterStart() -local SetPickupZones = SET_ZONE:New():FilterPrefixes( "Pickup" ):FilterStart() -local SetDeployZones = SET_ZONE:New():FilterPrefixes( "Defense" ):FilterStart() - -AICargoDispatcherHelicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetPickupZones, SetDeployZones ) -AICargoDispatcherHelicopter:SetHomeZone( ZONE:FindByName( "Home" ) ) - - --- Here we setup the spawning of Infantry. -SpawnCargoInfantry = SPAWN - :New( "Infantry" ) - :InitLimit( 40, 60 ) - :InitRandomizeZones( { ZONE_POLYGON:NewFromGroupName( "Pickup Location" ) } ) - :OnSpawnGroup( - function( SpawnGroup ) - -- This will automatically add also the CargoInfantry object to the SetCargoInfantry (in the background through the event system). - local CargoInfantry = CARGO_GROUP:New( SpawnGroup, "Infantry", SpawnGroup:GetName(), 150 ) - end - ) - :SpawnScheduled( 60, 0.5 ) - --- Now we create 4 zones based on GROUP objects within the battlefield, which form the front line defense points. -local ZoneDefense1 = ZONE_GROUP:New( "Defense 1", GROUP:FindByName("Defense #001"), 1500 ) -local ZoneDefense2 = ZONE_GROUP:New( "Defense 2", GROUP:FindByName("Defense #002"), 1500 ) -local ZoneDefense3 = ZONE_GROUP:New( "Defense 3", GROUP:FindByName("Defense #003"), 1500 ) -local ZoneDefense4 = ZONE_GROUP:New( "Defense 4", GROUP:FindByName("Defense #004"), 1500 ) - - --- Here we setup the spawning of Helicopters. - - - ---- Pickup Handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. --- @param #number Height Height in meters to move to the pickup coordinate. -function AICargoDispatcherHelicopter:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo.", MESSAGE.Type.Information ):ToAll() - - -end - - ---- Load Handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. -function AICargoDispatcherHelicopter:OnAfterLoad( From, Event, To, CarrierGroup ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo.", MESSAGE.Type.Information ):ToAll() - -end - - ---- Loaded event handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has loaded a cargo object. --- You can use this event handler to post messages to players, or provide status updates etc. --- Note that if more cargo objects were loading or boarding into the CarrierUnit, then this event can be triggered multiple times for each different Cargo/CarrierUnit. --- A CarrierUnit can be part of the larger CarrierGroup. --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was triggered. --- @param #string Event A string that contains the "*event name*" when the event was triggered. --- @param #string To A string that contains the "*to state name*" when the event was triggered. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Cargo.Cargo#CARGO Cargo The cargo object. --- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo loading operation. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherHelicopter:OnAfterLoaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, PickupZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded cargo " .. Cargo:GetName(), MESSAGE.Type.Information ):ToAll() - -end - ---- Deploy Handler OnAfter for AI_CARGO_DISPATCHER. --- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterPickedUp --- @param self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The deploy coordinate. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. --- @param #number Height Height in meters to move to the deploy coordinate. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - - - - - - ---- Unloaded Handler OnAfter for AI_CARGO_DISPATCHER. --- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. --- You can use this event handler to post messages to players, or provide status updates etc. --- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. --- A CarrierUnit can be part of the larger CarrierGroup. --- @function OnAfterUnloaded --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Cargo.Cargo#CARGO Cargo The cargo object. --- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) - - local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP - - -- Get the name of the DeployZone - local DeployZoneName = DeployZone:GetName() - - local DeployBuildingNames = { - ["Deploy A"] = "Building A", - ["Deploy B"] = "Building B", - ["Deploy C"] = "Building C", - } - - - -- Now board the infantry into the respective warehouse building. - if DeployZoneName then - local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) - Cargo:__Board( 5, Building, 25 ) - end - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() - - -end - - ---- Deployed Handler OnAfter for AI_CARGO_DISPATCHER. --- Use this event handler to tailor the event when a carrier has deployed all cargo objects from the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterDeployed --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - ---- Home event handler OnAfter for AICargoDispatcherHelicopter. --- Use this event handler to tailor the event when a CarrierGroup is returning to the HomeZone, after it has deployed all cargo objects from the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- If there is no HomeZone is specified, the CarrierGroup will stay at the current location after having deployed all cargo. --- @param #AICargoDispatcherHelicopter self --- @param #string From A string that contains the "*from state name*" when the event was triggered. --- @param #string Event A string that contains the "*event name*" when the event was triggered. --- @param #string To A string that contains the "*to state name*" when the event was triggered. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The home coordinate the Carrier will arrive and stop it's activities. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the home Coordinate. --- @param #number Height Height in meters to move to the home coordinate. --- @param Core.Zone#ZONE HomeZone The zone wherein the carrier will return when all cargo has been transported. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherHelicopter:OnAfterHome( From, Event, To, CarrierGroup, Coordinate, Speed, Height, HomeZone ) - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo and going home to zone " .. HomeZone:GetName(), MESSAGE.Type.Detailed ):ToAll() - -end - - -AICargoDispatcherHelicopter:SetPickupRadius( 30, 10 ) -AICargoDispatcherHelicopter:SetDeployRadius( 200, 100 ) -AICargoDispatcherHelicopter:SetPickupSpeed( 300, 200 ) -AICargoDispatcherHelicopter:SetDeploySpeed( 300, 200 ) -AICargoDispatcherHelicopter:SetPickupHeight( 100, 30 ) -AICargoDispatcherHelicopter:SetDeployHeight( 100, 30 ) - -AICargoDispatcherHelicopter:ScheduleOnce( 10, AICargoDispatcherHelicopter.Start, AICargoDispatcherHelicopter ) \ No newline at end of file diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.miz deleted file mode 100644 index f17af33..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/AID-CGO-250 - Helicopter - Front-Line Enforcements.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-250 - Helicopter - Front-Line Enforcements/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.lua deleted file mode 100644 index b4c9bbf..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- --- Name: AID-CGO-300 - Airplane - Pickup and Deploy --- Author: FlightControl --- Date Created: 02 Aug 2018 --- - -local CargoInfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local AirplanesSet = SET_GROUP:New():FilterPrefixes( "Airplane" ):FilterStart() -local PickupZoneSet = SET_ZONE:New() -local DeployZoneSet = SET_ZONE:New() - -PickupZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Gudauta ) ) -DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Sochi_Adler ) ) - -AICargoDispatcherAirplanes = AI_CARGO_DISPATCHER_AIRPLANE:New( AirplanesSet, CargoInfantrySet, PickupZoneSet, DeployZoneSet ) -AICargoDispatcherAirplanes:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.miz deleted file mode 100644 index 6a68870..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/AID-CGO-300 - Airplane - Pickup and Deploy.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-300 - Airplane - Pickup and Deploy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.lua deleted file mode 100644 index af6f24f..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.lua +++ /dev/null @@ -1,21 +0,0 @@ ---- --- Name: AID-CGO-310 - Airplane - Pickup and Deploy Multiple --- Author: FlightControl --- Date Created: 03 Aug 2018 --- - -local CargoInfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local AirplanesSet = SET_GROUP:New():FilterPrefixes( "Airplane" ):FilterStart() -local PickupZoneSet = SET_ZONE:New() -local DeployZoneSet = SET_ZONE:New() - -PickupZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Gudauta ) ) -DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Sochi_Adler ) ) - -AICargoDispatcherAirplanes = AI_CARGO_DISPATCHER_AIRPLANE:New( AirplanesSet, CargoInfantrySet, PickupZoneSet, DeployZoneSet ) -AICargoDispatcherAirplanes:Start() - -for CargoName, Cargo in pairs( CargoInfantrySet:GetSet() ) do - AICargoDispatcherAirplanes:I( { Cargo = Cargo:GetName() } ) -end - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.miz deleted file mode 100644 index 5f70444..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/AID-CGO-310 - Airplane - Pickup and Deploy Multiple.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-310 - Airplane - Pickup and Deploy Multiple/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.lua b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.lua deleted file mode 100644 index 8424c0d..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.lua +++ /dev/null @@ -1,153 +0,0 @@ ---- --- Name: AID-CGO-340 - Airplane - Event Handling --- Author: FlightControl --- Date Created: 02 Aug 2018 --- - -local CargoInfantrySet = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() -local AirplanesSet = SET_GROUP:New():FilterPrefixes( "Airplane" ):FilterStart() -local PickupZoneSet = SET_ZONE:New() -local DeployZoneSet = SET_ZONE:New() - -PickupZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Gudauta ) ) -DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Sochi_Adler ) ) -DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Maykop_Khanskaya ) ) -DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Mineralnye_Vody ) ) -DeployZoneSet:AddZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Vaziani ) ) - -AICargoDispatcherAirplanes = AI_CARGO_DISPATCHER_AIRPLANE:New( AirplanesSet, CargoInfantrySet, PickupZoneSet, DeployZoneSet ) -AICargoDispatcherAirplanes:SetHomeZone( ZONE_AIRBASE:New( AIRBASE.Caucasus.Kobuleti ) ) - ---- Pickup Handler OnAfter for AICargoDispatcherAirplanes. --- Use this event handler to tailor the event when a CarrierGroup is routed towards a new pickup Coordinate and a specified Speed. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The coordinate of the pickup location. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the pickup Coordinate. --- @param #number Height Height in meters to move to the pickup coordinate. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherAirplanes:OnAfterPickup( From, Event, To, CarrierGroup, Coordinate, Speed, Height, PickupZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is picking up cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() - - -end - - ---- Load Handler OnAfter for AICargoDispatcherAirplanes. --- Use this event handler to tailor the event when a CarrierGroup has initiated the loading or boarding of cargo within reporting or near range. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherAirplanes:OnAfterLoad( From, Event, To, CarrierGroup, PickupZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is loading cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - ---- PickedUp Handler OnAfter for AICargoDispatcherAirplanes. --- Use this event handler to tailor the event when a carrier has picked up all cargo objects into the CarrierGroup. --- You can use this event handler to post messages to players, or provide status updates etc. --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE_AIRBASE PickupZone (optional) The zone from where the cargo is picked up. Note that the zone is optional and may not be provided, but for AI_CARGO_DISPATCHER_AIRBASE there will always be a PickupZone, as the pickup location is an airbase zone. -function AICargoDispatcherAirplanes:OnAfterPickedUp( From, Event, To, CarrierGroup, PickupZone ) - - -- Write here your own code. - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " has loaded all cargo at airbase " .. PickupZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - ---- Deploy Handler OnAfter for AICargoDispatcherAirplanes. --- Use this event handler to tailor the event when a CarrierGroup is routed to a deploy coordinate, to Unload all cargo objects in each CarrierUnit. --- You can use this event handler to post messages to players, or provide status updates etc. --- @function OnAfterDeploy --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Point#COORDINATE Coordinate The deploy coordinate. --- @param #number Speed The velocity in meters per second on which the CarrierGroup is routed towards the deploy Coordinate. --- @param #number Height Height in meters to move to the deploy coordinate. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAirplanes:OnAfterDeploy( From, Event, To, CarrierGroup, Coordinate, Speed, Height, DeployZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName().. " is starting deployment of all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - ---- Unloaded Handler OnAfter for AICargoDispatcherAirplanes. --- Use this event handler to tailor the event when a CarrierUnit of a CarrierGroup has unloaded a cargo object. --- You can use this event handler to post messages to players, or provide status updates etc. --- Note that if more cargo objects were unloading or unboarding from the CarrierUnit, then this event can be fired multiple times for each different Cargo/CarrierUnit. --- A CarrierUnit can be part of the larger CarrierGroup. --- @function OnAfterUnloaded --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Cargo.Cargo#CARGO Cargo The cargo object. --- @param Wrapper.Unit#UNIT CarrierUnit The carrier unit that is executing the cargo unloading operation. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAirplanes:OnAfterUnloaded( From, Event, To, CarrierGroup, Cargo, CarrierUnit, DeployZone ) - - -- Write here your own code. - local CargoGroup = Cargo:GetObject() -- Wrapper.Group#GROUP - - -- Get the name of the DeployZone - local DeployZoneName = DeployZone:GetName() - - local DeployBuildingNames = { - ["Deploy A"] = "Building A", - } - - - -- Now board the infantry into the respective warehouse building. - if DeployZoneName then - local Building = STATIC:FindByName( DeployBuildingNames[DeployZoneName] ) - Cargo:__Board( 5, Building, 25 ) - end - - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. ", Unit " .. CarrierUnit:GetName() .. " has unloaded cargo " .. Cargo:GetName() .. " in zone " .. DeployZone:GetName() .. " and cargo is moving to building " .. DeployBuildingNames[DeployZoneName], MESSAGE.Type.Information ):ToAll() - - -end - - ---- Deployed Handler OnAfter for AICargoDispatcherAirplanes. --- @function OnAfterDeployed --- @param #AICargoDispatcherAirplanes self --- @param #string From A string that contains the "*from state name*" when the event was fired. --- @param #string Event A string that contains the "*event name*" when the event was fired. --- @param #string To A string that contains the "*to state name*" when the event was fired. --- @param Wrapper.Group#GROUP CarrierGroup The group object that contains the CarrierUnits. --- @param Core.Zone#ZONE DeployZone The zone wherein the cargo is deployed. This can be any zone type, like a ZONE, ZONE_GROUP, ZONE_AIRBASE. -function AICargoDispatcherAirplanes:OnAfterDeployed( From, Event, To, CarrierGroup, DeployZone ) - - -- Write here your own code. - MESSAGE:NewType( "Group " .. CarrierGroup:GetName() .. " deployed all cargo in zone " .. DeployZone:GetName(), MESSAGE.Type.Information ):ToAll() - -end - - -AICargoDispatcherAirplanes:Start() - diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.miz b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.miz deleted file mode 100644 index 6023a14..0000000 Binary files a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/AID-CGO-340 - Airplane - Event Handling.miz and /dev/null differ diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/pack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/unpack.ps1 b/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/AID - AI Dispatching/AID-CGO - AI Cargo Dispatching/AID-CGO-340 - Airplane - Event Handling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.lua b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.lua deleted file mode 100644 index 5bb060d..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.lua +++ /dev/null @@ -1,74 +0,0 @@ ---- --- Name: BAI-001 - BAI in a Zone by Airplane Group --- Author: FlightControl --- Date Created: 09 May 2017 --- --- # Situation: --- --- A group of 4 bombers at patrolling north of an engage zone for 10 minutes. --- After 10 minutes, the command center orders the bombers to engage the zone and execute a BAI strike. --- --- # Test cases: --- --- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. --- 2. The bombers are not detecting any target during the patrol. --- 3. When the bombers is commanded to engage, the group will fly to the engage zone. --- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. --- 5. Observe the bombers eliminating the targets. --- 6. Observe the bombers defenses. --- 7. When all targets within the engage zone are destroyed, the bombers BAI task is set to Accomplished. --- 8. The bombers will return to base. - - - --- Create a local variable (in this case called BAIEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -BAIEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called BAIPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -BAIPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AIBAIZone) and --- using the functions AI_BAI_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) -AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function -AIBAIZone:SetControllable( BAIPlane ) - --- Tell the group BAIPlane to start the mission in 1 second. -AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) -AIBAIZone:__Engage( 600 ) - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to the patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the bombers back to base." ) - Check:Stop( CheckScheduleID ) - AIBAIZone:__RTB( 1 ) -end diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.miz b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.miz deleted file mode 100644 index fc1f474..0000000 Binary files a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/BAI-001 - BAI in a Zone by Airplane Group.miz and /dev/null differ diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/pack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/unpack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-001 - BAI in a Zone by Airplane Group/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.lua b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.lua deleted file mode 100644 index f8fdfdb..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.lua +++ /dev/null @@ -1,75 +0,0 @@ ---- --- Name: BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed --- Author: FlightControl --- Date Created: 09 May 2017 --- --- # Situation: --- --- A group of 4 bombers at patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the bombers to engage the zone and execute a BAI. --- --- # Test cases: --- --- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. --- 2. The bombers are not detecting any target during the patrol. --- 3. When the bombers is commanded to engage, the group will fly to the engage zone. --- 3.1. The approach speed to the engage zone is set to 400 km/h. --- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. --- 5. Observe the bombers eliminating the targets. --- 6. Observe the bombers defenses. --- 7. When all targets within the engage zone are destroyed, the bombers BAI task is set to Accomplished. --- 8. The bombers will return to base. - - - --- Create a local variable (in this case called BAIEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -BAIEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called BAIPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -BAIPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AIBAIZone) and --- using the functions AI_BAI_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) -AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function -AIBAIZone:SetControllable( BAIPlane ) - --- Tell the group BAIPlane to start the mission in 1 second. -AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) -AIBAIZone:__Engage( 60, 400 ) -- Engage after one minute with a speed of 400 km/h. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the bombers back to base." ) - Check:Stop( CheckScheduleID ) - AIBAIZone:__RTB( 1 ) -end diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.miz b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.miz deleted file mode 100644 index f103c56..0000000 Binary files a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed.miz and /dev/null differ diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/pack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/unpack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-002 - BAI in a Zone by Airplane Group - Engage with Speed/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.lua b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.lua deleted file mode 100644 index 43ff854..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.lua +++ /dev/null @@ -1,81 +0,0 @@ ---- --- Name: BAI-004 - BAI in a Zone by Airplane Group - Test Abort --- Author: FlightControl --- Date Created: 09 May 2017 --- --- # Situation: --- --- A group of 4 bombers at patrolling north of an engage zone for 1 minute. --- After 10 minutes, the command center orders the bombers to engage the zone and execute a BAI. --- After 12 minutes, the mission is aborted. --- --- # Test cases: --- --- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. --- 2. The bombers are not detecting any target during the patrol. --- 3. When the bombers is commanded to engage, the group will fly to the engage zone --- 3.1. The approach speed to the engage zone is set to 350 km/h. --- 3.2. The altitude to the engage zone and BAI execution is set to 4000 meters. --- 4. Observe the mission being aborted. A message will be sent. --- 5. The bombers will go back patrolling. - - - --- Create a local variable (in this case called BAIEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -BAIEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called BAIPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -BAIPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AIBAIZone) and --- using the functions AI_BAI_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) -AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function -AIBAIZone:SetControllable( BAIPlane ) - --- Tell the group BAIPlane to start the mission in 1 second. -AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) -AIBAIZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters. - --- After 12 minutes, tell the group BAIPlane to abort the engagement. -AIBAIZone:__Abort( 720 ) -- Abort the engagement. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - -function AIBAIZone:OnAfterAbort(Controllable,From,Event,To) - BASE:E( "MISSION ABORT! Back to patrol zone." ) - MESSAGE:New("Mission ABORTED! Back to the Patrol Zone!",30,"ALERT!"):ToAll() -end - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the bombers back to base." ) - Check:Stop( CheckScheduleID ) - AIBAIZone:__RTB( 1 ) -end diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.miz b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.miz deleted file mode 100644 index 2784595..0000000 Binary files a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/BAI-004 - BAI in a Zone by Airplane Group - Test Abort.miz and /dev/null differ diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/pack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/unpack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-004 - BAI in a Zone by Airplane Group - Test Abort/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.lua b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.lua deleted file mode 100644 index 8546840..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.lua +++ /dev/null @@ -1,78 +0,0 @@ ---- --- Name: BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend --- Author: FlightControl --- Date Created: 09 May 2017 --- --- # Situation: --- --- A group of 4 bombers at patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the bombers to engage the zone and execute a BAI. --- The planes should expend 4 weapons per run. --- --- # Test cases: --- --- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. --- 2. The bombers are not detecting any target during the patrol. --- 3. When the bombers is commanded to engage, the group will fly to the engage zone --- 3.1. The approach speed to the engage zone is set to 400 km/h. --- 3.2. The altitude to the engage zone and BAI execution is set to 500 meters. --- 3.3. The planes should expend 4 weapons per run. --- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. --- 5. Observe the bombers eliminating the targets. --- 6. Observe the bombers defenses. --- 7. When all targets within the engage zone are destroyed, the bombers BAI task is set to Accomplished. --- 8. The bombers will return to base. - - - --- Create a local variable (in this case called BAIEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -BAIEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called BAIPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -BAIPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AIBAIZone) and --- using the functions AI_BAI_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) -AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function -AIBAIZone:SetControllable( BAIPlane ) - --- Tell the group BAIPlane to start the mission in 1 second. -AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 1 minute, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. (600 is 600 seconds) -AIBAIZone:__Engage( 60, 600, 8000, AI.Task.WeaponExpend.FOUR ) -- Engage with a speed of 600 km/h and an altitude of 8000 meters, weapn expend 4. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the bombers back to base." ) - Check:Stop( CheckScheduleID ) - AIBAIZone:__RTB( 1 ) -end diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.miz b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.miz deleted file mode 100644 index fc2373b..0000000 Binary files a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend.miz and /dev/null differ diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-005 - BAI in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.lua b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.lua deleted file mode 100644 index f6f9228..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.lua +++ /dev/null @@ -1,76 +0,0 @@ ---- --- Name: BAI-100 - BAI of a Bridge --- Author: FlightControl --- Date Created: 09 May 2017 --- --- # Situation: --- --- A group of 2 bombers are patrolling north of an engage zone. --- The command center orders the bombers to engage the zone and execute a BAI strike on a bridge. --- --- # Test cases: --- --- 1. Observe that the bombers is patrolling in the patrol zone, until the engage command is given. --- 2. The bombers are not detecting any target during the patrol. --- 3. When the bombers is commanded to engage, the group will fly to the engage zone. --- 4. Detection is activated and detected targets within the engage zone are assigned for BAI. --- 5. Observe the bombers eliminating the bridge. --- 6. Observe the bombers defenses. --- 7. When the bridge within the engage zone is destroyed, the bombers BAI task is set to Accomplished. --- 8. The bombers will return to base. - - - --- Create a local variable (in this case called BAIEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -BAIEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called BAIPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -BAIPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AIBAIZone) and --- using the functions AI_BAI_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, BAIEngagementZone) -AIBAIZone = AI_BAI_ZONE:New( PatrolZone, 500, 1000, 500, 600, BAIEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - --- Tell the program to use the object (in this case called BAIPlane) as the group to use in the BAI function -AIBAIZone:SetControllable( BAIPlane ) - --- Tell the BAI not to search for potential targets in the BAIEngagementZone, but rather use the center of the BAIEngagementZone as the bombing location. -AIBAIZone:SearchOff() - --- Tell the group BAIPlane to start the mission in 1 second. -AIBAIZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group BAIPlane to engage the targets located in the engagement zone called BAIEngagement Zone. -AIBAIZone:__Engage( 10 ) - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() ~= 0 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The bridge is destroyed." ) - AIBAIZone:__Accomplish( 1 ) -- Now they should fly back to the patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AIBAIZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the bombers back to base." ) - Check:Stop( CheckScheduleID ) - AIBAIZone:__RTB( 1 ) -end diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.miz b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.miz deleted file mode 100644 index b2e00c3..0000000 Binary files a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/BAI-100 - BAI of a Bridge.miz and /dev/null differ diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/pack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/unpack.ps1 b/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/BAI - Battlefield Air Interdiction/BAI-100 - BAI of a Bridge/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.lua b/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.lua deleted file mode 100644 index 12abd4e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.lua +++ /dev/null @@ -1,23 +0,0 @@ ---- --- Name: CAP-001 - Combat Air Patrol --- Author: FlightControl --- Date Created: 16 January 2017 --- --- # Situation: --- The Su-27 airplane will patrol in PatrolZone. --- It will not engage any enemy automatically. --- --- # Test cases: --- --- 1. Observe the Su-27 patrolling. --- - -local CapPlane = GROUP:FindByName( "Plane" ) - -local PatrolZone = ZONE:New( "Patrol Zone" ) - -AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) - -AICapZone:SetControllable( CapPlane ) - -AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz b/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz deleted file mode 100644 index 6fe1f66..0000000 Binary files a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/CAP-001 - Combat Air Patrol.miz and /dev/null differ diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/pack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/unpack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-001 - Combat Air Patrol/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.lua b/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.lua deleted file mode 100644 index 87189c8..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: CAP-010 - CAP and Engage within Range --- Author: FlightControl --- Date Created: 16 January 2017 --- --- # Situation: --- --- The Su-27 airplane will patrol in PatrolZone. --- It will engage when it detects the airplane and when the A-10C is within the engage range. --- --- # Test cases: --- --- 1. Observe the Su-27 patrolling. --- 2. Observe that, when the A-10C is within the engage range, it will engage. --- 3. After engage, observe that the Su-27 returns to the PatrolZone. --- 4. If you want, you can wait until the Su-27 is out of fuel and will land. - -CapPlane = GROUP:FindByName( "Plane" ) - -PatrolZone = ZONE:New( "Patrol Zone" ) - -AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) - -AICapZone:SetControllable( CapPlane ) -AICapZone:SetEngageRange( 20000 ) -- Set the Engage Range to 20.000 meters. The AI won't engage when the enemy is beyond 20.000 meters. - -AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz b/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz deleted file mode 100644 index 7f7e1cf..0000000 Binary files a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/CAP-010 - CAP and Engage within Range.miz and /dev/null differ diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/pack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/unpack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-010 - CAP and Engage within Range/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.lua b/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.lua deleted file mode 100644 index 9c6d374..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: CAP-011 - CAP and Engage within Zone --- Author: FlightControl --- Date Created: 16 January 2017 --- --- # Situation: --- --- The Su-27 airplane will patrol in PatrolZone. --- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone. --- --- # Test cases: --- --- 1. Observe the Su-27 patrolling. --- 2. Observe that, when the A-10C is within the engage zone, it will engage. --- 3. After engage, observe that the Su-27 returns to the PatrolZone. --- 4. If you want, you can wait until the Su-27 is out of fuel and will land. - - -CapPlane = GROUP:FindByName( "Plane" ) - -PatrolZone = ZONE:New( "Patrol Zone" ) - -AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) - -EngageZoneGroup = GROUP:FindByName( "Engage Zone" ) - -CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup ) - -AICapZone:SetControllable( CapPlane ) -AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone. - -AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.miz b/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.miz deleted file mode 100644 index d0739eb..0000000 Binary files a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/CAP-011 - CAP and Engage within Zone.miz and /dev/null differ diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/pack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/unpack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-011 - CAP and Engage within Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.lua b/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.lua deleted file mode 100644 index 3b0ad84..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: CAP-012 - CAP - Test Abort --- Author: FlightControl --- Date Created: 14 Mar 2017 --- --- # Situation: --- --- The Su-27 airplane will patrol in PatrolZone. --- It will engage when it detects the airplane and when the A-10C is within the CapEngageZone. --- It will abort the engagement after 1 minute and return to the patrol zone. --- --- # Test cases: --- --- 1. Observe the Su-27 patrolling. --- 2. Observe that, when the A-10C is within the engage zone, it will engage. --- 3. After engage, observe that the Su-27 returns to the PatrolZone. --- 4. When it engages, it will abort the engagement after 1 minute. - - -CapPlane = GROUP:FindByName( "Plane" ) - -PatrolZone = ZONE:New( "Patrol Zone" ) - -AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) - -EngageZoneGroup = GROUP:FindByName( "Engage Zone" ) - -CapEngageZone = ZONE_POLYGON:New( "Engage Zone", EngageZoneGroup ) - -AICapZone:SetControllable( CapPlane ) -AICapZone:SetEngageZone( CapEngageZone ) -- Set the Engage Zone. The AI will only engage when the bogeys are within the CapEngageZone. - -AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - -function AICapZone:OnAfterEngage(Controllable,From,Event,To) - AICapZone:__Abort( 60 ) -end - -function AICapZone:OnAfterAbort(Controllable,From,Event,To) - BASE:E("MISSION ABORTED! Returning to Patrol Zone!") - MESSAGE:New("MISSION ABORTED! Returning to Patrol Zone!",30,"ALERT!") -end - diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.miz b/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.miz deleted file mode 100644 index b3cc3b0..0000000 Binary files a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/CAP-012 - CAP - Test Abort.miz and /dev/null differ diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/pack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/unpack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-012 - CAP - Test Abort/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.lua b/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.lua deleted file mode 100644 index 16f456f..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: CAP-020 - Combat Air Patrol RTB Test --- Author: FlightControl --- Date Created: 14 February 2017 --- --- # Situation: --- The Su-27 airplane will patrol in PatrolZone. --- It will return to base when out of fuel. --- --- # Test cases: --- --- 1. Observe the Su-27 patrolling. --- 2. It should return to base when out of fuel. --- - -CapSpawn = SPAWN:New( "Plane" ):InitLimit(1,2):InitRepeatOnLanding() - -CapGroup = CapSpawn:Spawn() - -PatrolZone = ZONE:New( "Patrol Zone" ) - -AICapZone = AI_CAP_ZONE:New( PatrolZone, 500, 1000, 500, 600 ) - -AICapZone:SetControllable( CapGroup ) - -AICapZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz b/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz deleted file mode 100644 index 0d2f8df..0000000 Binary files a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/CAP-020 - Combat Air Patrol RTB Test.miz and /dev/null differ diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/pack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/unpack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-020 - Combat Air Patrol RTB Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.lua b/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.lua deleted file mode 100644 index 7b5db06..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- --- Name: CAP-100 - AI_A2A_CAP - Normal CAP --- Author: FlightControl --- Date Created: 30 May 2017 --- --- # Situation: --- The Su-27 airplane will patrol in PatrolZone. --- It will not engage any enemy automatically. --- --- # Test cases: --- --- 1. Observe the Su-27 patrolling. --- - -local CapPlane = GROUP:FindByName( "Plane" ) - -local PatrolZone = ZONE:New( "Patrol Zone" ) - -A2ACap = AI_A2A_CAP:New( CapPlane, PatrolZone, 500, 1000, 500, 600 ) - -A2ACap:Patrol() - -local IntruderUnit = UNIT:FindByName( "Intruder" ) - - -A2ACap:__Engage( 120, { IntruderUnit } ) \ No newline at end of file diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.miz b/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.miz deleted file mode 100644 index f7ef181..0000000 Binary files a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/CAP-100 - AI_A2A_CAP - Normal CAP.miz and /dev/null differ diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/pack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/unpack.ps1 b/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAP - Combat Air Patrol/CAP-100 - AI_A2A_CAP - Normal CAP/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.lua b/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.lua deleted file mode 100644 index fea4b81..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.lua +++ /dev/null @@ -1,74 +0,0 @@ ---- --- Name: CAS-001 - CAS in a Zone by Airplane Group --- Author: FlightControl --- Date Created: 13 January 2017 --- --- # Situation: --- --- A group of 4 Su-25T at patrolling north of an engage zone for 10 minutes. --- After 10 minutes, the command center orders the Su-25T to engage the zone and execute a CAS. --- --- # Test cases: --- --- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. --- 2. The Su-25T are not detecting any target during the patrol. --- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the Su-25T eliminating the targets. --- 6. Observe the Su-25T defenses. --- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. --- 8. The Su-25T will return to base. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 600 ) - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to the patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz b/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz deleted file mode 100644 index 9216b6e..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/CAS-001 - CAS in a Zone by Airplane Group.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-001 - CAS in a Zone by Airplane Group/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua b/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua deleted file mode 100644 index fad0bea..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.lua +++ /dev/null @@ -1,75 +0,0 @@ ---- --- Name: CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed --- Author: FlightControl --- Date Created: 06 February 2017 --- --- # Situation: --- --- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the Su-25T to engage the zone and execute a CAS. --- --- # Test cases: --- --- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. --- 2. The Su-25T are not detecting any target during the patrol. --- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone. --- 3.1. The approach speed to the engage zone is set to 400 km/h. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the Su-25T eliminating the targets. --- 6. Observe the Su-25T defenses. --- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. --- 8. The Su-25T will return to base. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 60, 400 ) -- Engage after one minute with a speed of 400 km/h. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.miz b/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.miz deleted file mode 100644 index e88eca9..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-002 - CAS in a Zone by Airplane Group - Engage with Speed/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.lua b/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.lua deleted file mode 100644 index 8af2ca7..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.lua +++ /dev/null @@ -1,76 +0,0 @@ ---- --- Name: CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude --- Author: FlightControl --- Date Created: 6 February 2017 --- --- # Situation: --- --- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the Su-25T to engage the zone and execute a CAS. --- --- # Test cases: --- --- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. --- 2. The Su-25T are not detecting any target during the patrol. --- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone --- 3.1. The approach speed to the engage zone is set to 400 km/h. --- 3.2. The altitude to the engage zone and CAS execution is set to 500 meters. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the Su-25T eliminating the targets. --- 6. Observe the Su-25T defenses. --- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. --- 8. The Su-25T will return to base. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.miz b/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.miz deleted file mode 100644 index 773f5f0..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-003 - CAS in a Zone by Airplane Group - Engage with Speed and Altitude/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.lua b/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.lua deleted file mode 100644 index 295b7d1..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.lua +++ /dev/null @@ -1,81 +0,0 @@ ---- --- Name: CAS-004 - CAS in a Zone by Airplane Group - Test Abort --- Author: FlightControl --- Date Created: 14 Mar 2017 --- --- # Situation: --- --- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. --- After 10 minutes, the command center orders the Su-25T to engage the zone and execute a CAS. --- After 12 minutes, the mission is aborted. --- --- # Test cases: --- --- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. --- 2. The Su-25T are not detecting any target during the patrol. --- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone --- 3.1. The approach speed to the engage zone is set to 350 km/h. --- 3.2. The altitude to the engage zone and CAS execution is set to 4000 meters. --- 4. Observe the mission being aborted. A message will be sent. --- 5. The Su-25T will go back patrolling. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 600, 350, 4000 ) -- Engage after 10 minutes with a speed of 350 km/h and an altitude of 4000 meters. - --- After 12 minutes, tell the group CASPlane to abort the engagement. -AICasZone:__Abort( 720 ) -- Abort the engagement. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - -function AICasZone:OnAfterAbort(Controllable,From,Event,To) - BASE:E( "MISSION ABORT! Back to patrol zone." ) - MESSAGE:New("Mission ABORTED! Back to the Patrol Zone!",30,"ALERT!"):ToAll() -end - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.miz b/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.miz deleted file mode 100644 index b578cd7..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/CAS-004 - CAS in a Zone by Airplane Group - Test Abort.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-004 - CAS in a Zone by Airplane Group - Test Abort/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.lua b/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.lua deleted file mode 100644 index 203eed0..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.lua +++ /dev/null @@ -1,78 +0,0 @@ ---- --- Name: CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend --- Author: FlightControl --- Date Created: 18 Mar 2017 --- --- # Situation: --- --- A group of 4 Su-25T at patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the Su-25T to engage the zone and execute a CAS. --- The planes should expend 4 weapons per run. --- --- # Test cases: --- --- 1. Observe that the Su-25T is patrolling in the patrol zone, until the engage command is given. --- 2. The Su-25T are not detecting any target during the patrol. --- 3. When the Su-25T is commanded to engage, the group will fly to the engage zone --- 3.1. The approach speed to the engage zone is set to 400 km/h. --- 3.2. The altitude to the engage zone and CAS execution is set to 500 meters. --- 3.3. The planes should expend 4 weapons per run. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the Su-25T eliminating the targets. --- 6. Observe the Su-25T defenses. --- 7. When all targets within the engage zone are destroyed, the Su-25T CAS task is set to Accomplished. --- 8. The Su-25T will return to base. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Plane" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 1 minute, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 60, 600, 8000, AI.Task.WeaponExpend.FOUR ) -- Engage with a speed of 600 km/h and an altitude of 8000 meters, weapn expend 4. - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.miz b/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.miz deleted file mode 100644 index ca0b1b0..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-005 - CAS in a Zone by Airplane Group - Engage with WeaponExpend/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.lua b/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.lua deleted file mode 100644 index 42f76f3..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.lua +++ /dev/null @@ -1,76 +0,0 @@ ---- --- Name: CAS-010 - CAS in a Zone by Helicopter --- Author: FlightControl --- Date Created: 6 February 2017 --- --- # Situation: --- --- A group of 1 Ka-50 patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the Ka-50 to engage the zone and execute a CAS. --- --- # Test cases: --- --- 1. Observe that the Ka-50 is patrolling in the patrol zone, until the engage command is given. --- 2. The Ka-50 are not detecting any target during the patrol. --- 3. When the Ka-50 is commanded to engage, the group will fly to the engage zone. --- 3.1. Engage Speed is set to 100 km/h. --- 3.2. Engage Altitude is set to 150 meters. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the Ka-50 eliminating the targets. --- 6. Observe the Ka-50 defenses. --- 7. When all targets within the engage zone are destroyed, the Ka-50 CAS task is set to Accomplished. --- 8. The Ka-50 will return to base. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Helicopter" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 60, 100, 150 ) - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz b/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz deleted file mode 100644 index c603a51..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/CAS-010 - CAS in a Zone by Helicopter.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-010 - CAS in a Zone by Helicopter/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.lua b/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.lua deleted file mode 100644 index dbf2bcb..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.lua +++ /dev/null @@ -1,75 +0,0 @@ ---- --- Name: CAS-011 - CAS in a Zone by Helicopter Group --- Author: FlightControl --- Date Created: 6 February 2017 --- --- # Situation: --- --- A group of 4 Ka-50 patrolling north of an engage zone for 1 minute. --- After 1 minute, the command center orders the Ka-50 to engage the zone and execute a CAS. --- --- # Test cases: --- --- 1. Observe that the Ka-50 is patrolling in the patrol zone, until the engage command is given. --- 2. The Ka-50 are not detecting any target during the patrol. --- 3. When the Ka-50 is commanded to engage, the group will fly to the engage zone. --- 3.1. Engage Speed is set to 100 km/h. --- 3.2. Engage Altitude is set to 150 meters. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the Ka-50 eliminating the targets. --- 6. Observe the Ka-50 defenses. --- 7. When all targets within the engage zone are destroyed, the Ka-50 CAS task is set to Accomplished. --- 8. The Ka-50 will return to base. - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variable (in this case called CASPlane) and --- using the GROUP function find the aircraft group called "Plane" and assign to this variable -CASPlane = GROUP:FindByName( "Helicopter" ) - --- Create a local Variable (in this cased called PatrolZone and --- using the ZONE function find the pre-defined zone called "Patrol Zone" and assign it to this variable -PatrolZone = ZONE:New( "Patrol Zone" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZone = AI_CAS_ZONE:New( PatrolZone, 500, 1000, 500, 600, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZone:SetControllable( CASPlane ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZone:__Start( 1 ) -- They should statup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlane to engage the targets located in the engagement zone called CASEngagement Zone. (600 is 600 seconds) -AICasZone:__Engage( 60, 100, 150 ) - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Plane will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - AICasZone:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZone:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - Check:Stop( CheckScheduleID ) - AICasZone:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz b/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz deleted file mode 100644 index 37dd8c9..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/CAS-011 - CAS in a Zone by Helicopter Group.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-011 - CAS in a Zone by Helicopter Group/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.lua b/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.lua deleted file mode 100644 index 05d2beb..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.lua +++ /dev/null @@ -1,91 +0,0 @@ ---- --- Name: CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups --- Author: FlightControl --- Date Created: 6 February 2017 --- --- # Situation: --- --- A group of 4 Ka-50 and 5 Su-25T are patrolling north in two engage zone for 5 minutes. --- After 5 minutes, the command center orders the groups to engage the zone and execute a CAS. --- --- # Test cases: --- --- 1. Observe that the groups is patrolling in the patrol zone, until the engage command is given. --- 2. The groups are not detecting any target during the patrol. --- 3. When the groups is commanded to engage, the group will fly to the engage zone. --- 3.1. Engage Speed for the Su-25T is set to 350 km/h. --- 3.2. Engage Altitude for the Su-25T is set to 1500 meters. --- 3.3. Engage Speed for the Ka-50 is set to 100 km/h. --- 3.4. Engage Altitude for the Ka-50 is set to 150 meters. --- 4. Detection is activated and detected targets within the engage zone are assigned for CAS. --- 5. Observe the groups eliminating the targets. --- 6. Observe the groups defenses. --- 7. When all targets within the engage zone are destroyed, the groups CAS task is set to Accomplished. --- 8. The groups will return to base. - - - --- Create a local variable (in this case called CASEngagementZone) and --- using the ZONE function find the pre-defined zone called "Engagement Zone" --- currently on the map and assign it to this variable -CASEngagementZone = ZONE:New( "Engagement Zone" ) - --- Create a local variables (in this case called CASPlane and CASHelicopters) and --- using the GROUP function find the aircraft group called "Plane" and "Helicopter" and assign to these variables -CASPlane = GROUP:FindByName( "Plane" ) -CASHelicopter = GROUP:FindByName( "Helicopter" ) - --- Create two patrol zones, one for the Planes and one for the Helicopters. -PatrolZonePlanes = ZONE:New( "Patrol Zone Planes" ) -PatrolZoneHelicopters = ZONE:New( "Patrol Zone Helicopters" ) - --- Create and object (in this case called AICasZone) and --- using the functions AI_CAS_ZONE assign the parameters that define this object --- (in this case PatrolZone, 500, 1000, 500, 600, CASEngagementZone) -AICasZonePlanes = AI_CAS_ZONE:New( PatrolZonePlanes, 400, 500, 500, 2500, CASEngagementZone ) -AICasZoneHelicopters = AI_CAS_ZONE:New( PatrolZoneHelicopters, 100, 250, 300, 1000, CASEngagementZone ) - --- Create an object (in this case called Targets) and --- using the GROUP function find the group labeled "Targets" and assign it to this object -Targets = GROUP:FindByName("Targets") - - --- Tell the program to use the object (in this case called CASPlane) as the group to use in the CAS function -AICasZonePlanes:SetControllable( CASPlane ) -AICasZoneHelicopters:SetControllable( CASHelicopter ) - --- Tell the group CASPlane to start the mission in 1 second. -AICasZonePlanes:__Start( 1 ) -- They should startup, and start patrolling in the PatrolZone. -AICasZoneHelicopters:__Start( 1 ) -- They should startup, and start patrolling in the PatrolZone. - --- After 10 minutes, tell the group CASPlanes and CASHelicopters to engage the targets located in the engagement zone called CASEngagement Zone. -AICasZonePlanes:__Engage( 300, 350, 1500 ) -- Engage with a speed of 350 km/h and 1500 meter altitude. -AICasZoneHelicopters:__Engage( 300, 100, 150 ) -- Engage with a speed of 100 km/h and 150 meter altitude. - - --- Check every 60 seconds whether the Targets have been eliminated. --- When the trigger completed has been fired, the Planes and Helicopters will go back to the Patrol Zone. -Check, CheckScheduleID = SCHEDULER:New(nil, - function() - if Targets:IsAlive() and Targets:GetSize() > 5 then - BASE:E( "Test Mission: " .. Targets:GetSize() .. " targets left to be destroyed.") - else - BASE:E( "Test Mission: The required targets are destroyed." ) - Check:Stop( CheckScheduleID ) - AICasZonePlanes:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - AICasZoneHelicopters:__Accomplish( 1 ) -- Now they should fly back to teh patrolzone and patrol. - end - end, {}, 20, 60, 0.2 ) - - --- When the targets in the zone are destroyed, (see scheduled function), the planes will return home ... -function AICasZonePlanes:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Su-25T back to base." ) - AICasZonePlanes:__RTB( 1 ) -end - --- When the targets in the zone are destroyed, (see scheduled function), the helicpters will return home ... -function AICasZoneHelicopters:OnAfterAccomplish( Controllable, From, Event, To ) - BASE:E( "Test Mission: Sending the Ka-50 back to base." ) - AICasZoneHelicopters:__RTB( 1 ) -end diff --git a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.miz b/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.miz deleted file mode 100644 index 69632d1..0000000 Binary files a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups.miz and /dev/null differ diff --git a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/pack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/unpack.ps1 b/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAS - Close Air Support/CAS-111 - Multiple CAS in 1 Radius Zone by Helicopter and AirPlane Groups/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua b/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua deleted file mode 100644 index 97d1584..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.lua +++ /dev/null @@ -1,110 +0,0 @@ ---- --- Name: CAZ-001 - Capture Zone --- Author: FlightControl --- Date Created: 13 January 2017 --- --- # Situation: --- --- # Test cases: --- - -do -- Setup the Command Centers - - RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" ) - US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) - -end - -do -- Missions - - US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary", - "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" .. - "There are five random capture zones located at the airbase.\n" .. - "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " .. - "and occupy each capture zone with a platoon.\n " .. - "Your orders are to hold position until all capture zones are taken.\n" .. - "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. - "Note that heavy resistance can be expected at the airbase!\n" .. - "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!" - , coalition.side.RED) - - US_Score = SCORING:New( "CAZ-001 - Capture Zone" ) - - US_Mission_EchoBay:AddScoring( US_Score ) - - US_Mission_EchoBay:Start() - -end - - - - - - -CaptureZone = ZONE:New( "CaptureZone" ) - -ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) - - ---- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) - if From ~= To then - local Coalition = self:GetCoalition() - self:E( { Coalition = Coalition } ) - if Coalition == coalition.side.BLUE then - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterEmpty() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green ) - US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) -end - - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterAttacked() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterCaptured() - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - - self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 ) - - self:__Guard( 30 ) -end - -ZoneCaptureCoalition:__Guard( 1 ) - -ZoneCaptureCoalition:Start( 30, 30 ) - - - diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz b/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz deleted file mode 100644 index 10f77d7..0000000 Binary files a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/CAZ-001 - Capture Zone.miz and /dev/null differ diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/pack.ps1 b/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/unpack.ps1 b/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-001 - Capture Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua b/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua deleted file mode 100644 index 97d1584..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.lua +++ /dev/null @@ -1,110 +0,0 @@ ---- --- Name: CAZ-001 - Capture Zone --- Author: FlightControl --- Date Created: 13 January 2017 --- --- # Situation: --- --- # Test cases: --- - -do -- Setup the Command Centers - - RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" ) - US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) - -end - -do -- Missions - - US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary", - "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" .. - "There are five random capture zones located at the airbase.\n" .. - "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " .. - "and occupy each capture zone with a platoon.\n " .. - "Your orders are to hold position until all capture zones are taken.\n" .. - "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. - "Note that heavy resistance can be expected at the airbase!\n" .. - "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!" - , coalition.side.RED) - - US_Score = SCORING:New( "CAZ-001 - Capture Zone" ) - - US_Mission_EchoBay:AddScoring( US_Score ) - - US_Mission_EchoBay:Start() - -end - - - - - - -CaptureZone = ZONE:New( "CaptureZone" ) - -ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) - - ---- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) - if From ~= To then - local Coalition = self:GetCoalition() - self:E( { Coalition = Coalition } ) - if Coalition == coalition.side.BLUE then - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterEmpty() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green ) - US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) -end - - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterAttacked() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterCaptured() - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - - self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 ) - - self:__Guard( 30 ) -end - -ZoneCaptureCoalition:__Guard( 1 ) - -ZoneCaptureCoalition:Start( 30, 30 ) - - - diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz b/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz deleted file mode 100644 index cbb6800..0000000 Binary files a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/CAZ-002 - Attack Zone.miz and /dev/null differ diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/pack.ps1 b/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/unpack.ps1 b/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-002 - Attack Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua b/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua deleted file mode 100644 index 7a477de..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.lua +++ /dev/null @@ -1,114 +0,0 @@ ---- --- Name: CAZ-500 - Task Capture Zone --- Author: FlightControl --- Date Created: 13 January 2017 --- --- # Situation: --- --- # Test cases: --- - -do -- Setup the Command Centers - - RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" ) - US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) - -end - -do -- Missions - - US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary", - "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" .. - "There are five random capture zones located at the airbase.\n" .. - "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " .. - "and occupy each capture zone with a platoon.\n " .. - "Your orders are to hold position until all capture zones are taken.\n" .. - "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. - "Note that heavy resistance can be expected at the airbase!\n" .. - "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!" - , coalition.side.RED) - - US_Score = SCORING:New( "CAZ-001 - Capture Zone" ) - - US_Mission_EchoBay:AddScoring( US_Score ) - - US_Mission_EchoBay:Start() - -end - - - - - - -CaptureZone = ZONE:New( "Alpha-001" ) - -ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) - - ---- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) - if From ~= To then - local Coalition = self:GetCoalition() - self:E( { Coalition = Coalition } ) - if Coalition == coalition.side.BLUE then - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterEmpty() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green ) - US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) -end - - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterAttacked() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterCaptured() - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - - self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 ) - - self:__Guard( 30 ) -end - -ZoneCaptureCoalition:MonitorDestroyedUnits() -ZoneCaptureCoalition:__Guard( 1 ) - --- Create the tasks under the mission - -local ZoneCaptureGroupSet = SET_GROUP:New():FilterCoalitions("blue"):FilterStart() - -local US_Task_Zone_Capture = TASK_ZONE_CAPTURE:New( US_Mission_EchoBay, ZoneCaptureGroupSet, ZoneCaptureCoalition:GetZoneName(), ZoneCaptureCoalition ) - -US_CC:SetMenu() \ No newline at end of file diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz b/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz deleted file mode 100644 index c7fc30c..0000000 Binary files a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/CAZ-500 - Task Capture Zone.miz and /dev/null differ diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/pack.ps1 b/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/unpack.ps1 b/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CAZ - Capture Zones/CAZ-500 - Task Capture Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua b/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua deleted file mode 100644 index 4df5cc8..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.lua +++ /dev/null @@ -1,11 +0,0 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrier ) - diff --git a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz b/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz deleted file mode 100644 index d2a625b..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/CGO-001 - Unit Boarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-001 - Unit Boarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua b/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua deleted file mode 100644 index bbc6edc..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.lua +++ /dev/null @@ -1,11 +0,0 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. -InfantryCargo:Load( CargoCarrier ) - --- This will Unboard the Cargo from the Carrier. -InfantryCargo:UnBoard() \ No newline at end of file diff --git a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz b/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz deleted file mode 100644 index 03a8726..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/CGO-002 - Unit Unboarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-002 - Unit Unboarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua b/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua deleted file mode 100644 index 6cf1b1f..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.lua +++ /dev/null @@ -1,25 +0,0 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) - -CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrierFrom ) - --- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. -function InfantryCargo:OnEnterLoaded() - self:__UnBoard( 1 ) - self.OnEnterLoaded = nil -end - --- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. -function InfantryCargo:OnEnterUnLoaded() - self:__Board( 1, CargoCarrierTo ) - self.OnEnterUnLoaded = nil -end - diff --git a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz b/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz deleted file mode 100644 index e490327..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/CGO-003 - Unit Transferring.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-003 - Unit Transferring/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua b/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua deleted file mode 100644 index 041dcb9..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.lua +++ /dev/null @@ -1,25 +0,0 @@ ---- --- Name: CGO-101 - Group Boarding --- Author: FlightControl --- Date Created: 13 Apr 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is boarding the Carrier "Carrier". --- --- # Test cases: --- --- 1. Observe that the cargo is boarding. --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrier, 25 ) - diff --git a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz b/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz deleted file mode 100644 index ffb2f04..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/CGO-101 - Group Boarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-101 - Group Boarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua b/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua deleted file mode 100644 index 562338d..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.lua +++ /dev/null @@ -1,25 +0,0 @@ ---- --- Name: CGO-102 - Group Unboarding --- Author: FlightControl --- Date Created: 13 Apr 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is unboarding the Carrier "Carrier". --- --- # Test cases: --- --- 1. Observe that the cargo is unboarding. --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This will Load immediately the Cargo into the Carrier, regardless where the Cargo is. -InfantryCargo:Load( CargoCarrier ) - --- This will Unboard the Cargo from the Carrier. -InfantryCargo:UnBoard() \ No newline at end of file diff --git a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz b/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz deleted file mode 100644 index ebc2f91..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/CGO-102 - Group Unboarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-102 - Group Unboarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua b/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua deleted file mode 100644 index 61176ff..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- --- Name: CGO-103 - Group Tranferring --- Author: FlightControl --- Date Created: 13 Apr 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is tranferring from the APC "CarrierFrom" to the APC "CarrierTo". --- --- # Test cases: --- --- 1. Observe that the cargo is boarding the APC "CarrierFrom". --- 2. Observe that the cargo is unboarding the APC "CarrierFrom". --- 3. Observe that the cargo is boarding the APC "CarrierTo". --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrierFrom = UNIT:FindByName( "CarrierFrom" ) - -local CargoCarrierTo = UNIT:FindByName( "CarrierTo" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrierFrom, 20 ) - --- Once the Cargo has been loaded into the Carrier, drive to a point and unload the Cargo. -function InfantryCargo:OnEnterLoaded() - self:__UnBoard( 1 ) - self.OnEnterLoaded = nil -end - --- Once the Cargo has been unloaded from the Carrier (the Cargo has arrived to the unload gathering point), OnBoard the Cargo in the other Carrier. -function InfantryCargo:OnEnterUnLoaded() - self:__Board( 1, CargoCarrierTo, 20 ) - self.OnEnterUnLoaded = nil -end diff --git a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz b/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz deleted file mode 100644 index a1770fb..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/CGO-103 - Group Transferring.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-103 - Group Transferring/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua b/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua deleted file mode 100644 index a7f0a68..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: CGO-110 - Group Respawn --- Author: FlightControl --- Date Created: 07 Jul 2017 --- --- # Situation: --- --- A cargo group called Infantry with Engineers is Respawned after boarding the carrier. --- --- # Test cases: --- --- 1. Observe that the cargo is Respawned after boarding the Carrier. --- - -local InfantryGroup = GROUP:FindByName( "Infantry" ) - -local InfantryCargo = CARGO_GROUP:New( InfantryGroup, "Engineers", "Infantry Engineers", 2000 ) - -local CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -InfantryCargo:Board( CargoCarrier, 25 ) - -function InfantryCargo:OnEnterLoaded() - InfantryCargo:Respawn() - InfantryCargo:Board( CargoCarrier, 25 ) -end \ No newline at end of file diff --git a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz b/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz deleted file mode 100644 index 9fd5e6d..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/CGO-110 - Group Respawn.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-110 - Group Respawn/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua b/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua deleted file mode 100644 index c26fa24..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.lua +++ /dev/null @@ -1,11 +0,0 @@ - -DeliveryUnit = UNIT:FindByName( "Delivery" ) -Letter = AI_CARGO_PACKAGE:New( DeliveryUnit, "Letter", "Secret Orders", "0.3", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -Letter:Board( CargoCarrier, 40, 3, 25, 90 ) - diff --git a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz b/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz deleted file mode 100644 index 9338661..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/CGO-201 - Package Boarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-201 - Package Boarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua b/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua deleted file mode 100644 index 716b618..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.lua +++ /dev/null @@ -1,13 +0,0 @@ - -CargoEngineer = UNIT:FindByName( "Engineer" ) -InfantryCargo = AI_CARGO_UNIT:New( CargoEngineer, "Engineer", "Engineer Sven", "81", 2000, 25 ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This will Load the Cargo into the Carrier, regardless where the Cargo is. -InfantryCargo:Load( CargoCarrier ) - --- This will Unboard the Cargo from the Carrier. --- The Cargo will run from the Carrier to a point in the NearRadius around the Carrier. --- Unboard the Cargo with a speed of 10 km/h, go to 200 meters 180 degrees from the Carrier, iin a zone of 25 meters (NearRadius). -InfantryCargo:UnBoard( 10, 2, 20, 10, 180 ) \ No newline at end of file diff --git a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz b/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz deleted file mode 100644 index 67f2fda..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/CGO-202 - Package Unboarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-202 - Package Unboarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua b/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua deleted file mode 100644 index 9bedd3b..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.lua +++ /dev/null @@ -1,11 +0,0 @@ - -Barrels = STATIC:FindByName( "Barrels" ) -CargoBarrels = CARGO_CRATE:New( Barrels, "EAQ-234-432" ) - -CargoCarrier = UNIT:FindByName( "Carrier" ) - --- This call will make the Cargo run to the CargoCarrier. --- Upon arrival at the CargoCarrier, the Cargo will be Loaded into the Carrier. --- This process is now fully automated. -CargoBarrels:Load( CargoCarrier ) - diff --git a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz b/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz deleted file mode 100644 index 1fcabfc..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/CGO-300 - Crate Boarding.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-300 - Crate Boarding/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua b/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua deleted file mode 100644 index 0db80b2..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.lua +++ /dev/null @@ -1,3 +0,0 @@ -InfantryUnitSet = SET_UNIT:New():FilterCategories("ground"):FilterPrefixes("Infantry"):FilterOnce() -InfantryUnitSet:Flush() - diff --git a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz b/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz deleted file mode 100644 index d4bb8f8..0000000 Binary files a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/CGO-900 - Cargo sets.miz and /dev/null differ diff --git a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/pack.ps1 b/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/unpack.ps1 b/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CGO - Cargo/CGO-900 - Cargo sets/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua b/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua deleted file mode 100644 index 5f2b3a5..0000000 --- a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.lua +++ /dev/null @@ -1,14 +0,0 @@ - - - - -Clean = CLEANUP_AIRBASE:New( AIRBASE.Caucasus.Batumi ) -Clean:SetCleanMissiles( false ) - - -SpawnRU = SPAWN:New( 'RU Attack Heli Batumi'):InitLimit( 2, 120 ):SpawnScheduled( 10, 0 ) - -SpawnUS = SPAWN:New( 'US Attack Heli Batumi'):InitLimit( 2, 120 ):SpawnScheduled( 10, 0 ) - -SpawnTransport = SPAWN:New( "US Transport"):SpawnScheduled( 90, 0 ) - diff --git a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz b/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz deleted file mode 100644 index 5357dad..0000000 Binary files a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/CLA-001 - CleanUp Airbase.miz and /dev/null differ diff --git a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/pack.ps1 b/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/unpack.ps1 b/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/CLA - CleanUp Airbase/CLA-001 - CleanUp Airbase/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua b/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua deleted file mode 100644 index 1bdca35..0000000 --- a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.lua +++ /dev/null @@ -1,568 +0,0 @@ ---- Gori Valley designed with the MOOSE framework for DCS World. --- Author: FlightControl - --- Define the headquarters. - -NATO_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ NATO Gori" ), "Gori" ) -CCCP_HQ = COMMANDCENTER:New( GROUP:FindByName( "HQ CCCP Tskinvali" ), "Tskinvali" ) - - --- Define the scoring object. - -Score = SCORING:New( "Gori Valley" ) - -Score:SetScaleDestroyScore( 40 ) -Score:SetScaleDestroyPenalty( 80 ) -Score:SetFratricide( 80 ) -Score:SetMessagesHit( false ) - - ---- Cargo Dispatching - -do - - local SetCargoInfantry = SET_CARGO:New():FilterTypes( "Infantry" ):FilterStart() - local SetHelicopter = SET_GROUP:New():FilterPrefixes( "US CH-47D@RAMP Troop Deployment" ):FilterStart() - local SetDeployZones = SET_ZONE:New():FilterPrefixes( "US Troops Landing Zone" ):FilterStart() - - NATO_AI_Cargo_Dispatcher_Helicopter = AI_CARGO_DISPATCHER_HELICOPTER:New( SetHelicopter, SetCargoInfantry, SetDeployZones ) - NATO_AI_Cargo_Dispatcher_Helicopter:SetPickupRadius( 50, 25 ) - NATO_AI_Cargo_Dispatcher_Helicopter:SetDeployRadius( 1000, 500 ) - NATO_AI_Cargo_Dispatcher_Helicopter:Start() - -end - --- CCCP COALITION UNITS - --- Russian helicopters engaging the battle field in Gori Valley -Spawn_RU_KA50 = SPAWN - :New( "RU KA-50@HOT-Patriot Attack" ) - :InitLimit( 1, 24 ) - :InitRandomizeRoute( 1, 1, 8000 ) - :InitCleanUp( 180 ) - :SpawnScheduled( 1200, 0.2 ) - --- Russian ground troops attacking Gori Valley -Spawn_RU_Troops = - { 'RU Attack Gori 1', - 'RU Attack Gori 2', - 'RU Attack Gori 3', - 'RU Attack Gori 4', - 'RU Attack Gori 5', - 'RU Attack Gori 6', - 'RU Attack Gori 7', - 'RU Attack Gori 8', - 'RU Attack Gori 9', - 'RU Attack Gori 10' - } - - -Spawn_RU_Troops_Left = SPAWN - :New( "RU Attack Gori Left" ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_RU_Troops ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 349, 30, 20, 6 * 20 ) - :SpawnScheduled( 120, 1 ) - -Spawn_RU_Troops_Middle = SPAWN - :New( "RU Attack Gori Middle" ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_RU_Troops ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 260, 50, 20, 6 * 20 ) - :SpawnScheduled( 120, 1 ) - -Spawn_RU_Troops_Right = SPAWN - :New( "RU Attack Gori Right" ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_RU_Troops ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 238, 50, 20, 6 * 20 ) - :SpawnScheduled( 120, 1 ) - - --- NATO Tank Platoons invading Tskinvali - -Spawn_US_Platoon = - { 'US Tank Platoon 1', - 'US Tank Platoon 2', - 'US Tank Platoon 3', - 'US Tank Platoon 4', - 'US Tank Platoon 5', - 'US Tank Platoon 6', - 'US Tank Platoon 7', - 'US Tank Platoon 8', - 'US Tank Platoon 9', - 'US Tank Platoon 10', - 'US Tank Platoon 11', - 'US Tank Platoon 12', - 'US Tank Platoon 13' - } - -Spawn_US_Platoon_Left = SPAWN - :New( 'US Tank Platoon Left' ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_US_Platoon ) - :InitRandomizeRoute( 3, 1, 2000 ) - --:InitArray( 76, 20, 15, 15*6 ) - :SpawnScheduled( 120, 1 ) - -Spawn_US_Platoon_Middle = SPAWN - :New( 'US Tank Platoon Middle' ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_US_Platoon ) - :InitRandomizeRoute( 3, 1, 2000 ) - --:InitArray( 160, 20, 15, 15*6 ) - :SpawnScheduled( 120, 1 ) - -Spawn_US_Platoon_Right = SPAWN - :New( 'US Tank Platoon Right' ) - :InitLimit( 15, 40 ) - :InitRandomizeTemplate( Spawn_US_Platoon ) - :InitRandomizeRoute( 1, 1, 2000 ) - --:InitArray( 90, 20, 15, 15*6 ) - :SpawnScheduled( 120, 1 ) - - - -do -- NATO Air Patrol Support Mission - - - local NATO_S1 = MISSION - :New( NATO_HQ, "Intercept Intruders","Support","Intercept any intruders invading airspace from the North!", coalition.side.BLUE ) - :AddScoring( Score ) - - -- Define the Recce groups that will detect the upcoming ground forces. - local NATO_S1_EWR = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "AI NATO EWR A2A" ):FilterStart() - - -- Define the detection method, we'll use here AREA detection. - local NATO_S1_EWR_Areas = DETECTION_AREAS:New( NATO_S1_EWR, 20000 ) - NATO_S1_EWR_Areas:SetFriendliesRange( 80000 ) - NATO_S1_EWR_Areas:SetRefreshTimeInterval( 30 ) - NATO_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets within 250km. - - local NATO_S1_Task = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "S1 NATO Air Patrol" ):FilterStart() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - NATO_S1_A2A = TASK_A2A_DISPATCHER:New( NATO_S1, NATO_S1_Task, NATO_S1_EWR_Areas ) - - - local NATO_AI_A2A_Support_East = { - "AI NATO Air Support East F-16A A", - "AI NATO Air Support East F-16A B", - } - - local NATO_AI_A2A_Support_West = { - "AI NATO Air Support West F-16A A", - "AI NATO Air Support West F-16A B", - } - - NATO_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( NATO_S1_EWR_Areas ) - - NATO_AI_A2A_Dispatcher:SetTacticalDisplay( false ) - - NATO_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) - NATO_AI_A2A_Dispatcher:SetGciRadius( 140000 ) - - NATO_AI_A2A_Dispatcher:SetSquadron( "Kutaisi", AIRBASE.Caucasus.Kutaisi, NATO_AI_A2A_Support_West, 20 ) - NATO_AI_A2A_Dispatcher:SetSquadronCap( "Kutaisi", ZONE_POLYGON:New( "NATO CAP EAST", GROUP:FindByName( "NATO CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) - NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Kutaisi", 2, 180, 300 ) - - NATO_AI_A2A_Dispatcher:SetSquadronGci( "Kutaisi", 800, 1200 ) - - NATO_AI_A2A_Dispatcher:SetSquadron( "Vaziani", AIRBASE.Caucasus.Vaziani, NATO_AI_A2A_Support_East, 20 ) - NATO_AI_A2A_Dispatcher:SetSquadronCap( "Vaziani", ZONE_POLYGON:New( "NATO CAP WEST", GROUP:FindByName( "NATO CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) - NATO_AI_A2A_Dispatcher:SetSquadronCapInterval( "Vaziani", 2, 180, 300 ) - - NATO_AI_A2A_Dispatcher:SetSquadronGci( "Vaziani", 800, 1200 ) - -end - - -do -- NATO Mission 1 - - - local NATO_M1 = MISSION - :New( NATO_HQ, "Destroy SAM-6","Primary","Destroy SAM-6 batteries", coalition.side.BLUE ) - :AddScoring( Score ) - - - -- Define the Recce groups that will detect the upcoming ground forces. - local NATO_M1_RecceSet = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes( "M1 NATO Recce" ):FilterStart() - - NATO_M1_Spawn_Reaper = SPAWN - :New( "M1 NATO Recce Reaper" ) - :InitLimit( 1, 5 ) - :SpawnScheduled( 300, 0 ) - - - NATO_M1_ReccePatrolArray = {} - NATO_M1_RecceSpawn_US = SPAWN - :New( "M1 NATO Recce AH-64" ) - :InitLimit( 2, 10 ) - :SpawnScheduled( 60, 0.4 ) - :InitCleanUp( 300 ) - :OnSpawnGroup( - function( SpawnGroup ) - NATO_M1_RecceSpawn_US:E( SpawnGroup.ControllableName ) - local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 US Patrol Zone@ZONE" ) - local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) - local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) - NATO_M1_ReccePatrolArray[#NATO_M1_ReccePatrolArray+1] = M1_ReccePatrol - - M1_ReccePatrol:SetControllable( SpawnGroup ) - M1_ReccePatrol:__Start( 30 ) -- It takes a bit of time for the Recce to start - end - ) - - - -- Define the detection method, we'll use here AREA detection. - local NATO_M1_DetectionAreas = DETECTION_AREAS:New( NATO_M1_RecceSet, 1000 ) - --M1_DetectionAreas:BoundDetectedZones() - - local NATO_M1_Attack = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "M1 NATO Attack" ):FilterStart() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - NATO_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( NATO_M1, NATO_M1_Attack, NATO_M1_DetectionAreas ) - - NATO_M1_Designate = DESIGNATE:New( NATO_HQ, NATO_M1_DetectionAreas, NATO_M1_Attack, NATO_M1 ) - - -end - - -do -- NATO Transport Task Engineers - - local NATO_M4_Patriots = MISSION - :New( NATO_HQ, - "Engineers Patriots", - "Operational", - "Transport 3 engineering teams to three strategical Patriot launch sites. " .. - "The launch sites are not yet complete and need some special launch codes to be delivered. " .. - "The engineers have the knowledge to install these launch codes. ", - coalition.side.BLUE ) - - local NATO_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 NATO Patriot Transport" ):FilterStart() - - local NATO_M4_SetCargo = SET_CARGO:New():FilterTypes( { "Patriot Engineers" } ):FilterStart() - - local EngineersCargo1 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Bear" ), "Patriot Engineers", "Team Bear", 500 ):RespawnOnDestroyed(true) - local EngineersCargo2 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Moose" ), "Patriot Engineers", "Team Moose", 500 ):RespawnOnDestroyed(true) - local EngineersCargo3 = CARGO_GROUP:New( GROUP:FindByName( "M4 NATO Engineers Falcon" ), "Patriot Engineers", "Team Falcon", 500 ):RespawnOnDestroyed(true) - - - -- These are the groups of the SA-6 batteries. - local Patriots1 = GROUP:FindByName( "M4 NATO Patriot North" ):SetAIOff() - local Patriots2 = GROUP:FindByName( "M4 NATO Patriot West" ):SetAIOff() - local Patriots3 = GROUP:FindByName( "M4 NATO Patriot East" ):SetAIOff() - - -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! - local Zone_Patriots1 = ZONE_GROUP:New( "Patriots North", Patriots1, 600 ) - local Zone_Patriots2 = ZONE_GROUP:New( "Patriots West", Patriots2, 600 ) - local Zone_Patriots3 = ZONE_GROUP:New( "Patriots East", Patriots3, 600 ) - - NATO_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( NATO_M4_Patriots, NATO_M4_HeloSetGroup ) - - local NATO_M4_Cargo_Transport_TaskName = NATO_M4_Cargo_Transport_Dispatcher:AddTransportTask( - "Activate Patriot Batteries", - NATO_M4_SetCargo, - "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the Patriot launchers. " .. - "Deployment zones have been defined at each Patriot location." - ) - - NATO_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( NATO_M4_Cargo_Transport_TaskName, { Zone_Patriots1, Zone_Patriots2, Zone_Patriots3 } ) - - local NATO_M4_Cargo_Transport_Task = NATO_M4_Cargo_Transport_Dispatcher:GetTransportTask( NATO_M4_Cargo_Transport_TaskName ) - - - --- OnAfter Transition Handler for Event CargoDeployed. - -- This event will handle after deployment the activation of the SA-6 site. - -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed - -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @param Wrapper.Unit#UNIT TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. - -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. - -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. - function NATO_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - self:E( { From, Event, To, TaskUnit, Cargo, DeployZone } ) - - local DeployZoneName = DeployZone:GetName() - local CargoName = Cargo:GetName() - - - NATO_HQ:MessageToCoalition( - string.format( "Engineers %s are successfully transported to patriot site %s.", - CargoName, - DeployZoneName - ) - ) - - if DeployZoneName == Zone_Patriots1:GetName() then - if Patriots1 and not Patriots1:IsAlive() then - local Template = Patriots1:GetTemplate() - Template.lateActivation = false - Template.Visible = false - Patriots1:Respawn(Template) - --Patriots1:SetAIOn() - end - end - - if DeployZoneName == Zone_Patriots2:GetName() then - if Patriots2 and not Patriots2:IsAlive() then - local Template = Patriots2:GetTemplate() - Template.lateActivation = false - Template.Visible = false - Patriots2:Respawn(Template) - --Patriots2:SetAIOn() - end - end - - if DeployZoneName == Zone_Patriots3:GetName() then - if Patriots3 and not Patriots3:IsAlive() then - local Template = Patriots3:GetTemplate() - Template.lateActivation = false - Template.Visible = false - Patriots3:Respawn(Template) - --Patriots3:SetAIOn() - end - end - - if self:IsAllCargoTransported() then - self:Success() - NATO_M4_Patriots:Complete() - end - end - -end - - - - - - -do -- CCCP Air Patrol Support Functions - - - local CCCP_S1 = MISSION - :New( CCCP_HQ, "Provide Air Support","Support","Intercept any bogeys invading airspace from the South or East!", coalition.side.RED ) - :AddScoring( Score ) - - -- Define the Recce groups that will detect the upcoming A2A intruders. - local CCCP_S1_EWR_Groups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "AI CCCP EWR" ):FilterStart() - - -- Define the detection method, we'll use here AREA detection. - local CCCP_S1_EWR_Areas = DETECTION_AREAS:New( CCCP_S1_EWR_Groups, 30000 ) - CCCP_S1_EWR_Areas:SetFriendliesRange( 80000 ) - CCCP_S1_EWR_Areas:SetAcceptRange( 250000 ) -- Only report targets that are within 250km from detection. - --M1_DetectionAreas_US:BoundDetectedZones() - - local CCCP_S1_SupportGroups = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes( "S1 CCCP Air Defense" ):FilterStart() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - CCCP_S1_A2A_Task_Dispatcher = TASK_A2A_DISPATCHER:New( CCCP_S1, CCCP_S1_SupportGroups, CCCP_S1_EWR_Areas ) - - - CCCP_AI_A2A_Support_SU_27 = { - "AI CCCP Air Support SU-27 A", - "AI CCCP Air Support SU-27 B", - "AI CCCP Air Support SU-27 C", - "AI CCCP Air Support SU-27 D" - } - - CCCP_AI_A2A_Support_MIG_29S = { - "AI CCCP Air Support MIG-29S A", - "AI CCCP Air Support MIG-29S B", - "AI CCCP Air Support MIG-29S C", - "AI CCCP Air Support MIG-29S D" - } - - - CCCP_AI_A2A_Dispatcher = AI_A2A_DISPATCHER:New( CCCP_S1_EWR_Areas ) - - CCCP_AI_A2A_Dispatcher:SetTacticalDisplay( false ) - - CCCP_AI_A2A_Dispatcher:SetEngageRadius( 80000 ) - CCCP_AI_A2A_Dispatcher:SetGciRadius( 100000 ) - - -- Beslan - CCCP_AI_A2A_Dispatcher:SetSquadron( "Beslan", AIRBASE.Caucasus.Beslan, CCCP_AI_A2A_Support_SU_27, 20 ) - CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Beslan", ZONE_POLYGON:New( "CCCP CAP EAST", GROUP:FindByName( "CCCP CAP EAST") ), 4000, 8000, 450, 600, 800, 1200, "BARO" ) - CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Beslan", 2, 180, 300 ) - CCCP_AI_A2A_Dispatcher:SetSquadronTakeoffInAir( "Beslan" ) - - -- Mozdok - CCCP_AI_A2A_Dispatcher:SetSquadron( "Mozdok", AIRBASE.Caucasus.Mozdok, CCCP_AI_A2A_Support_SU_27, 20 ) - CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Mozdok", 800, 1200 ) - - CCCP_AI_A2A_Dispatcher:SetSquadron( "Nalchik", AIRBASE.Caucasus.Nalchik, CCCP_AI_A2A_Support_MIG_29S, 20 ) - CCCP_AI_A2A_Dispatcher:SetSquadronCap( "Nalchik", ZONE_POLYGON:New( "CCCP CAP WEST", GROUP:FindByName( "CCCP CAP WEST" ) ), 4000, 8000, 500, 700, 800, 1200, "BARO" ) - CCCP_AI_A2A_Dispatcher:SetSquadronCapInterval( "Nalchik", 2, 180, 300 ) - CCCP_AI_A2A_Dispatcher:SetSquadronGci( "Nalchik", 800, 1200 ) - -end - -do -- CCCP Destroy Patriots - - local CCCP_M1 = MISSION - :New( CCCP_HQ, - "Destroy Patriots", - "Primary", - "Destroy Patriot batteries.", - coalition.side.RED - ) - :AddScoring( Score ) - - -- Define the Recce groups that will detect the upcoming ground forces. - local CCCP_M1_RecceSet = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Recce" ):FilterStart() - - CCCP_M1_Spawn_SU25MR = SPAWN - :New( "M1 CCCP Recce SU-25MR" ) - :InitLimit( 1, 5 ) - :SpawnScheduled( 300, 0.5 ) - - - CCCP_M1_ReccePatrolArray = {} - CCCP_M1_RecceSpawn = SPAWN - :New( "M1 CCCP Recce MI-28N" ) - :InitLimit( 2, 10 ) - :SpawnScheduled( 60, 0.4 ) - :OnSpawnGroup( - function( SpawnGroup ) - local M1_ReccePatrolZoneWP = GROUP:FindByName( "M1 RU Patrol Zone@ZONE" ) - local M1_ReccePatrolZone = ZONE_POLYGON:New( "PatrolZone", M1_ReccePatrolZoneWP ) - local M1_ReccePatrol = AI_PATROL_ZONE:New( M1_ReccePatrolZone, 30, 50, 50, 100 ) - CCCP_M1_ReccePatrolArray[#CCCP_M1_ReccePatrolArray+1] = M1_ReccePatrol - - M1_ReccePatrol:SetControllable( SpawnGroup ) - M1_ReccePatrol:__Start( 20 ) -- It takes a bit of time for the Recce to start - end - ) - - - -- Define the detection method, we'll use here AREA detection. - local CCCP_M1_DetectionAreas = DETECTION_AREAS:New( CCCP_M1_RecceSet, 1000 ) - --M1_DetectionAreas_US:BoundDetectedZones() - - local CCCP_M1_Attack = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "M1 CCCP Attack" ):FilterStart() - CCCP_M1_Attack:Flush() - - -- Define the Task dispatcher that will define the tasks based on the detected targets. - CCCP_M1_Task_A2G_Dispatcher = TASK_A2G_DISPATCHER:New( CCCP_M1, CCCP_M1_Attack, CCCP_M1_DetectionAreas ) - -end - -do -- CCCP Transport Task Engineers - - local CCCP_M4_SA6 = MISSION - :New( CCCP_HQ, - "Engineers SA-6", - "Operational", - "Transport 3 engineering teams to three strategical SA-6 launch sites. " .. - "The launch sites are not yet complete and need some special launch codes to be delivered. " .. - "The engineers have the knowledge to install these launch codes. ", - coalition.side.RED ) - :AddScoring( Score ) - - local CCCP_M4_HeloSetGroup = SET_GROUP:New():FilterPrefixes( "M4 CCCP SA6 Transport" ):FilterStart() - - local CCCP_M4_SA6_SetCargo = SET_CARGO:New():FilterTypes( { "SA6 Engineers" } ):FilterStart() - - local EngineersCargoAlpha = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Alpha" ), "SA6 Engineers", "Team Alpha", 500 ) - local EngineersCargoBeta = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Beta" ), "SA6 Engineers", "Team Beta", 500 ) - local EngineersCargoGamma = CARGO_GROUP:New( GROUP:FindByName( "M4 CCCP Engineers Gamma" ), "SA6 Engineers", "Team Gamma", 500 ) - - CCCP_M4_Cargo_Transport_Dispatcher = TASK_CARGO_DISPATCHER:New( CCCP_M4_SA6, CCCP_M4_HeloSetGroup ) - - local CCCP_M4_Cargo_Transport_TaskName = CCCP_M4_Cargo_Transport_Dispatcher:AddTransportTask( - "Transport SA-6 Engineers", - CCCP_M4_SA6_SetCargo, - "Pickup Engineers Alpha, Beta and Gamma from their current location, and drop them near the SA-6 launchers. " .. - "Deployment zones have been defined at each SA-6 location." - ) - - -- These are the groups of the SA-6 batteries. - local SA6_1 = GROUP:FindByName( "M4 CCCP SA6 Kub Moskva" ):SetAIOff() - local SA6_2 = GROUP:FindByName( "M4 CCCP SA6 Kub Niznij" ):SetAIOff() - local SA6_3 = GROUP:FindByName( "M4 CCCP SA6 Kub Yaroslavl" ):SetAIOff() - - -- Each SA-6 battery has a zone of type ZONE_GROUP. That makes these zone moveable as they drive around the battle field! - local Zone_SA6_1 = ZONE_GROUP:New( "SA6 Moskva", SA6_1, 500 ) - local Zone_SA6_2 = ZONE_GROUP:New( "SA6 Niznij", SA6_2, 500 ) - local Zone_SA6_3 = ZONE_GROUP:New( "SA6 Yaroslavl", SA6_3, 500 ) - - CCCP_M4_Cargo_Transport_Dispatcher:SetTransportDeployZones( CCCP_M4_Cargo_Transport_TaskName, { Zone_SA6_1, Zone_SA6_2, Zone_SA6_3 } ) - local CCCP_M4_Cargo_Transport_Task = CCCP_M4_Cargo_Transport_Dispatcher:GetTransportTask( CCCP_M4_Cargo_Transport_TaskName ) - - --- OnAfter Transition Handler for Event CargoDeployed. - -- This event will handle after deployment the activation of the SA-6 site. - -- @function [parent=#TASK_CARGO_TRANSPORT] OnAfterCargoDeployed - -- @param Tasking.Task_CARGO#TASK_CARGO_TRANSPORT self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @param Wrapper.Unit#UNIT TaskUnit The Unit (Client) that Deployed the cargo. You can use this to retrieve the PlayerName etc. - -- @param Core.Cargo#CARGO Cargo The Cargo that got PickedUp by the TaskUnit. You can use this to check Cargo Status. - -- @param Core.Zone#ZONE DeployZone The zone where the Cargo got Deployed or UnBoarded. - function CCCP_M4_Cargo_Transport_Task:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - - self:E( { From, Event, To, TaskUnit:GetName(), Cargo:GetName(), DeployZone:GetName() } ) - - local DeployZoneName = DeployZone:GetName() - local CargoName = Cargo:GetName() - - - CCCP_HQ:MessageToCoalition( - string.format( "Engineers %s are successfully transported to SA-6 site %s.", - CargoName, - DeployZoneName - ) - ) - - if DeployZoneName == Zone_SA6_1:GetName() then - if SA6_1 and not SA6_1:IsAlive() then - self:E( { GroupActivated = SA6_1:GetName() } ) - local Template = SA6_1:GetTemplate() - Template.lateActivation = false - Template.Visible = false - SA6_1:Respawn(Template) - --SA6_1:SetAIOn() - end - end - - if DeployZoneName == Zone_SA6_2:GetName() then - if SA6_2 and not SA6_2:IsAlive() then - self:E( { GroupActivated = SA6_2:GetName() } ) - local Template = SA6_2:GetTemplate() - Template.lateActivation = false - Template.Visible = false - SA6_2:Respawn(Template) - --SA6_2:SetAIOn() - end - end - - if DeployZoneName == Zone_SA6_3:GetName() then - if SA6_3 and not SA6_3:IsAlive() then - self:E( { GroupActivated = SA6_3:GetName() } ) - local Template = SA6_3:GetTemplate() - Template.lateActivation = false - Template.Visible = false - SA6_3:Respawn(Template) - --SA6_3:SetAIOn() - end - end - - if self:IsAllCargoTransported() then - self:Success() - CCCP_M4_SA6:Complete() - end - end - -end - -MissileTrainer = MISSILETRAINER:New( 100, "Helps with missile tracking" ) - - - diff --git a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz b/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz deleted file mode 100644 index 2bf6a39..0000000 Binary files a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.miz and /dev/null differ diff --git a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx b/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx deleted file mode 100644 index 4860db6..0000000 Binary files a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/GOV - Gori Valley.pptx and /dev/null differ diff --git a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/pack.ps1 b/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/unpack.ps1 b/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DEM - Demo Missions/GOV - Gori Valley/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua b/Moose_Missions/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua deleted file mode 100644 index 66cec41..0000000 --- a/Moose_Missions/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.lua +++ /dev/null @@ -1,36 +0,0 @@ - -CC = COMMANDCENTER:New( GROUP:FindByName( "HQ"), "Maupertus HQ") - -MissionMedical = MISSION:New( CC, "Rescue General", "Urgent", "Rescue the General", coalition.side.BLUE ) - -SetGroupRescue = SET_GROUP:New():FilterPrefixes( "Hero" ):FilterOnce() -SetCargoGeneral = SET_CARGO:New():FilterPrefixes( "General" ):FilterOnce() - -TaskMedicalTransport = TASK_CARGO_DISPATCHER:New( MissionMedical, SetGroupRescue ) -TaskMedicalTransport:AddTransportTask( "Rescue", SetCargoGeneral, "Rescue the wounded general at the airbase Picauville" ) - -function TaskMedicalTransport:OnAfterCargoPickedUp( From, Event, After, Task, TaskPrefix, TaskUnit, Cargo ) - MESSAGE:NewType( "Now fly to the airbase Maupertus to transfer the general to the waiting B-17.", MESSAGE.Type.Briefing ) -end - -function TaskMedicalTransport:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) - MESSAGE:NewType( "OK, you have successfully transferred the general, now ensure the B-17 reaches its destination within the UK.", MESSAGE.Type.Briefing ) - Cargo:SetDeployed( false ) -end - - - --- Enemy defenses - --- Now we will make some random defenses between Picauville and Maupertus. - --- The ZONE_POLYGON object "Enemy Defense Area" has alraedy been declared with the #ZONE_POLYGON tag within the mission editor. --- We just need to find it. - -EnemyArea = ZONE_POLYGON:FindByName( "Enemy Area" ) - --- Here we spawn in the air defenses, based on the templates starting with the Enemy Defenses... -SpawnDefenses = SPAWN:New( "SpawnDefenses" ):InitLimit( 50, 10 ):InitRandomizeTemplatePrefixes( { "Enemy Defense" } ):InitRandomizeZones( { EnemyArea } ):SpawnScheduled( 60, 0 ) - - - diff --git a/Moose_Missions/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz b/Moose_Missions/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz deleted file mode 100644 index c0f1ac1..0000000 Binary files a/Moose_Missions/DEM - Demo Missions/MED - Medical Transport/MED - Medical Transport.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua b/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua deleted file mode 100644 index 8905e43..0000000 --- a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: DES-010 - Designation of AREAS - Threat Level Prioritization --- Author: FlightControl --- Date Created: 24 Apr 2017 --- --- # Situation: --- --- Demonstrates the designation of units, which are grouped in AREAs. --- --- A Set of Recce are detecting a large group of units. --- This test is about the prioritization. First the SAMs should be designated, then the rest. --- --- # Test cases: --- --- - Check if the SAMs are designated first. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) - --- Create a Attack Set, which contains the human player client slots and CA vehicles. -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- This sets the threat level prioritization on -RecceDesignation:SetThreatLevelPrioritization( true ) - --- Set the possible laser codes. -RecceDesignation:GenerateLaserCodes() - -RecceDesignation:AddMenuLaserCode( 1113, "Lase with %d for Su-25T" ) -RecceDesignation:AddMenuLaserCode( 1680, "Lase with %d for A-10A" ) - --- Start the detection process in 5 seconds. -RecceDesignation:__Detect( -5 ) - diff --git a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz b/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz deleted file mode 100644 index 9ab7d2d..0000000 Binary files a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/DES-010 - Designation of AREAS - Threat Level Prioritization.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/pack.ps1 b/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/unpack.ps1 b/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-010 - Designation of AREAS - Threat Level Prioritization/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua b/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua deleted file mode 100644 index 81c4629..0000000 --- a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- --- Name: DES-011 - Designation of AREAS - Empty Set with Threat Levels --- Author: FlightControl --- Date Created: 15 May 2017 --- --- # Situation: --- --- Demonstrates the designation of units, which are grouped in AREAs. --- --- A Set of Recce are detecting a large group of units. --- This test is about not failing the process when the Detected Set is empty, and the LaseOn is activated ... --- --- # Test cases: --- --- - Check nothing is detected, and put lase on. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) - --- Create a Attack Set, which contains the human player client slots and CA vehicles. -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- This sets the threat level prioritization on -RecceDesignation:SetThreatLevelPrioritization( true ) - --- Set the possible laser codes. -RecceDesignation:SetLaserCodes({1113,1131,1256}) - --- Start the detection process in 5 seconds. -RecceDesignation:__Detect( -5 ) - diff --git a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz b/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz deleted file mode 100644 index e34e179..0000000 Binary files a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/DES-011 - Designation of AREAS - Empty Set with Threat Levels.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/pack.ps1 b/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/unpack.ps1 b/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-011 - Designation of AREAS - Empty Set with Threat Levels/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua b/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua deleted file mode 100644 index 9777d1e..0000000 --- a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- --- Name: DES-020 - Designation of AREAS - Status Menu Flash Activate --- Author: FlightControl --- Date Created: 24 Apr 2017 --- --- # Situation: --- --- Demonstrates the designation of units, which are grouped in AREAs. --- --- A Set of Recce are detecting a large group of units. --- This test is about the prioritization. First the SAMs should be designated, then the rest. --- --- # Test cases: --- --- - Check if the SAMs are designated first. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) - --- Create a Attack Set, which contains the human player client slots and CA vehicles. -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- This sets the current status menu flashing on -RecceDesignation:SetFlashStatusMenu( true ) - --- Set the possible laser codes. -RecceDesignation:SetLaserCodes({1113,1131,1256}) - --- Start the detection process in 5 seconds. -RecceDesignation:__Detect( -5 ) - diff --git a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz b/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz deleted file mode 100644 index d9c5ed4..0000000 Binary files a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/DES-020 - Designation of AREAS - Status Menu Flash Activate.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/pack.ps1 b/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/unpack.ps1 b/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-020 - Designation of AREAS - Status Menu Flash Activate/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua b/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua deleted file mode 100644 index 6123068..0000000 --- a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.lua +++ /dev/null @@ -1,58 +0,0 @@ --- Name: DES-100 - UNITS - Night Test --- Author: FlightControl --- Date Created: 23 Apr 2017 --- --- Demonstrates the designation of units, which are grouped per detected UNIT. --- So each DetectedItem contains one detected unit only. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target. --- - Check that when you illuminate a target group, that the target area gets illuminated after a while. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz b/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz deleted file mode 100644 index 9f271f5..0000000 Binary files a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/DES-100 - UNITS - Night Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-100 - UNITS - Night Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua b/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua deleted file mode 100644 index 9526575..0000000 --- a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.lua +++ /dev/null @@ -1,58 +0,0 @@ --- Name: DES-101 - UNITS - Day Test --- Author: FlightControl --- Date Created: 14 Mar 2018 --- --- Demonstrates the designation of units, which are grouped per detected UNIT. --- So each DetectedItem contains one detected unit only. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. --- - Check that when you smoke a target, that a smoke appears at the target. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz b/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz deleted file mode 100644 index 2f8be8e..0000000 Binary files a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/DES-101 - UNITS - Day Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-101 - UNITS - Day Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua b/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua deleted file mode 100644 index 9526575..0000000 --- a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.lua +++ /dev/null @@ -1,58 +0,0 @@ --- Name: DES-101 - UNITS - Day Test --- Author: FlightControl --- Date Created: 14 Mar 2018 --- --- Demonstrates the designation of units, which are grouped per detected UNIT. --- So each DetectedItem contains one detected unit only. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. --- - Check that when you smoke a target, that a smoke appears at the target. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz b/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz deleted file mode 100644 index 568a457..0000000 Binary files a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/DES-110 - UNITS - Stress Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-110 - UNITS - Stress Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua b/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua deleted file mode 100644 index e465a98..0000000 --- a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.lua +++ /dev/null @@ -1,57 +0,0 @@ --- Name: DES-200 - AREAS - Night Test --- Author: FlightControl --- Date Created: 23 Apr 2017 --- --- Demonstrates the designation of units, which are grouped in AREAs. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target. --- - Check that when you illuminate a target group, that the target area gets illuminated after a while. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz b/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz deleted file mode 100644 index 3795f01..0000000 Binary files a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/DES-200 - AREAS - Night Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/DES - Designation/DES-200 - AREAS - Night Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua b/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua deleted file mode 100644 index 6b5e8e1..0000000 --- a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.lua +++ /dev/null @@ -1,57 +0,0 @@ --- Name: DES-201 - AREAS - Day Test --- Author: FlightControl --- Date Created: 23 Apr 2017 --- --- Demonstrates the designation of units, which are grouped in AREAs. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. --- - Check that when you smoke a target, that a smoke appears at the target. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_AREAS:New( RecceSetGroup, 1000 ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz b/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz deleted file mode 100644 index d5cf1ed..0000000 Binary files a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/DES-201 - AREAS - Day Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/DES - Designation/DES-201 - AREAS - Day Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua b/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua deleted file mode 100644 index 605f1b4..0000000 --- a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.lua +++ /dev/null @@ -1,57 +0,0 @@ --- Name: DES-300 - TYPES - Night Test --- Author: FlightControl --- Date Created: 23 Apr 2017 --- --- Demonstrates the designation of units, which are grouped per TYPES of the detected units. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you illuminate a target group, that a message appears that the Recce is illuminating the target. --- - Check that when you illuminate a target group, that the target area gets illuminated after a while. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_TYPES:New( RecceSetGroup ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz b/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz deleted file mode 100644 index 680a6af..0000000 Binary files a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/DES-300 - TYPES - Night Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-300 - TYPES - Night Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua b/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua deleted file mode 100644 index 0b5c8dd..0000000 --- a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.lua +++ /dev/null @@ -1,57 +0,0 @@ --- Name: DES-301 - TYPES - Day Test --- Author: FlightControl --- Date Created: 14 Mar 2018 --- --- Demonstrates the designation of units, which are grouped per TYPES of the detected units. --- A Set of Recce are detecting a large group of units. --- --- - Wait until all units are detected by the recce. A report should appear. --- - Once the report appears, the Designation Menu should be generated. In the communication menu, Press F10 and select F1. Designation. --- - Test if one DetectionItem (a designated group) is lased by selecting a Target group from the Designation menu. --- - If a target group is not lased, it should start with "Designate". --- - If a target group is lased, the menu should start with "Lasing". --- - If a target group is smoked, the menu should start with "Smoking". --- - If a target group is illuminated, the menu should start with "Illuminating". --- - Jump into a ground vehicle with the group name "Attack", and activate night vision (FLIR) (N key). --- - With FLIR activated in a ground vehicle, search for the laser beams. --- - Watch the laser beams alternate as targets are being detected or not detected... --- The Recce will try to lase as many targets as possible, --- but only for those targets to be lased, --- and until sufficient laser codes are available. --- - While the target group is lased, check if the available Recce are lasing the most possible targets. --- - Check if all laser codes are being used, but not twice. --- - Check if once a target has been destoyed, that after a while a Recce selects a new target. --- - Check that if all targets are destroyed, that the Recce reports that. --- - Check that while a Recce is lasing a target, that it is marking the target. --- - Check that when you deactive the lasing, that the Recce report the deactivation. --- - Check that when you smoke a target, that a message appears that the Recce is smoking the target. --- - Check that when you smoke a target, that a smoke appears at the target. - - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - --- Let the RecceSetGroup vehicles in the collection detect targets and group them in AREAS of 1000 meters. -RecceDetection = DETECTION_TYPES:New( RecceSetGroup ) - --- Create a -AttackSet = SET_GROUP:New():FilterPrefixes("Attack"):FilterStart() - --- Setup Designation for the AttackSet. -RecceDesignation = DESIGNATE:New( CC, RecceDetection, AttackSet ) - --- Generate the random laser codes. -RecceDesignation:GenerateLaserCodes() - --- The su-25T uses a specific laser code to guide its laser guides rockets. --- The code is 1113. A special menu option will be added that allows to lase with 1113. -RecceDesignation:AddMenuLaserCode( 1113, "Lase for SU-25T (%d)" ) - --- The A-10A etc use a specific laser code to guide its laser guides rockets. --- The code is 1680. A special menu option will be added that allows to lase with 1680. -RecceDesignation:AddMenuLaserCode( 1680, "Lase for A-10A (%d)" ) - - diff --git a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz b/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz deleted file mode 100644 index b8b1bf7..0000000 Binary files a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/DES-301 - TYPES - Day Test.miz and /dev/null differ diff --git a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/pack.ps1 b/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/unpack.ps1 b/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DES - Designation/DES-301 - TYPES - Day Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua b/Moose_Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua deleted file mode 100644 index 7afca5c..0000000 --- a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.lua +++ /dev/null @@ -1,24 +0,0 @@ ---- --- Name: DET-001 - Detection Areas --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- A small blue vehicle with laser detection methods is detecting targets. --- Targets are grouped within areas. A detection range and zone range is given to group the detected units. --- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other. --- --- # Test cases: --- --- 1. Observe the flaring of the areas formed --- 2. Observe the smoking of the units detected --- 3. Observe the areas being flexibly changed very detection run. --- 4. The truck driving from the one group to the other, will leave the first area, and will join the second. --- 5. While driving in between the areas, it will have a separate area. - -FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() - -FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits() - -FACDetection:__Start( 5 ) \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz b/Moose_Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz deleted file mode 100644 index 6c8d84b..0000000 Binary files a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/DET-001 - Detection Areas.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/pack.ps1 b/Moose_Missions/DET - Detection/DET-001 - Detection Areas/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/unpack.ps1 b/Moose_Missions/DET - Detection/DET-001 - Detection Areas/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-001 - Detection Areas/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua b/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua deleted file mode 100644 index 7afca5c..0000000 --- a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.lua +++ /dev/null @@ -1,24 +0,0 @@ ---- --- Name: DET-001 - Detection Areas --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- A small blue vehicle with laser detection methods is detecting targets. --- Targets are grouped within areas. A detection range and zone range is given to group the detected units. --- This demo will group 5 red vehicles in areas. One vehicle is diving from one group to the other. --- --- # Test cases: --- --- 1. Observe the flaring of the areas formed --- 2. Observe the smoking of the units detected --- 3. Observe the areas being flexibly changed very detection run. --- 4. The truck driving from the one group to the other, will leave the first area, and will join the second. --- 5. While driving in between the areas, it will have a separate area. - -FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() - -FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits() - -FACDetection:__Start( 5 ) \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz b/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz deleted file mode 100644 index fba5cb1..0000000 Binary files a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/DET-002 - Detection only Visible Units.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/pack.ps1 b/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/unpack.ps1 b/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-002 - Detection only Visible Units/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua b/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua deleted file mode 100644 index 7fcc33c..0000000 --- a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.lua +++ /dev/null @@ -1,56 +0,0 @@ ---- --- Name: DET-100 - Detection Probability Distance --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- Demonstrates the DistanceProbability factor during the detection of units. --- --- Two JTAC are detecting 4 units, which are 10 km away. --- The first JTAC has no DistanceProbability set. --- The second JTAC has a DistanceProbability set. --- --- # Test cases: --- --- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first. --- 2. Eventually all units should be detected by both JTAC. - -RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart() -RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 ) - -RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 ) -RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance. - -RecceDetection1:Start() -RecceDetection2:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection1:OnAfterDetect(From,Event,To) - - local DetectionReport = RecceDetection1:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No distance Probability" ) -end - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection2:OnAfterDetect(From,Event,To) - - local DetectionReport = RecceDetection2:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" ) -end diff --git a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz b/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz deleted file mode 100644 index 177fe02..0000000 Binary files a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/DET-100 - Detection Probability Distance.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/pack.ps1 b/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/unpack.ps1 b/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-100 - Detection Probability Distance/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua b/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua deleted file mode 100644 index a09bef3..0000000 --- a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.lua +++ /dev/null @@ -1,9 +0,0 @@ - - -FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() - -FACDetection = DETECTION_AREAS:New( FACSetGroup, 1000, 250 ) -SeadClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart() -DestroyClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterStart() - -FACReporting = FAC_REPORTING:New( FACClientSet, FACDetection ) diff --git a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz b/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz deleted file mode 100644 index 0f5566b..0000000 Binary files a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/DET-101 - Detection Reporting.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/pack.ps1 b/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/unpack.ps1 b/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-101 - Detection Reporting/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua b/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua deleted file mode 100644 index 6659d2c..0000000 --- a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.lua +++ /dev/null @@ -1,62 +0,0 @@ ---- --- Name: DET-120 - Detection Probability Zones --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- Demonstrates the DistanceProbability factor during the detection of units. --- --- Two JTAC are detecting 4 units, which are 10 km away. --- The first JTAC has no DistanceProbability set. --- The second JTAC has a DistanceProbability set. --- --- # Test cases: --- --- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first. --- 2. Eventually all units should be detected by both JTAC. - -RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart() -RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection1 = DETECTION_UNITS:New( RecceSetGroup1 ) - -RecceDetection2 = DETECTION_UNITS:New( RecceSetGroup2 ) - -ForestZone = ZONE_POLYGON:New( "ForestZone", GROUP:FindByName( "ForestZone" ) ) - -RecceDetection2:SetZoneProbability( { { ForestZone, 0.1 } } ) -- Set a 10% probability that a vehicle can be detected within the forest. - - -RecceDetection1:Start() -RecceDetection2:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection1:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No Zone Probability" ) -end - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection2:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Forest Zone Probability" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz b/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz deleted file mode 100644 index 049f14e..0000000 Binary files a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/DET-120 - Detection Probability Zones.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/pack.ps1 b/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/unpack.ps1 b/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-120 - Detection Probability Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua b/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua deleted file mode 100644 index 00fd71b..0000000 --- a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.lua +++ /dev/null @@ -1,42 +0,0 @@ ---- --- Name: DET-200 - Detection UNITS --- Author: FlightControl --- Date Created: 13 Feb 2017 --- --- # Situation: --- --- Demonstrates the detection of units. --- --- A Set of Recce are detecting a large group of units, which are 5 km away. --- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve. --- The enemy is approaching. --- --- # Test cases: --- --- 1. Observe the detection reporting of both the Recce. --- 2. Eventually all units should be detected by both Recce. - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - self:E("Detect") - - local DetectionReport = RecceDetection:DetectedReportDetailed() - - CC:MessageToAll( DetectionReport, 15, "" ) -end - diff --git a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz b/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz deleted file mode 100644 index faf6338..0000000 Binary files a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/DET-200 - Detection UNITS.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/pack.ps1 b/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/unpack.ps1 b/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-200 - Detection UNITS/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua b/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua deleted file mode 100644 index 6f4bee1..0000000 --- a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: DET-201 - Detection UNITS - Air --- Author: FlightControl --- Date Created: 03 May 2017 --- --- # Situation: --- --- Demonstrates the detection of units. --- --- A Set of Recce are detecting a approaching airplanes. --- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve. --- The enemy is approaching. --- --- # Test cases: --- --- 1. Observe the detection reporting of both the Recce. --- 2. Eventually all units should be detected by both Recce. - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) -RecceDetection:InitDetectRadar(true) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - self:E("Detect") - - local DetectionReport = RecceDetection:DetectedReportDetailed() - - CC:MessageToAll( DetectionReport, 15, "" ) -end - diff --git a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz b/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz deleted file mode 100644 index a3e4b2d..0000000 Binary files a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/DET-201 - Detection UNITS - Air.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/pack.ps1 b/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/unpack.ps1 b/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-201 - Detection UNITS - Air/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua b/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua deleted file mode 100644 index e39217d..0000000 --- a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.lua +++ /dev/null @@ -1,42 +0,0 @@ ---- --- Name: DET-210 - Detection TYPES --- Author: FlightControl --- Date Created: 13 Feb 2017 --- --- # Situation: --- --- Demonstrates the detection of units. --- --- A Set of Recce are detecting a large group of units, which are 5 km away. --- Select one of the blue Recce, and press F7. Watch the reporting of the detection evolve. --- The enemy is approaching. --- --- The blue Recce will report the detected units grouped per vehicle type! --- --- # Test cases: --- --- 1. Observe the detection reporting of both the Recce. --- 2. Eventually all units should be detected by both Recce. - -RecceSetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_TYPES:New( RecceSetGroup ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = RecceDetection:DetectedReportDetailed() - - CC:MessageToAll( DetectionReport, 15, "" ) -end - diff --git a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz b/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz deleted file mode 100644 index ad9caa8..0000000 Binary files a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/DET-210 - Detection TYPES.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/pack.ps1 b/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/unpack.ps1 b/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-210 - Detection TYPES/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua b/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua deleted file mode 100644 index 34cf755..0000000 --- a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.lua +++ /dev/null @@ -1,58 +0,0 @@ ---- --- Name: DET-100 - Detection Probability Distance --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- Demonstrates the DistanceProbability factor during the detection of units. --- --- Two JTAC are detecting 4 units, which are 10 km away. --- The first JTAC has no DistanceProbability set. --- The second JTAC has a DistanceProbability set. --- --- # Test cases: --- --- 1. Observe the reporting of both the first and second JTAC. The second should report slower the detection than the first. --- 2. Eventually all units should be detected by both JTAC. - -RecceSetGroup1 = SET_GROUP:New():FilterPrefixes( "Recce 1" ):FilterStart() -RecceSetGroup2 = SET_GROUP:New():FilterPrefixes( "Recce 2" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection1 = DETECTION_AREAS:New( RecceSetGroup1, 1000 ) -RecceDetection1:BoundDetectedZones() - -RecceDetection2 = DETECTION_AREAS:New( RecceSetGroup2, 1000 ) -RecceDetection2:SetDistanceProbability( 0.2 ) -- Set a 20% probability that a vehicle can be detected at 4km distance. -RecceDetection1:BoundDetectedZones() - -RecceDetection1:Start() -RecceDetection2:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection1:OnAfterDetect(From,Event,To) - - local DetectionReport = RecceDetection1:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection 1 - No distance Probability" ) -end - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection2:OnAfterDetect(From,Event,To) - - local DetectionReport = RecceDetection2:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection 2 - Distance Probability" ) -end \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz b/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz deleted file mode 100644 index f26a4cf..0000000 Binary files a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/DET-250 - Detection AREAS.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/pack.ps1 b/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/unpack.ps1 b/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-250 - Detection AREAS/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua b/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua deleted file mode 100644 index cbba041..0000000 --- a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.lua +++ /dev/null @@ -1,46 +0,0 @@ ---- --- Name: DET-255 - Detection AEAS with Destroys --- Author: FlightControl --- Date Created: 06 Mar 2017 --- --- # Situation: --- --- A small blue vehicle with laser detection methods is detecting targets. --- Targets are grouped within areas. A detection range and zone range is given to group the detected units. --- This demo will group red vehicles in areas. One vehicle is diving from one group to the other. --- After 30 seconds, one vehicle is destroyed in a zone. --- After 60 seconds, a vehicle is destroyed that is a leader of a zone. --- After 90 seconds, all vehicles are destroyed in a zone. --- --- # Test cases: --- --- 1. Observe the flaring of the areas formed --- 2. Observe the smoking of the units detected --- 3. Observe the areas being flexibly changed very detection run. --- 4. The truck driving from the one group to the other, will leave the first area, and will join the second. --- 5. While driving in between the areas, it will have a separate area. --- 6. Observe the correct removal or relocation of the ZONEs. - -FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC Group" ):FilterStart() - -FACDetection = DETECTION_AREAS:New( FACSetGroup, 150, 250 ):BoundDetectedZones():SmokeDetectedUnits() - -FACDetection:__Start( 5 ) - -SCHEDULER:New( nil,function() - local Target = UNIT:FindByName( "Target #004") - Target:Destroy() - end, {}, 30 - ) - -SCHEDULER:New( nil,function() - local Target = UNIT:FindByName( "Target #006") - Target:Destroy() - end, {}, 60 - ) - -SCHEDULER:New( nil,function() - local Target = UNIT:FindByName( "Target #007") - Target:Destroy() - end, {}, 90 - ) \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz b/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz deleted file mode 100644 index 951568d..0000000 Binary files a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/DET-255 - Detection AEAS with Destroys.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/pack.ps1 b/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/unpack.ps1 b/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-255 - Detection AEAS with Destroys/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua b/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua deleted file mode 100644 index a543336..0000000 --- a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: DET-300 - Dectection Filter AIRPLANE --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Demonstrates the filtering of detections. --- --- # Test cases: --- --- 1. Observe the reporting only detecting the airplane, not the other units. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.AIRPLANE ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz b/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz deleted file mode 100644 index 66d7356..0000000 Binary files a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/DET-300 - Dectection Filter AIRPLANE.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/pack.ps1 b/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/unpack.ps1 b/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-300 - Dectection Filter AIRPLANE/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua b/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua deleted file mode 100644 index 2471add..0000000 --- a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: DET-301 - Dectection Filter GROUND_UNIT --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Demonstrates the filtering of detections. --- --- # Test cases: --- --- 1. Observe the reporting only detecting the ground unit, not the other units. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.GROUND_UNIT ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz b/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz deleted file mode 100644 index 5c045b0..0000000 Binary files a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/DET-301 - Dectection Filter GROUND_UNIT.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/pack.ps1 b/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/unpack.ps1 b/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-301 - Dectection Filter GROUND_UNIT/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua b/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua deleted file mode 100644 index 4150c5e..0000000 --- a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: DET-302 - Dectection Filter HELICOPTER --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Demonstrates the filtering of detections. --- --- # Test cases: --- --- 1. Observe the reporting only detecting the helicopter, not the other units. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.HELICOPTER ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz b/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz deleted file mode 100644 index e2abb5d..0000000 Binary files a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/DET-302 - Dectection Filter HELICOPTER.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/pack.ps1 b/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/unpack.ps1 b/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-302 - Dectection Filter HELICOPTER/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua b/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua deleted file mode 100644 index 71b8ae7..0000000 --- a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: DET-303 - Dectection Filter SHIP --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Demonstrates the filtering of detections. --- --- # Test cases: --- --- 1. Observe the reporting only detecting the ship, not the other units. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.SHIP ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz b/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz deleted file mode 100644 index 02b0df5..0000000 Binary files a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/DET-303 - Dectection Filter SHIP.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/pack.ps1 b/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/unpack.ps1 b/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-303 - Dectection Filter SHIP/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua b/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua deleted file mode 100644 index 8abd8bf..0000000 --- a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: DET-304 - Dectection Filter STRUCTURE --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Demonstrates the filtering of detections. --- --- # Test cases: --- --- 1. Observe the reporting only detecting the structure, not the other units. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( SetGroup ):FilterCategories( Unit.Category.STRUCTURE ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -collectgarbage() diff --git a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz b/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz deleted file mode 100644 index 39513a6..0000000 Binary files a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/DET-304 - Dectection Filter STRUCTURE.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/pack.ps1 b/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/unpack.ps1 b/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-304 - Dectection Filter STRUCTURE/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua b/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua deleted file mode 100644 index 039db9d..0000000 --- a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.lua +++ /dev/null @@ -1,44 +0,0 @@ ---- --- Name: DET-305 - Dectection Filter ALL --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Demonstrates the filtering of detections. --- --- # Test cases: --- --- 1. Observe the reporting detecting all the units regardless of the type. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS - :New( SetGroup ) - :FilterCategories( { - Unit.Category.AIRPLANE, - Unit.Category.GROUND_UNIT, - Unit.Category.HELICOPTER, - Unit.Category.SHIP, - Unit.Category.STRUCTURE - } ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz b/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz deleted file mode 100644 index 5eed86e..0000000 Binary files a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/DET-305 - Dectection Filter ALL.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/pack.ps1 b/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/unpack.ps1 b/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-305 - Dectection Filter ALL/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua b/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua deleted file mode 100644 index 0d6bacf..0000000 --- a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.lua +++ /dev/null @@ -1,35 +0,0 @@ ---- --- Name: DET-310 - EWR - Line Of Sight --- Author: FlightControl --- Date Created: 12 Sep 2018 --- --- # Situation: --- --- Demonstrates the lost of line of sight using an airplane. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS - :New( SetGroup ) - :FilterCategories( { Unit.Category.AIRPLANE } ) - :InitDetectRWR(true) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz b/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz deleted file mode 100644 index 51271a2..0000000 Binary files a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/DET-310 - EWR - Line Of Sight.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/pack.ps1 b/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/unpack.ps1 b/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-310 - EWR - Line Of Sight/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua b/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua deleted file mode 100644 index 9b1b2df..0000000 --- a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.lua +++ /dev/null @@ -1,57 +0,0 @@ ---- --- Name: DET-310 - EWR - Line Of Sight --- Author: FlightControl --- Date Created: 12 Sep 2018 --- --- # Situation: --- --- Demonstrates the lost of line of sight using an airplane. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_AREAS - :New( SetGroup, 1500 ) - :FilterCategories( { Unit.Category.AIRPLANE } ) - :InitDetectRWR(true) - -local Zones = { - ZONE:New( "Zone1" ), - ZONE:New( "Zone2" ) -} - -local Sams = { - GROUP:FindByName( "SAM1" ), - GROUP:FindByName( "SAM2" ) -} - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event DetectedItem. --- @param RecceDetection self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. --- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem -function RecceDetection:OnAfterDetectedItem(From,Event,To,DetectedItem) - - local DetectionReport = self:DetectedReportDetailed() - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) - - if DetectedItem.IsDetected then - local Coordinate = DetectedItem.Coordinate -- Core.Point#COORDINATE - for ZoneID, ZoneData in pairs( Zones ) do - local Zone = ZoneData -- Core.Zone#ZONE - if Zone:IsCoordinateInZone(Coordinate) then - Sams[ZoneID]:Activate() - end - end - end - -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz b/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz deleted file mode 100644 index 1a29550..0000000 Binary files a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/DET-320 - EWR - Line Of Sight.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/pack.ps1 b/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/unpack.ps1 b/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-320 - EWR - Line Of Sight/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua b/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua deleted file mode 100644 index 21ce09f..0000000 --- a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.lua +++ /dev/null @@ -1,49 +0,0 @@ ---- --- Name: DET-310 - EWR - Line Of Sight --- Author: FlightControl --- Date Created: 12 Sep 2018 --- --- # Situation: --- --- Demonstrates the lost of line of sight using an airplane. - -SetGroup = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_AREAS - :New( SetGroup, 1500 ) - :FilterCategories( { Unit.Category.AIRPLANE } ) - --:InitDetectVisual( true ) - :InitDetectIRST( true ) - :InitDetectRadar( true ) - :InitDetectRWR( true ) - :InitDetectOptical( true ) - -RecceDetection:Start() - -_SETTINGS:SetA2A_BRAA() -_SETTINGS:SetA2G_BR() - ---- OnAfter Transition Handler for Event DetectedItem. --- @param Functional.Detection#DETECTION_AREAS RecceDetection self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. --- @param Functional.Detection#DETECTION_BASE.DetectedItem DetectedItem -function RecceDetection:OnAfterDetectedItem(From,Event,To,DetectedItem) - - local DetectionReport = self:DetectedReportDetailed( SetGroup:GetFirst() ) - - HQ:MessageToAll( DetectionReport, 15, "Detection" ) - - if DetectedItem.IsDetected then - local Coordinate = DetectedItem.Coordinate -- Core.Point#COORDINATE - HQ:MessageToAll( "Detected", 15, "Detection" ) - end - -end - -garbagecollect() diff --git a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz b/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz deleted file mode 100644 index 09ea391..0000000 Binary files a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/DET-400 - A2A - Detection methods.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/pack.ps1 b/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/unpack.ps1 b/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/DET - Detection/DET-400 - A2A - Detection methods/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua b/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua deleted file mode 100644 index 6890351..0000000 --- a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.lua +++ /dev/null @@ -1,70 +0,0 @@ ---- --- Name: DET-500 - Handle Detected Event - Govern Artillery Demo --- Author: FlightControl --- Date Created: 13 Feb 2017 --- --- # Situation: --- --- Demonstrates the detection of units. --- --- A Set of Recces are detecting a large group of units, which are 5 km away. --- Once the Recces detect the enemy, the artilley units are controlled and will fire a missile to the target. --- --- # Test cases: --- --- 1. Observe the detected reporting of the recces. --- 2. When one Recce group detects a target, it will select an artillery unit and fire a missile. --- 3. This will run until all Recces have eliminated the targets. - -RecceSetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Recce" ):FilterStart() -ArtillerySetGroup = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Artillery" ):FilterStart() - -HQ = GROUP:FindByName( "HQ" ) - -CC = COMMANDCENTER:New( HQ, "HQ" ) - -RecceDetection = DETECTION_UNITS:New( RecceSetGroup ) -RecceDetection:SetRefreshTimeInterval( 5 ) - -RecceDetection:Start() - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. -function RecceDetection:OnAfterDetect(From,Event,To) - - local DetectionReport = RecceDetection:DetectedReportDetailed() - - CC:GetPositionable():MessageToAll( DetectionReport, 15, "" ) -end - -local ArtilleryTime = {} -local ArtilleryAim = 180 - ---- OnAfter Transition Handler for Event Detect. --- @param Functional.Detection#DETECTION_UNITS self --- @param #string From The From State string. --- @param #string Event The Event string. --- @param #string To The To State string. --- @param Wrapper.Unit#UNIT DetectedUnits -function RecceDetection:OnAfterDetected( From, Event, To, DetectedUnits ) - self:E( { From, Event, To, DetectedUnits } ) - - for DetectedUnitID, DetectedUnit in pairs( DetectedUnits ) do - local DetectedUnit = DetectedUnit -- Wrapper.Unit#UNIT - local Artillery = ArtillerySetGroup:GetRandom() -- Wrapper.Group#GROUP - - if ArtilleryTime[Artillery] and ArtilleryTime[Artillery] <= timer.getTime() - ArtilleryAim then - ArtilleryTime[Artillery] = nil - end - - if not ArtilleryTime[Artillery] then - local Task = Artillery:TaskFireAtPoint( DetectedUnit:GetVec2(), 500, 4 ) -- Fire 2 rockets to the target point. - Artillery:SetTask( Task, 0.5 ) - ArtilleryTime[Artillery] = timer.getTime() - end - - end -end \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz b/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz deleted file mode 100644 index 3391e9b..0000000 Binary files a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/DET-500 - Handle Detected Event - Govern Artillery Demo.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/pack.ps1 b/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/unpack.ps1 b/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-500 - Handle Detected Event - Govern Artillery Demo/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua b/Moose_Missions/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua deleted file mode 100644 index b4edf65..0000000 --- a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.lua +++ /dev/null @@ -1,16 +0,0 @@ ---- --- Name: DET-600 - Detection Zones --- Author: FlightControl --- Date Created: 15 Mar 2019 --- --- # Situation: --- --- 2 trigger zones are defined using the mission editor. --- The detection algorithm will detect the units within the zones and report them. - - -DetectionSetZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone" } ):FilterOnce() - -DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.RED ):BoundDetectedZones():SmokeDetectedUnits() - -DetectionZones:__Start( 5 ) \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz b/Moose_Missions/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz deleted file mode 100644 index 58d6738..0000000 Binary files a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/DET-600 - Detection Zones.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/pack.ps1 b/Moose_Missions/DET - Detection/DET-600 - Detection Zones/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/unpack.ps1 b/Moose_Missions/DET - Detection/DET-600 - Detection Zones/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/DET - Detection/DET-600 - Detection Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua b/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua deleted file mode 100644 index a52d811..0000000 --- a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.lua +++ /dev/null @@ -1,18 +0,0 @@ ---- --- Name: DET-600 - Detection Zones --- Author: FlightControl --- Date Created: 15 Mar 2019 --- --- # Situation: --- --- 2 trigger zones are defined using the mission editor. --- The detection algorithm will detect the units within the zones and report them. - - -DetectionSetZones = SET_ZONE_GOAL:New():FilterPrefixes( { "Detection Zone" } ):FilterStart() - -DetectionZone1 = ZONE_CAPTURE_COALITION:New( ZONE:New( "Detection Zone 1" ), coalition.side.RED ) - -DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.RED ):BoundDetectedZones():SmokeDetectedUnits() - -DetectionZones:__Start( 5 ) \ No newline at end of file diff --git a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz b/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz deleted file mode 100644 index 8cbc6e0..0000000 Binary files a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/DET-601 - Detection Zones_Capture_Coalition.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/pack.ps1 b/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/unpack.ps1 b/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/DET - Detection/DET-601 - Detection Zones_Capture_Coalition/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua b/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua deleted file mode 100644 index cc2969d..0000000 --- a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.lua +++ /dev/null @@ -1,25 +0,0 @@ ---- --- Name: DET-900 - Detection Test with RED FACA --- Author: FlightControl --- Date Created: 06 Mar 2017 --- --- # Situation: --- --- A red FACA is detecting targets while airborne. --- Targets are grouped within areas. A detection range and zone range is given to group the detected units. --- This demo will group blue vehicles in areas. --- Upon the detection capabilities of the red FACA, the blue vehicles will be grouped when detected. --- All blue vehicles have ROE on hold. --- --- # Test cases: --- --- 1. Observe the tyres put around the detected areas formed --- 2. Observe the smoking of the units detected --- 3. Observe the areas being flexibly changed very detection run. - -FACSetGroup = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterStart() - -FACDetection = DETECTION_AREAS:New( FACSetGroup, 2000, 250 ):BoundDetectedZones():SmokeDetectedUnits() - - -FACDetection:__Start( 5 ) diff --git a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz b/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz deleted file mode 100644 index 3e555ef..0000000 Binary files a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/DET-900 - Detection Test with RED FACA.miz and /dev/null differ diff --git a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/pack.ps1 b/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/unpack.ps1 b/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/DET - Detection/DET-900 - Detection Test with RED FACA/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua b/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua deleted file mode 100644 index fc0f232..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.lua +++ /dev/null @@ -1,9 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane", "ship" } ):FilterCoalitions( "red" ):FilterPrefixes( { "Escort", "Ship Defense" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 750, 750 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 1 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz b/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz deleted file mode 100644 index e2df8da..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/ESC-001 - Escort A2G Test.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-001 - Escort A2G Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua b/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua deleted file mode 100644 index 874867c..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane", "ship" } ):FilterCoalitions( "red" ):FilterPrefixes( { "Escort", "Ship Defense" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 750, 750 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz b/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz deleted file mode 100644 index 7782f14..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/ESC-002 - Escort A2G Large Formation.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-002 - Escort A2G Large Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua b/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua deleted file mode 100644 index 3e4033c..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.lua +++ /dev/null @@ -1,9 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 100, 100 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz b/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz deleted file mode 100644 index 03eff66..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/ESC-003 - Escort A2G Airbase Takeoff.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-003 - Escort A2G Airbase Takeoff/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua b/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua deleted file mode 100644 index 3e4033c..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.lua +++ /dev/null @@ -1,9 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "plane" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 100, 100 , 0 ) -Escort:MenusAirplanes() -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz b/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz deleted file mode 100644 index 24b6a81..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/ESC-004 - Escort A2G Formation.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-004 - Escort A2G Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua b/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua deleted file mode 100644 index 24588f5..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.lua +++ /dev/null @@ -1,9 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "helicopter" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Attack", "Briefing" ) -Escort:FormationTrail( 100, 100 , 0 ) -Escort:MenusHelicopters() -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz b/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz deleted file mode 100644 index b81d49f..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/ESC-005 - Escort A2G Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-005 - Escort A2G Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua b/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua deleted file mode 100644 index f1afbe7..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.lua +++ /dev/null @@ -1,11 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories( { "helicopter" } ):FilterCoalitions( "blue" ):FilterPrefixes( { "Escort" } ):FilterStart() - -local LeaderUnit = UNIT:FindByName( "Leader" ) -local Escort = AI_ESCORT:New( LeaderUnit, FollowGroupSet, "Escort Test", "Use the ROE and ROT menus to test if the behaviour is working." ) - -Escort:ModeMission() - -Escort:MenusHelicopters() -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz b/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz deleted file mode 100644 index 0157375..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/ESC-006 - Escort ROE ROT.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-006 - Escort ROE ROT/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz deleted file mode 100644 index 45b5867..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/ESC-100 - Escort Request Menu - kopie.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu - kopie/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua deleted file mode 100644 index f659ad3..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.lua +++ /dev/null @@ -1,13 +0,0 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) - - -local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) -Escort:FormationTrail( 50, 100, 100 ) -Escort:MenusAirplanes( 50, 50, 0, 0, 50, 50, 6 ) -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz deleted file mode 100644 index 2f2cc8d..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/ESC-100 - Escort Request Menu.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-100 - Escort Request Menu/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua b/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua deleted file mode 100644 index 355a154..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.lua +++ /dev/null @@ -1,14 +0,0 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -EscortSpawn = SPAWN:NewWithAlias( "Red A2G Escort Template", "Red A2G Escort AI" ):InitLimit( 10, 10 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Sochi_Adler ), AIRBASE.TerminalType.OpenBig ) - - -local EscortUnit = UNIT:FindByName( "Red A2G Pilot" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Sochi_Adler), "A2G", "Briefing" ) -Escort:FormationTrail( 50, 100, 100 ) -Escort:MenusAirplanes( 50, 50, 0, 0, 50, 50, 6 ) -Escort:SetEscortSpawnMission() -Escort:__Start( 5 ) - diff --git a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz b/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz deleted file mode 100644 index c16bd50..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/ESC-200 - Escort Mission.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-200 - Escort Mission/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua b/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua deleted file mode 100644 index a4ce5a3..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.lua +++ /dev/null @@ -1,51 +0,0 @@ --- At startup of the overall mission, we spawn 10 possible escort planes in "Uncontrolled" state. - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "HQ" ) - -Mission = MISSION - :New( CommandCenter, "Rescue Operation", "Tactical", "Transport General Mc. Connor!", coalition.side.BLUE ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "HeadQuarter" ) ) - -local CargoSet = SET_CARGO:New():FilterTypes( "General" ):FilterStart() -WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Rescue the general and transport him to the HeadQuarter (near the airbase Gudauta)." ) - -EscortSpawn = SPAWN:NewWithAlias( "Blue A2G Escort Template" ):InitLimit( 6, 6 ) -EscortSpawn:ParkAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Gudauta ), AIRBASE.TerminalType.OpenMedOrBig ) - - - -local EscortUnit = UNIT:FindByName( "Transport" ) - -Escort = AI_ESCORT_REQUEST:New( EscortUnit, EscortSpawn, AIRBASE:FindByName(AIRBASE.Caucasus.Gudauta), "A2G", "Rescue the engineer from the village Lesselide near the station. Beware of enemy air defenses. Use the escorts wisely." ) -Escort:FormationTrail( 50, 100, 100 ) - -Escort:SetEscortSpawnMission() - -Escort:MenuJoinUp() - -Escort:MenuFormationTrail( 50, 50, 0 ) -Escort:MenuFormationLeftLine( 0, 0, 50, 50 ) -Escort:MenuFormationRightLine( 0, 0, 50, 50 ) - - -Escort:MenuHoldAtEscortPosition( 30, 0 ) -Escort:MenuHoldAtEscortPosition( 100, 0 ) -Escort:MenuHoldAtLeaderPosition( 30, 0 ) -Escort:MenuHoldAtLeaderPosition( 100, 0 ) - -Escort:MenuFlare() -Escort:MenuSmoke() - -Escort:MenuTargets( 60 ) -Escort:MenuROE() -Escort:MenuROT() - -Escort:__Start( 5 ) - - diff --git a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz b/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz deleted file mode 100644 index 3dcc808..0000000 Binary files a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/ESC-201 - Escort Mission.miz and /dev/null differ diff --git a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/pack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/unpack.ps1 b/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ESC - AI Escort/ESC-201 - Escort Mission/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua b/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua deleted file mode 100644 index 2885f61..0000000 --- a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.lua +++ /dev/null @@ -1,89 +0,0 @@ ---- --- Name: ESC-001 - Escorting Helicopters --- Author: FlightControl --- Date Created: 10 Mar 2017 --- --- # Situation: --- --- Your client helicopter is flying in the battle field. --- It is escorted by an MI-28N, which you can command... --- Use the menu options to: --- - Make the escort follow you. --- - Report detected targets. --- - Attack targets --- - Flare --- --- # Test cases: --- --- 1. When executing the commands, observe the MI-28N reactions. - -do - local function EventAliveHelicopter( Client ) - local EscortGroupHeli1 = SpawnEscortHeli:ReSpawn(1) - local EscortHeli1 = ESCORT - :New( Client, EscortGroupHeli1, "Escort Helicopter" ) - :MenuFollowAt( 100 ) - :MenuFollowAt( 200 ) - :MenuHoldAtEscortPosition( 20, 10, "Hold at %d meters for %d seconds" ) - :MenuHoldAtLeaderPosition( 120 ) - :MenuFlare( "Disperse Flares" ) - :MenuSmoke() - :MenuReportTargets( 60, 20 ) - :MenuResumeMission() - :MenuROE() - :MenuAssistedAttack() - - EscortHeli1:SetDetection( EscortHeliDetection ) - - local EscortGroupArtillery = SpawnEscortArtillery:ReSpawn(1) - local EscortArtillery = ESCORT - :New( Client, EscortGroupArtillery, "Escort Artillery" ) - :Menus() - end - - local function EventAlivePlane( Client ) - local EscortGroupPlane2 = SpawnEscortPlane:ReSpawn(1) - local EscortPlane2 = ESCORT - :New( Client, EscortGroupPlane2, "Escort Test Plane" ) - :MenuFollowAt( 100 ) - :MenuFollowAt( 200 ) - :MenuHoldAtEscortPosition( 20, 10, "Hold at %d meters for %d seconds" ) - :MenuHoldAtLeaderPosition( 120 ) - :MenuFlare( "Disperse Flares" ) - :MenuSmoke() - :MenuReportTargets( 60, 20 ) - :MenuResumeMission() - :MenuAssistedAttack() - :MenuROE() - :MenuEvasion() - - local EscortGroupGround2 = SpawnEscortGround:ReSpawn(1) - local EscortGround2 = ESCORT - :New( Client, EscortGroupGround2, "Test Ground" ) - :Menus() - - local EscortGroupShip2 = SpawnEscortShip:ReSpawn(1) - local EscortShip2 = ESCORT - :New( Client, EscortGroupShip2, "Test Ship" ) - :Menus() - end - - SpawnEscortHeli = SPAWN:New( "Escort Helicopter" ) - SpawnEscortPlane = SPAWN:New( "Escort Plane" ) - SpawnEscortGround = SPAWN:New( "Escort Ground" ) - SpawnEscortShip = SPAWN:New( "Escort Ship" ) - SpawnEscortArtillery = SPAWN:New( "Ground Attack Assistance" ) - - EscortHeliSetGroup = SET_GROUP:New():FilterPrefixes("Escort Helicopter"):FilterStart() - EscortHeliDetection = DETECTION_AREAS:New( EscortHeliSetGroup, 1000, 500 ) - - EscortHeliDetection:BoundDetectedZones() - EscortHeliDetection:SetRefreshTimeInterval( 15 ) - - EscortClientHeli = CLIENT:FindByName( "Lead Helicopter", "Fly around and observe the behaviour of the escort helicopter" ):Alive( EventAliveHelicopter ) - EscortClientPlane = CLIENT:FindByName( "Lead Plane", "Fly around and observe the behaviour of the escort airplane. Select Navigate->Joun-Up and airplane should follow you. Change speed and directions." ) - :Alive( EventAlivePlane ) - -end - -env.info( "Test Mission loaded" ) diff --git a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz b/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz deleted file mode 100644 index 3a796b8..0000000 Binary files a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/ESC-001 - Escorting Helicopters.miz and /dev/null differ diff --git a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/pack.ps1 b/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/unpack.ps1 b/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ESC - Escorting/ESC-001 - Escorting Helicopters/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua b/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua deleted file mode 100644 index b2257c6..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- --- Name: EVT-001 - API Demo 1 --- Author: FlightControl --- Date Created: 7 February 2017 --- --- # Situation: --- --- A task shoots another tank. If one of the is dead, the event will be catched. --- --- # Test cases: --- --- 1. Observe the tanks shooting each other. --- 2. If one of the tanks die, an event will be catched. --- 3. Observe the surviving unit smoking. - - -local Tank1 = UNIT:FindByName( "Tank A" ) -local Tank2 = UNIT:FindByName( "Tank B" ) - -Tank1:HandleEvent( EVENTS.Dead ) - -Tank2:HandleEvent( EVENTS.Dead ) - ---- @param Wrapper.Unit#UNIT self -function Tank1:OnEventDead( EventData ) - - self:SmokeGreen() -end - ---- @param Wrapper.Unit#UNIT self -function Tank2:OnEventDead( EventData ) - - self:SmokeBlue() -end - -function Tank2:OnEventCrash(EventData) - -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz b/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz deleted file mode 100644 index d18bc62..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/EVT-001 - API Demo 1.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-001 - API Demo 1/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua b/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua deleted file mode 100644 index 01d65f4..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.lua +++ /dev/null @@ -1,74 +0,0 @@ ---- --- Name: EVT-001 - UNIT OnEventShot Stability Test --- Author: FlightControl --- Date Created: 9 Apr 2017 --- --- # Situation: --- --- A couple of planes are firing to each other. Monitor the shot events. --- I am doing a collectgarbage to test the stability of the event handling. --- Also when the planes are destroyed, the event handling should stop etc. --- The tests are on GROUP level. --- --- # Test cases: --- --- 1. Observe the planes shooting the missiles. --- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the stability of the event handlings. - -PlaneGroupsBlue = {} - -PlaneGroupsRed = {} - -PlaneSpawnBlue = SPAWN - :New( "Planes Blue" ) - :InitLimit( 2, 0 ) - :SpawnScheduled( 10,0 ) - :OnSpawnGroup( - function( SpawnGroup ) - SpawnGroupName = SpawnGroup:GetName() - PlaneGroupsBlue[SpawnGroupName] = SpawnGroup - PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Shot ) - PlaneGroupsBlue[SpawnGroupName]:HandleEvent( EVENTS.Hit ) - collectgarbage() - PlaneGroupsBlue[SpawnGroupName].OnEventShot = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) - end - PlaneGroupsBlue[SpawnGroupName].OnEventHit = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just got hit!", 15, "Alert!" ) - end - end - ) - -PlaneSpawnRed = SPAWN - :New( "Planes Red" ) - :InitLimit( 2, 0 ) - :SpawnScheduled(10,0) - :OnSpawnGroup( - function( SpawnGroup ) - SpawnGroupName = SpawnGroup:GetName() - PlaneGroupsRed[SpawnGroupName] = SpawnGroup - PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Shot ) - PlaneGroupsRed[SpawnGroupName]:HandleEvent( EVENTS.Hit ) - collectgarbage() - --- @param self - -- @param Core.Event#EVENTDATA EventData - PlaneGroupsRed[SpawnGroupName].OnEventShot = function ( self, EventData ) - self:F( EventData ) - - self:MessageToAll( "I just got hit!", 15, "Alert!" ) - end - PlaneGroupsRed[SpawnGroupName].OnEventHit = function( self, EventData ) - self:F( EventData ) - self:MessageToAll( "I just fired a missile!", 15, "Alert!" ) - end - end - ) - -collectgarbage() -BASE:E( "Collected garbage" ) - - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz b/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz deleted file mode 100644 index 3840184..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/EVT-001 - UNIT OnEventShot Stability Test.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-001 - UNIT OnEventShot Stability Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua b/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua deleted file mode 100644 index 5056baa..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- --- Name: EVT-002 - UNIT OnEventLand ReSpawn Test --- Author: FlightControl --- Date Created: 9 Apr 2017 --- --- # Situation: --- --- A couple of planes are taking off from an airbase. --- When they land, they send out a message that they landed. --- But! They are automatically respawned upon landing. --- The 2nd time the same plane lands, they should send the message again!!! --- --- # Test cases: --- --- 1. Observe in the logging, that the event subscriptions are reset when the respawn happens! --- 2. Observe the 2nd time the same plane lands, they should send the message again!!! --- 3. Check the stability of the event handlings. - -PlaneBlueSpawn = SPAWN - :New( "PlaneBlue" ) - :InitLimit(2,0) - :InitRepeatOnEngineShutDown() - :SpawnScheduled(60,0) - :OnSpawnGroup( - --- @param Wrapper.Group#GROUP SpawnGroup - function( SpawnGroup ) - SpawnGroup:HandleEvent( EVENTS.Land ) - --- @param self - -- @param Core.Event#EVENTDATA EventData - function SpawnGroup:OnEventLand(EventData) - EventData.IniGroup:MessageToAll("Landed",15,"Land Event") - end - end - ) - -collectgarbage() -BASE:E( "Collected garbage" ) - - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz b/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz deleted file mode 100644 index 9d5f767..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/EVT-002 - UNIT OnEventLand ReSpawn Test.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-002 - UNIT OnEventLand ReSpawn Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua b/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua deleted file mode 100644 index 2f84ad7..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.lua +++ /dev/null @@ -1,25 +0,0 @@ ---- --- Name: EVT-100 - UNIT OnEventShot Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A plane is flying in the air and shoots an missile to a ground target. --- --- # Test cases: --- --- 1. Observe the plane shooting the missile. --- 2. Observe when the plane shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_SHOT entry. - -Plane = UNIT:FindByName( "Plane" ) - -Plane:HandleEvent( EVENTS.Shot ) - -function Plane:OnEventShot( EventData ) - - Plane:MessageToAll( "I just fired a missile!", 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz b/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz deleted file mode 100644 index df28017..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/EVT-100 - UNIT OnEventShot Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-100 - UNIT OnEventShot Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua b/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua deleted file mode 100644 index 03c8435..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: EVT-101 - UNIT OnEventHit Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A plane is flying in the air and shoots an missile to a ground target. --- --- # Test cases: --- --- 1. Observe the plane shooting the missile. --- 2. Observe when the missile hits the target, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. - -Plane = UNIT:FindByName( "Plane" ) - -Tank = UNIT:FindByName( "Tank" ) - -Plane:HandleEvent( EVENTS.Hit ) -Tank:HandleEvent( EVENTS.Hit ) - -function Plane:OnEventHit( EventData ) - - Plane:MessageToAll( "I just got hit!", 15, "Alert!" ) -end - -function Tank:OnEventHit( EventData ) - Tank:MessageToAll( "I just got hit!", 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz b/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz deleted file mode 100644 index d429213..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/EVT-101 - UNIT OnEventHit Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-101 - UNIT OnEventHit Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua b/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua deleted file mode 100644 index 203d946..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- --- Name: EVT-102 - UNIT OnEventTakeoff Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A human plane and an AI plane are taking off from an airfield. --- --- # Test cases: --- --- 1. Take-Off the planes from the runway. --- 2. When the planes take-off, observe the message being sent. --- 3. Check the contents of the fields of the S_EVENT_TAKEOFF entry in the dcs.log file. - -PlaneAI = UNIT:FindByName( "PlaneAI" ) - -PlaneHuman = UNIT:FindByName( "PlaneHuman" ) - -PlaneAI:HandleEvent( EVENTS.Takeoff ) -PlaneHuman:HandleEvent( EVENTS.Takeoff ) - -function PlaneAI:OnEventTakeoff( EventData ) - - PlaneHuman:MessageToAll( "AI Taking Off", 15, "Alert!" ) -end - -function PlaneHuman:OnEventTakeoff( EventData ) - - PlaneHuman:MessageToAll( "Player " .. PlaneHuman:GetPlayerName() .. " is Taking Off", 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz b/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz deleted file mode 100644 index c7e6882..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/EVT-102 - UNIT OnEventTakeoff Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-102 - UNIT OnEventTakeoff Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua b/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua deleted file mode 100644 index ba4e760..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.lua +++ /dev/null @@ -1,38 +0,0 @@ ---- --- Name: EVT-103 - UNIT OnEventLand Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- An AI plane is landing on an airfield. --- When the plane landed, a new plane is spawned. --- --- # Test cases: --- --- 1. Observe the plane landing. --- 2. When the AI plane lands, observe the new plane being spawned. --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- Create a variable PlaneAI that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneAI". -PlaneAI = UNIT:FindByName( "PlaneAI" ) - --- Create a SPAWN object to spawn a new plane once the hold one lands. -SpawnPlane = SPAWN:New( "SpawnPlaneAI" ) - --- Declare a new variable that will hold the new spawned SpawnPlaneAI -local NewPlane - - --- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. -PlaneAI:HandleEvent( EVENTS.Land ) - --- Because the PlaneAI object is subscribed to the Land event, the following method will be automatically --- called when the land event is happening FOR THE PlaneAI UNIT only! -function PlaneAI:OnEventLand( EventData ) - - -- Okay, the PlaneAI has landed, now spawn the new plane ( a predator ) - NewPlane = SpawnPlane:Spawn() -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz b/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz deleted file mode 100644 index 2e337ac..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/EVT-103 - UNIT OnEventLand Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-103 - UNIT OnEventLand Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua b/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua deleted file mode 100644 index 9a66753..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.lua +++ /dev/null @@ -1,35 +0,0 @@ ---- --- Name: EVT-104 - UNIT OnEventCrash Example --- Author: FlightControl --- Date Created: 7 Feb 2017 --- --- # Situation: --- --- A human plane is fyling in the air. Crash it into the ground. --- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... --- --- # Test cases: --- --- 1. Fly the plane into the ground. --- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. --- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. - --- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". -PlaneHuman = UNIT:FindByName( "PlaneHuman" ) - --- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). -PlaneHuman:HandleEvent( EVENTS.Crash ) - --- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically --- called when the Crash event is happening FOR THE PlaneHuman UNIT only! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function PlaneHuman:OnEventCrash( EventData ) - - -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. - self:E( "Smoking at the position" ) - EventData.IniUnit:SmokeOrange() -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz b/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz deleted file mode 100644 index 1034f68..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/EVT-104 - UNIT OnEventCrash Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-104 - UNIT OnEventCrash Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua b/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua deleted file mode 100644 index a65d319..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.lua +++ /dev/null @@ -1,107 +0,0 @@ ---- --- Name: EVT-105 - UNIT OnEventPlayerEnterUnit Example --- Author: FlightControl --- Date Created: 15 Dec 2017 --- --- 2 planes and 2 tanks are located on and near the airport. --- The test is about checking if S_EVENT_PLAYER_ENTER_UNIT is correctly working in DCS single player and multi player. --- The test requires you to jump into the 2 planes and into the 2 tanks using CA. --- Please execute the following scenarios in Single and Multi-Player: --- --- 1. Test in Single Player: --- --- First we need to get the mission running... To do this, do the following actions: --- - At mission startup, once you get the slots, press the ESC key... The slot selection window will disappear. --- - Then press the ESC key again, and in the window, select the menu option "Select Slot". --- --- Next, we select the 2 planes... --- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. --- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. --- --- Next, we select the 2 tanks... Select the MAP view using F10, and: --- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. --- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. --- --- --- 2. Test in Multi Player: --- --- Run the mission on a server, and connect to the mission with a client... --- --- On the client machine, we select the 2 planes... --- - Select Plane 1 slot. Go to external view. Once you are in the SU-25T, an orange smoke and a message should appear. --- - Select Plane 2 slot. Go to external view. Once you are in the SU-25T, a red smoke and a message should appear. --- --- On the client machine, we select the 2 tanks... Select the MAP view using F10, and: --- - Select the Tank 1 unit using the arrow. And then press RALT-J which should jump you into Tank 1. Go to external view. Once you are in the Tank, a blue smoke and a message should appear. --- - Select the Tank 2 unit using the arrow. And then press RALT-J which should jump you into Tank 2. Go to external view. Once you are in the Tank, a green smoke and a message should appear. --- --- --- If all of this is working correctly, then the fix is correctly patched! - - - --- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "Plane x". -Plane1 = CLIENT:FindByName( "Plane 1" ) -Plane2 = CLIENT:FindByName( "Plane 2" ) - --- Subscribe to the event. The event occurs when a player enters a slot. -Plane1:HandleEvent( EVENTS.PlayerEnterUnit ) -Plane2:HandleEvent( EVENTS.PlayerEnterUnit ) - --- Because the Plane object is subscribed to the PlayerEnterUnit event, the following method will be automatically --- called when the event is happening! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Plane1:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeOrange() - MESSAGE:NewType( "A human has entered Plane 1", MESSAGE.Type.Information ):ToAll() -end - - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Plane2:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeRed() - MESSAGE:NewType( "A human has entered Plane 2", MESSAGE.Type.Information ):ToAll() -end - - - - - ---- Now for the ground units -Tank1 = UNIT:FindByName( "Tank 1" ) -Tank2 = UNIT:FindByName( "Tank 2" ) - --- Subscribe to the event. The event occurs when a player enters a slot. -Tank1:HandleEvent( EVENTS.PlayerEnterUnit ) -Tank2:HandleEvent( EVENTS.PlayerEnterUnit ) - - --- Because the Tank object is subscribed to the PlayerEnterUnit event, the following method will be automatically --- called when the event is happening! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Tank1:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeBlue() - MESSAGE:NewType( "A human has entered Tank 1", MESSAGE.Type.Information ):ToAll() -end - - ---- @param self --- @param Core.Event#EVENTDATA EventData -function Tank2:OnEventPlayerEnterUnit( EventData ) - - -- Okay, the Human has entered the unit, now smoke at the x, z position. - EventData.IniUnit:SmokeGreen() - MESSAGE:NewType( "A human has entered Tank 2", MESSAGE.Type.Information ):ToAll() -end - diff --git a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz b/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz deleted file mode 100644 index 9d53b44..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/EVT-105 - UNIT OnEventPlayerEnterUnit Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-105 - UNIT OnEventPlayerEnterUnit Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua b/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua deleted file mode 100644 index 7afed4b..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: EVT-200 - GROUP OnEventShot Example --- Author: FlightControl --- Date Created: 07 Mar 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_SHOT entry. --- 4. The planes of GROUP "Group Plane A", should only send a message when they shoot a missile. --- 5. The planes of GROUP "Group Plane B", should NOT send a message when they shoot a missile. - -PlaneGroup = GROUP:FindByName( "Group Plane A" ) - -PlaneGroup:HandleEvent( EVENTS.Shot ) - -function PlaneGroup:OnEventShot( EventData ) - - self:E( "I just fired a missile and I am part of " .. EventData.IniGroupName ) - EventData.IniUnit:MessageToAll( "I just fired a missile and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz b/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz deleted file mode 100644 index 385595c..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/EVT-200 - GROUP OnEventShot Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-200 - GROUP OnEventShot Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua b/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua deleted file mode 100644 index 7654194..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: EVT-201 - GROUP OnEventHit Example --- Author: FlightControl --- Date Created: 08 Mar 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. --- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. --- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. - -TanksGroup = GROUP:FindByName( "Group Tanks A" ) - -TanksGroup:HandleEvent( EVENTS.Hit ) - -function TanksGroup:OnEventHit( EventData ) - - self:E( "I just got hit and I am part of " .. EventData.TgtGroupName ) - EventData.TgtUnit:MessageToAll( "I just got hit and I am part of " .. EventData.TgtGroupName, 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz b/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz deleted file mode 100644 index 33a519b..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/EVT-201 - GROUP OnEventHit Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-201 - GROUP OnEventHit Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua b/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua deleted file mode 100644 index 70aef8e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: EVT-204 - GROUP OnEventCrash Example --- Author: FlightControl --- Date Created: 29 May 2017 --- --- # Situation: --- --- A human plane is fyling in the air. Crash it into the ground. --- Once you are crashed into the ground, at the place where you crashed, a smoke should start burning ... --- --- # Test cases: --- --- 1. Fly the plane into the ground. --- 2. When your plane crashes, observe a smoke starting to burn right were you crashed. --- 3. Check the contents of the fields of the S_EVENT_CRASH entry in the dcs.log file. - - --- Create a variable PlaneHuman that holds a reference to UNIT object (created by moose at the beginning of the mission) with the name "PlaneHuman". -PlaneHumanGroup = GROUP:FindByName( "PlaneGroup" ) - --- Subscribe to the event Crash. The Crash event occurs when a plane crashes into the ground (or into something else). -PlaneHumanGroup:HandleEvent( EVENTS.Crash ) - --- Because the PlaneHuman object is subscribed to the Crash event, the following method will be automatically --- called when the Crash event is happening FOR THE PlaneHuman UNIT only! - ---- @param self --- @param Core.Event#EVENTDATA EventData -function PlaneHumanGroup:OnEventCrash( EventData ) - - -- Okay, the PlaneHuman has crashed, now smoke at the x, z position. - self:E( "Smoking at the position" ) - EventData.IniUnit:SmokeOrange() -end diff --git a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz b/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz deleted file mode 100644 index bac6d92..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/EVT-204 - GROUP OnEventCrash Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-204 - GROUP OnEventCrash Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua b/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua deleted file mode 100644 index 0552161..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: EVT-205 - GROUP OnEventDead Example --- Author: FlightControl --- Date Created: 29 May 2017 --- --- # Situation: --- --- Two groups of planes are flying in the air and shoot an missile to a multitude of ground targets. --- --- # Test cases: --- --- 1. Observe the planes shooting the missile. --- 2. Observe when the planes shoots the missile, and hit the group Tanks A, a dcs.log entry is written in the logging. --- 3. Check the contents of the fields of the S_EVENT_HIT entry. --- 4. The tanks of GROUP "Group Tanks A", should only send a message when they get hit. --- 5. The tanks of GROUP "Group Tanks B", should NOT send a message when they get hit. - -TanksGroup = GROUP:FindByName( "Group Tanks A" ) - -TanksGroup:HandleEvent( EVENTS.Dead ) - -function TanksGroup:OnEventDead( EventData ) - - self:E( "I just got dead and I am part of " .. EventData.IniGroupName ) - EventData.IniUnit:MessageToAll( "I just got dead and I am part of " .. EventData.IniGroupName, 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz b/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz deleted file mode 100644 index bf3e8e1..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/EVT-205 - GROUP OnEventDead Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-205 - GROUP OnEventDead Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua b/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua deleted file mode 100644 index 9847ce5..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: EVT-401 - Generic OnEventHit Example --- Author: FlightControl --- Date Created: 15 February 2017 --- --- # Situation: --- --- Ground targets are shooting each other. --- --- # Test cases: --- --- 1. Observe the ground forces shooting each other. --- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. --- 3. The generic EventHandler objects should receive the hit events. - -CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) - -EventHandler1 = EVENTHANDLER:New() -EventHandler2 = EVENTHANDLER:New() - -EventHandler1:HandleEvent( EVENTS.Hit ) -EventHandler2:HandleEvent( EVENTS.Hit ) - -function EventHandler1:OnEventHit( EventData ) - self:E("hello 1") - CC:GetPositionable():MessageToAll( "I just got hit!", 15 , "Alert!" ) -end - -function EventHandler2:OnEventHit( EventData ) - self:E("hello 2") - CC:GetPositionable():MessageToAll( "I just got hit!", 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz b/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz deleted file mode 100644 index 396b118..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/EVT-401 - Generic OnEventHit Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-401 - Generic OnEventHit Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua b/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua deleted file mode 100644 index f4e6d25..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- --- Name: EVT-402 - Generic OnEventMissionEnd Example --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- # Situation: --- --- Test mission end event handler. --- --- # Test cases: --- --- 1. Observe when the mission ends, a dcs.log entry is written in the logging. --- 2. The generic EventHandler objects should be called, and a log entry in dcs.log should be written. - -CC = COMMANDCENTER:New( UNIT:FindByName( "HQ" ), "HQ" ) - -EventHandler = EVENTHANDLER:New() - -EventHandler:HandleEvent( EVENTS.MissionEnd ) - -function EventHandler:OnEventMissionEnd( EventData ) - self:E("Mission End") -end - - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz b/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz deleted file mode 100644 index 42590ff..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/EVT-402 - Generic OnEventMissionEnd Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-402 - Generic OnEventMissionEnd Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua b/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua deleted file mode 100644 index d7e7c10..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: EVT-401 - Generic OnEventHit Example --- Author: FlightControl --- Date Created: 15 February 2017 --- --- # Situation: --- --- Ground targets are shooting each other. --- --- # Test cases: --- --- 1. Observe the ground forces shooting each other. --- 2. Observe when a tank receives a hit, a dcs.log entry is written in the logging. --- 3. The generic EventHandler objects should receive the hit events. - -CC = COMMANDCENTER:New( GROUP:FindByName( "HQ" ), "HQ" ) - -EventHandler1 = EVENTHANDLER:New() - - -EventHandler1:HandleEvent( EVENTS.Birth ) - ---- @param Core.Event#EVENT self --- @param Core.Event#EVENTDATA EventData -function EventHandler1:OnEventBirth( EventData ) - self:E("hello 1") - self:E( EventData.IniUnit:GetName() ) - CC:GetPositionable():MessageToAll( "I just got born!", 15 , "Alert!" ) -end - - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz b/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz deleted file mode 100644 index a0bfde5..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/EVT-403 - Generic OnEventBirth Example.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-403 - Generic OnEventBirth Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua b/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua deleted file mode 100644 index 2d81929..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.lua +++ /dev/null @@ -1,63 +0,0 @@ ---- --- Name: EVT-103 - OnEventLand Example --- Author: CraigOwen --- Date Created: 12 February 2017 --- --- # Situation: --- --- A client plane is landing on an airfield, trying to pick a rope in the landing zones. --- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. --- --- # Test cases: --- --- 1. Land the plane. --- 2. When the plane landed, observe your message and the signal. --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- Create a unit which signalizes if the client landed good. -signal = UNIT:FindByName("LandingZoneChallenge - Signal") - --- Create the zones used for the landing check --- Init Zone -InitZone = ZONE:New("LandingChallange - InitZone") - --- Ropes -zonegroup1 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 1" ) -zonegroup2 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 2" ) -zonegroup3 = GROUP:FindByName("LandingZoneChallenge - RopeGroup 3" ) -LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) -LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) -LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) - --- Create a variable Plane that holds a reference to CLIENT object (created by moose at the beginning of the mission) with the name "Plane". -Plane = CLIENT:FindByName( "Plane" ) --- Subscribe to the event Land. The Land event occurs when a plane lands at an airfield. -Plane:HandleEvent( EVENTS.Land ) - --- This function will be called whenever the Plane-Object (client) lands! -function Plane:OnEventLand( EventData ) - - -- check wether the client landet at the right airport, where the challenge is located - if not Plane:IsInZone(InitZone) then - return - end - - -- check if the touchdown took place inside of one of the zones - if Plane:IsInZone(LandZoneRope1) then - MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareGreen() - elseif Plane:IsInZone(LandZoneRope2) then - MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareYellow() - elseif Plane:IsInZone(LandZoneRope3) then - MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( Plane ) - signal:FlareRed() - else - MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( Plane ) - end - - -end - - -MESSAGE:New("Try to land on the runway in between the red trucks.", 15, "Landing challenge"):ToClient(Plane) \ No newline at end of file diff --git a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz b/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz deleted file mode 100644 index ec34554..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/EVT-500 - OnEventLand LandingChallenge.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-500 - OnEventLand LandingChallenge/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua b/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua deleted file mode 100644 index 469122a..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.lua +++ /dev/null @@ -1,151 +0,0 @@ ---- --- Name: EVT-103 - OnEventLand LandingChallengeComplex --- Author: CraigOwen --- Date Created: 12 February 2017 --- --- # Situation: --- --- Approaching the airfield the client gets a message and can try to land inside the landing zones. --- Here we want all clients to participate in the challenge, not only one. --- When the plane landed in one of the zones, a vehicle flares and a message ist printed out to the client. --- --- # Test cases: --- --- 1. Land one of the planes. --- 2. While landing the plane, observe your message and the signal (flare). --- 3. Check the contents of the fields of the S_EVENT_LAND entry in the dcs.log file. - --- In this advanced challenge we want to make sure all the following. --- 1. The challenge takes place at a certain airfield. --- 2. All clients can repeat the challange at any time, try after try. --- 3. All clients approaching the airport get a message indicating the challenge. --- 4. There is no useraction needet to participate in this, providing full focus on the task. - --- So lets go then... in five steps --- 1. Create a unit to signalize (flare) whenever a client landed correctly --- 2. Create Zones --- 3. Create a set of clients --- 4. Handle the EVENT.Land for all clients in the set using the signal unit --- 5. Create a scheduler checking for clients in zones - --- 1. Create a unit which signalizes if the client landed good. -signal = UNIT:FindByName("LandingZoneChallenge - Signal") - --- 2. Create Zones --- Init Zone - This is the global Zone for the LandingChallenge -InitZone = ZONE:New("LandingChallange - InitZone") - ---Ingress Zone - This Zone tries to asure the client approaches the runway from the right side -IngressZoneTemplate = GROUP:FindByName( "LandingZoneChallenge - IngressZone" ) -IngressZone = ZONE_POLYGON:New( "IngressZone", IngressZoneTemplate ) - --- Ropes - theese zones will simulate the ropes on a carrier. -zonegroup1 = GROUP:FindByName("LandingZoneChallenge - Rope 1" ) -zonegroup2 = GROUP:FindByName("LandingZoneChallenge - Rope 2" ) -zonegroup3 = GROUP:FindByName("LandingZoneChallenge - Rope 3" ) -LandZoneRope1 = ZONE_POLYGON:New( "Rope1", zonegroup1) -LandZoneRope2 = ZONE_POLYGON:New( "Rope2", zonegroup2) -LandZoneRope3 = ZONE_POLYGON:New( "Rope3", zonegroup3) - - --- 3. Create a set of clients --- In this example we do not want to handle the event for one specific client, but rather for all red plane clients. --- To achieve this, we start with filtering the clients and saving those into the "BlueClients" variable -RedClients = SET_CLIENT:New():FilterCoalitions("red"):FilterStart() - - --- 4. We want to let every client subscribe to the event EVENT.Land. This event occurs when a plane lands. Be aware that this could be any airfield at this point. --- To do so, we run the ForEachClient method on our set of clients and call a function taking the client as parameter -RedClients:ForEachClient( - --- This function will be called for every single client in the set - -- @param MooseClient#CLIENT ClientInSet - function( ClientInSet ) - - -- Inside here we want to do two things. - -- 1. Write down the local function doing all the magic. - -- 2. Call this function for each ClientInSet - - -- 1. The magic - local function ResetClientForZone( MooseClient ) - --At first we set this client to a state, in wich she/he is not participating in this event - MooseClient:SetState( MooseClient, "ZoneStep", "0" ) - - --Now we subscribe to the event just like we did in the first example. - MooseClient:HandleEvent(EVENTS.Land) - - - --- Finally we set up the so called handler FOR the event. This is a function wich will determine what happens, whenever a client lands. - -- Note here, that the function has the MooseClient in front. So this function will literaly get a part of the client itself. - -- Therefore we can refere to "self" inside the function whenever meaning the MooseClient - -- The param EventData is a parameter given to all event handlers and providing several data about this particular event. - -- @param Core.Event#EVENTDATA EventData - function MooseClient:OnEventLand( EventData ) - - -- Ok now the client "MooseClient" definetly has landed. And beeing here means being the client. MooseClient <-> self - -- So now i want to know 2 things, to verify that i have done everything right. - -- 1. I want to know if my(self) landed in the challengeZone, so landing in other places will not react to this challenge - -- 2. Furthermore i want to know if my(self) came from the right side. - -- In all other cases nothing shell happen, so we reset the client state here and return doin nothing else. - if not self:IsInZone(InitZone) or self:GetState( self, "ZoneStep" ) ~= "2" then - self:SetState( self, "ZoneStep", "0" ) - return - end - - -- Here we check wich rope was picked and set the signal and message according to it. - if self:IsInZone(LandZoneRope1) then - MESSAGE:New("Great job! You picked the first rope.", 15, "Landing challenge" ):ToClient( self ) - signal:FlareGreen() - elseif self:IsInZone(LandZoneRope2) then - MESSAGE:New("Good job! You picked the second rope.", 15, "Landing challenge" ):ToClient( self ) - signal:FlareYellow() - elseif self:IsInZone(LandZoneRope3) then - MESSAGE:New("Close! You picked the last rope.", 15, "Landing challenge" ):ToClient( self ) - signal:FlareRed() - else - MESSAGE:New("Too bad, no rope picked! Thrust your engines and try again.", 15, "Landing challenge" ):ToClient( self ) - end - - -- Finally we set the client back to step 1, allowing a new message for landing - self:SetState( self, "ZoneStep", "1" ) - - end - end - - -- 2. As we're now all set, we can finally call our function for every ClientInSet - ClientInSet:Alive( ResetClientForZone ) - - end - ) - --- 5. Finally we use a scheduler checking wether clients are inside or outside these zones. -LandingChallangeActionsScheduler, LandingChallangeActionsSchedulerID = SCHEDULER:New( nil, - function () - - -- Flying by the airport there will be a message showing that the landing challange is currently in place. - -- This will make the ClientState shift from 0 -> 1 - RedClients:ForEachClientInZone( InitZone, - function( MooseClient ) - BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) - if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "0" then - MooseClient:SetState( MooseClient, "ZoneStep", "1" ) - MESSAGE:New("Welcome to the Landing challenge. If you want to participate, get yourself a landing clearance by ATC and navigate to the landing corridor.", 20, "Landing challenge" ):ToClient( MooseClient ) - end - end - ) - - -- The client is approaching the runway from the correct side? - -- If yes, then shift state from 1 to 2 - RedClients:ForEachClientInZone( IngressZone, - function( MooseClient ) - BASE:E( { Client = MooseClient, State = MooseClient:GetState( MooseClient, "ZoneStep" ) } ) - if MooseClient:IsAlive() and MooseClient:GetState( MooseClient, "ZoneStep" ) == "1" then - MooseClient:SetState( MooseClient, "ZoneStep", "2" ) - MESSAGE:New("Ok, now its your turn. Land your airframe and try to get one of the ropes. Good luck!", 15, "Landing challenge" ):ToClient( MooseClient ) - end - end - ) - - end, {}, 5, 5 - ) - -MESSAGE:New("Try to land on the runway in between the red trucks located at the right side.", 15, "Landing challenge"):ToAll() \ No newline at end of file diff --git a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz b/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz deleted file mode 100644 index 409eea0..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/EVT-501 - OnEventLand LandingChallengeComplex.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-501 - OnEventLand LandingChallengeComplex/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua b/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua deleted file mode 100644 index e05d830..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: EVT-600 - OnEventHit Example with a Set of Units --- Author: FlightControl --- Date Created: 6 Mar 2017 --- --- # Situation: --- --- A plane is flying in the air and shoots an missile to a ground target. --- It will shoot a couple of tanks units that are part of a Set. --- --- # Test cases: --- --- 1. Observe the plane shooting the missile. --- 2. Observe when the plane hits a tank, a dcs.log entry is written in the logging. --- 4. Observe the tanks hitting the targets and the messages appear. --- 3. Check the contents of the fields of the S_EVENT_HIT entries. - -Plane = UNIT:FindByName( "Plane" ) - -UnitSet = SET_UNIT:New():FilterPrefixes( "Tank" ):FilterStart() - -UnitSet:HandleEvent( EVENTS.Hit ) - -function UnitSet:OnEventHit( EventData ) - - Plane:MessageToAll( "I just hit a tank! " .. EventData.IniUnit:GetName(), 15, "Alert!" ) -end - - diff --git a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz b/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz deleted file mode 100644 index d0123ee..0000000 Binary files a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/EVT-600 - OnEventHit Example with a Set of Units.miz and /dev/null differ diff --git a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/pack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/unpack.ps1 b/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/EVT - Event Handling/EVT-600 - OnEventHit Example with a Set of Units/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua b/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua deleted file mode 100644 index 7bb1852..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ):TestSmokeDirectionVector(true) -LargeFormation:FormationLeftLine( 500, 0, 250, 0 ) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz b/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz deleted file mode 100644 index 4191ee8..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/FOR-001 - Bomber Speed and Route Test.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-001 - Bomber Speed and Route Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua deleted file mode 100644 index b6c474a..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Line Formation", "Briefing" ) -LargeFormation:FormationLeftLine( 0, 0, 250, 250 ) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz deleted file mode 100644 index e8d0574..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/FOR-100 - Bomber Left Line Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-100 - Bomber Left Line Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua deleted file mode 100644 index 1ae1013..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Line Formation", "Briefing" ) -LargeFormation:FormationRightLine(500,0,250,250) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz deleted file mode 100644 index 1d296da..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/FOR-101 - Bomber Right Line Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-101 - Bomber Right Line Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua deleted file mode 100644 index d5971c2..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Left Wing Formation", "Briefing" ) -LargeFormation:FormationLeftWing( 500, 50, 0, 250, 250 ) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz deleted file mode 100644 index d0a2bc6..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/FOR-102 - Bomber Left Wing Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-102 - Bomber Left Wing Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua deleted file mode 100644 index 65f7663..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Right Wing Formation", "Briefing" ) -LargeFormation:FormationRightWing( 100, 50, 0, 500, 500 ) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz deleted file mode 100644 index 7674f4f..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/FOR-103 - Bomber Right Wing Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-103 - Bomber Right Wing Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua deleted file mode 100644 index e9e81ce..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Center Wing Formation", "Briefing" ) -LargeFormation:FormationCenterWing( 500, 50, 0, 0, 250, 250 ) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz deleted file mode 100644 index c38e43b..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/FOR-104 - Bomber Center Wing Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-104 - Bomber Center Wing Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua deleted file mode 100644 index c177432..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.lua +++ /dev/null @@ -1,8 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) -LargeFormation:FormationTrail( 250, 750 , 0 ) -LargeFormation:__Start( 1 ) - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz deleted file mode 100644 index 26d08e2..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/FOR-105 - Bomber Trail Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-105 - Bomber Trail Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua b/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua deleted file mode 100644 index 83f3cfb..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.lua +++ /dev/null @@ -1,10 +0,0 @@ - -local FollowGroupSet = SET_GROUP:New():FilterCategories("plane"):FilterCoalitions("blue"):FilterPrefixes("Follow"):FilterStart() -FollowGroupSet:Flush() -local LeaderUnit = UNIT:FindByName( "Leader" ) -local LargeFormation = AI_FORMATION:New( LeaderUnit, FollowGroupSet, "Trail Formation", "Briefing" ) -LargeFormation:FormationBox(150,120,0,-5,0,60,8) -LargeFormation:__Start( 1 ) - -collectgarbage() - diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz b/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz deleted file mode 100644 index 4614d9b..0000000 Binary files a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/FOR-106 - Bomber Box Formation.miz and /dev/null differ diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/pack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/unpack.ps1 b/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FOR - AI Group Formation/FOR-106 - Bomber Box Formation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua b/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua deleted file mode 100644 index 1ad4384..0000000 --- a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.lua +++ /dev/null @@ -1,122 +0,0 @@ ---- Transition Explanation --- --- === --- --- Name: Transition Explanation --- Author: FlightControl --- Date Created: 05 Jan 2017 --- --- # Situation: --- --- Create a simple FSM. --- Add 2 transitions that will switch state from "Green" to "Red" upon event "Switch". --- --- # Test cases: --- --- # Status: TESTED 05 Jan 2017 - -local FsmDemo = FSM:New() -- #FsmDemo -local FsmUnit = UNIT:FindByName( "FlareUnit" ) - -FsmDemo:SetStartState( "Green" ) - -do FsmDemo:AddTransition( "Green", "Switch", "Red" ) -- FSM Transition for type #FsmDemo. - - --- OnLeave State Transition for Green. - -- @function [parent=#FsmDemo] OnLeaveGreen - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnEnter State Transition for Red. - -- @function [parent=#FsmDemo] OnEnterRed - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- OnBefore State Transition for Switch. - -- @function [parent=#FsmDemo] OnBeforeSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnAfter State Transition for Switch. - -- @function [parent=#FsmDemo] OnAfterSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- Embedded Event Trigger for Switch. - -- @function [parent=#FsmDemo] Switch - -- @param #FsmDemo self - - --- Delayed Event Trigger for Switch - -- @function [parent=#FsmDemo] __Switch - -- @param #FsmDemo self - -- @param #number Delay The delay in seconds. - -end -- FsmDemo - -do FsmDemo:AddTransition( "Red", "Switch", "Green" ) -- FSM Transition for type #FsmDemo. - - --- OnLeave State Transition for Red. - -- @function [parent=#FsmDemo] OnLeaveRed - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnEnter State Transition for Green. - -- @function [parent=#FsmDemo] OnEnterGreen - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- OnBefore State Transition for Switch. - -- @function [parent=#FsmDemo] OnBeforeSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - -- @return #boolean Return false to cancel Transition. - - --- OnAfter State Transition for Switch. - -- @function [parent=#FsmDemo] OnAfterSwitch - -- @param #FsmDemo self - -- @param #string From The From State string. - -- @param #string Event The Event string. - -- @param #string To The To State string. - - --- Embedded Event Trigger for Switch. - -- @function [parent=#FsmDemo] Switch - -- @param #FsmDemo self - - --- Delayed Event Trigger for Switch - -- @function [parent=#FsmDemo] __Switch - -- @param #FsmDemo self - -- @param #number Delay The delay in seconds. - -end -- FsmDemo - -function FsmDemo:OnAfterSwitch( From, Event, To, FsmUnit ) - self:E( { From, Event, To, FsmUnit } ) - if From == "Green" then - FsmUnit:Flare(FLARECOLOR.Green) - else - if From == "Red" then - FsmUnit:Flare(FLARECOLOR.Red) - end - end - FsmDemo:__Switch( 5, FsmUnit ) -end - -FsmDemo:__Switch( 5, FsmUnit ) - diff --git a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz b/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz deleted file mode 100644 index 7b7c5ed..0000000 Binary files a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/FSM-100 - Transition Explanation.miz and /dev/null differ diff --git a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/pack.ps1 b/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/unpack.ps1 b/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/FSM - Finite State Machine/FSM-100 - Transition Explanation/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua b/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua deleted file mode 100644 index 7f33d42..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: GRP-100 - IsAlive --- Author: FlightControl --- Date Created: 23 Feb 2017 --- --- # Situation: --- --- This test is about checking if IsAlive on GROUP level is working correctly. --- Two ground forces GROUPS are shooting each other. --- Check the IsAlive status in the logging of the survivor and the defeat. --- --- # Test cases: --- --- 1. Observe the IsAlive statuses in the dcs.log file. - - - ---Create Spawn Groups -local GroupBlue = GROUP:FindByName( "Blue" ) -local GroupRed = GROUP:FindByName( "Red" ) - -local Schedule, ScheduleID = SCHEDULER:New( nil, - --- Variable Declarations - -- @param Wrapper.Group#GROUP GroupBlue - -- @param Wrapper.Group#GROUP GroupRed - function( GroupBlue, GroupRed ) - local IsAliveBlue = GroupBlue:IsAlive() - local IsAliveRed = GroupRed:IsAlive() - BASE:E( { IsAliveBlue = IsAliveBlue, IsAliveRed = IsAliveRed } ) - end, { GroupBlue, GroupRed }, 1, 1 -) - diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz b/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz deleted file mode 100644 index 12518fc..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/GRP-100 - IsAlive.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-100 - IsAlive/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua b/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua deleted file mode 100644 index 1a96f44..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.lua +++ /dev/null @@ -1,30 +0,0 @@ ---- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. - -local HeliGroup = GROUP:FindByName( "Helicopter" ) - -local AttackGroup = GROUP:FindByName( "AttackGroup" ) - -local AttackUnits = AttackGroup:GetUnits() - -local Tasks = {} - -for i = 1, #AttackUnits do - - local AttackUnit = AttackGroup:GetUnit( i ) - Tasks[#Tasks+1] = HeliGroup:TaskAttackUnit( AttackUnit ) -end - -Tasks[#Tasks+1] = HeliGroup:TaskFunction( "_Resume", { "''" } ) - ---- @param Wrapper.Group#GROUP HeliGroup -function _Resume( HeliGroup ) - env.info( '_Resume' ) - - HeliGroup:MessageToAll( "Resuming",10,"Info") -end - -HeliGroup:PushTask( - HeliGroup:TaskCombo( - Tasks - ), 30 -) \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz b/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz deleted file mode 100644 index f590558..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/GRP-100 - TaskAttackUnit.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-100 - TaskAttackUnit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua b/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua deleted file mode 100644 index 176f507..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.lua +++ /dev/null @@ -1,24 +0,0 @@ - ---Create Spawn Groups -local SpawnPlane1 = SPAWN:New("Plane 1") -local SpawnPlane2 = SPAWN:New("Plane 2") - ---Spawn Groups into world -local GroupPlane1 = SpawnPlane1:Spawn() ---local GroupPlane1 = GROUP:FindByName( "Plane 1" ) -local GroupPlane2 = SpawnPlane2:Spawn() ---local GroupPlane2 = GROUP:FindByName( "Plane 2" ) - ---Create Task for plane2 (follow groupPlane1 at Vec3 offset) (Note: I think I need to be using controllers here) ---i.e. cntrlPlane1 = groupPlane1.getController(groupPlane1) - -local PointVec3 = POINT_VEC3:New( 100, 0, -100 ) -- This is a Vec3 class. - -local FollowDCSTask = GroupPlane2:TaskFollow( GroupPlane1, PointVec3:GetVec3() ) - ---Activate Task (Either PushTask/SetTask?) --- PushTask will push a task on the execution queue of the group. --- SetTask will delete all tasks from the current group queue, and executes this task. - -GroupPlane2:SetTask( FollowDCSTask, 1 ) - diff --git a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz b/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz deleted file mode 100644 index 614c943..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/GRP-200 - Follow Group.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-200 - Follow Group/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua b/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua deleted file mode 100644 index 03258b2..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.lua +++ /dev/null @@ -1,12 +0,0 @@ ---- This test demonstrates the use(s) of the SwitchWayPoint method of the GROUP class. - -HeliGroup = GROUP:FindByName( "Helicopter" ) - ---- Route the helicopter back to the FARP after 60 seconds. --- We use the SCHEDULER class to do this. -SCHEDULER:New( nil, - function( HeliGroup ) - local CommandRTB = HeliGroup:CommandSwitchWayPoint( 2, 8 ) - HeliGroup:SetCommand( CommandRTB ) - end, { HeliGroup }, 90 -) diff --git a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz b/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz deleted file mode 100644 index ac364b6..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/GRP-300 - Switch WayPoints.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-300 - Switch WayPoints/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua b/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua deleted file mode 100644 index 1f7710d..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.lua +++ /dev/null @@ -1,39 +0,0 @@ ---- --- Name: GRP-310 - Command StopRoute --- Author: FlightControl --- Date Created: 25 Mar 2017 --- --- # Situation: --- A ground unit is moving. --- Using the command CommandStopMove it will stop moving after 10 seconds. --- --- # Test cases: --- --- 1. Observe the ground group stopping to move. --- - ---- @param Wrapper.Group#GROUP GroundGroup -function StopMove( GroundGroup ) - - BASE:E("Stop") - local Command = GroundGroup:CommandStopRoute( true ) - GroundGroup:SetCommand(Command) - -end - ---- @param Wrapper.Group#GROUP GroundGroup -function StartMove( GroundGroup ) - - BASE:E("Start") - local Command = GroundGroup:CommandStopRoute( false ) - GroundGroup:SetCommand(Command) - -end - -GroundGroup = GROUP:FindByName( "Ground" ) - -Scheduler = SCHEDULER:New( nil ) -ScheduleIDStop = Scheduler:Schedule(nil, StopMove, { GroundGroup }, 10, 20 ) -ScheduleIDStart = Scheduler:Schedule(nil, StartMove, { GroundGroup }, 20, 20 ) - - diff --git a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz b/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz deleted file mode 100644 index f846d4d..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/GRP-310 - Command StopRoute.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-310 - Command StopRoute/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua b/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua deleted file mode 100644 index 47ff792..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- --- Name: GRP-400 - RouteReturnToAirbase --- Author: FlightControl --- Date Created: 25 Mar 2017 --- --- # Situation: --- Three air units are flying and are commanded to return a specific airbase. --- --- # Test cases: --- --- 1. Observe the Air1 group return to Batumi after 10 seconds. --- 2. Observe the Air2 group returning to Kobuleti after 300 seconds. (It was planned to land at Kutaisi). --- 3. Observe the Air3 group returning to the home (landing) airbase after 300 seconds. (It was planned to land at Kutaisi). --- - ---- @param Wrapper.Group#GROUP AirGroup -function ReturnToBatumi( AirGroup ) - BASE:E("ReturnToBatumi") - AirGroup:RouteRTB( AIRBASE:FindByName("Batumi") ) -end - ---- @param Wrapper.Group#GROUP AirGroup -function ReturnToKobuleti( AirGroup ) - BASE:E("ReturnToKobuleti") - AirGroup:RouteRTB( AIRBASE:FindByName("Kobuleti") ) -end - ---- @param Wrapper.Group#GROUP AirGroup -function ReturnToHome( AirGroup ) - BASE:E("ReturnToHome") - AirGroup:RouteRTB() -end - -Air1Group = GROUP:FindByName( "Air1" ) -Air2Group = GROUP:FindByName( "Air2" ) -Air3Group = GROUP:FindByName( "Air3" ) - -Scheduler = SCHEDULER:New( nil ) -ScheduleIDAir1 = Scheduler:Schedule(nil, ReturnToBatumi, { Air1Group }, 10 ) -ScheduleIDAir2 = Scheduler:Schedule(nil, ReturnToKobuleti, { Air2Group }, 300 ) -ScheduleIDAir3 = Scheduler:Schedule(nil, ReturnToHome, { Air3Group }, 300 ) - - - - diff --git a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz b/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz deleted file mode 100644 index a9877d4..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/GRP-400 - RouteReturnToAirbase.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-400 - RouteReturnToAirbase/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua b/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua deleted file mode 100644 index b894830..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.lua +++ /dev/null @@ -1,21 +0,0 @@ --- This routes a GroundGroup 1km further with an angle of 180 degrees. - -local GroundGroup = GROUP:FindByName( "Vehicle" ) - --- Get the current coordinate of GroundGroup -FromCoord = GroundGroup:GetCoordinate() - --- From the current coordinate, calculate 1km away with an angle of 180 degrees. -ToCoord = FromCoord:Translate( 1000, 180 ) - -RoutePoints = {} - --- Create a "grount route point", which is a "point" structure that can be given as a parameter to a Task -RoutePoints[#RoutePoints+1] = FromCoord:RoutePointGround( 0 ) -RoutePoints[#RoutePoints+1] = ToCoord:RoutePointGround( 60, "Cone" ) - --- Create a combo task, that creates a route task to the RoutePoint -RouteTask = GroundGroup:TaskRoute( RoutePoints ) - --- Set the task to be executed by the GroundGroup -GroundGroup:SetTask( RouteTask, 1 ) \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz b/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz deleted file mode 100644 index b3c0869..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/GRP-500 - Ground TaskRoute.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-500 - Ground TaskRoute/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua b/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua deleted file mode 100644 index 3c27fa3..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.lua +++ /dev/null @@ -1,16 +0,0 @@ --- This routes a GroundGroup 1km further with an angle of 180 degrees. - -local GroundGroup = GROUP:FindByName( "Vehicle" ) - --- Get the current coordinate of GroundGroup -FromCoord = GroundGroup:GetCoordinate() - --- From the current coordinate, calculate 1km away with an angle of 180 degrees. -ToCoord = FromCoord:Translate( 1000, 180 ) - - --- Create a combo task, that creates a route task to the RoutePoint -RouteTask = GroundGroup:TaskRouteToVec2( ToCoord:GetVec2() ) - --- Set the task to be executed by the GroundGroup -GroundGroup:SetTask( RouteTask, 1 ) \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz b/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz deleted file mode 100644 index 544e862..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/GRP-501 - Ground TaskRouteToVec2.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-501 - Ground TaskRouteToVec2/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua b/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua deleted file mode 100644 index 2718caf..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.lua +++ /dev/null @@ -1,46 +0,0 @@ ---- This makes a vehicle fly to random zones when a waypoint has been reached. --- Name: GRP - Group Commands/GRP-502 - Route at waypoint to random point --- Author: FlightControl --- Date Created: 08 Aug 2017 - - -local ZoneList = { - ZONE:New( "ZONE1" ), - ZONE:New( "ZONE2" ), - ZONE:New( "ZONE3" ), - ZONE:New( "ZONE4" ), - ZONE:New( "ZONE5" ) -} - -GroundGroup = GROUP:FindByName( "Vehicle" ) - ---- @param Wrapper.Group#GROUP GroundGroup -function RouteToZone( Vehicle, ZoneRoute ) - - local Route = {} - - Vehicle:E( { ZoneRoute = ZoneRoute } ) - - Vehicle:MessageToAll( "Moving to zone " .. ZoneRoute:GetName(), 10 ) - - -- Get the current coordinate of the Vehicle - local FromCoord = Vehicle:GetCoordinate() - - -- Select a random Zone and get the Coordinate of the new Zone. - local RandomZone = ZoneList[ math.random( 1, #ZoneList ) ] -- Core.Zone#ZONE - local ToCoord = RandomZone:GetCoordinate() - - -- Create a "ground route point", which is a "point" structure that can be given as a parameter to a Task - Route[#Route+1] = FromCoord:RoutePointGround( 72 ) - Route[#Route+1] = ToCoord:RoutePointGround( 60, "Vee" ) - - local TaskRouteToZone = Vehicle:TaskFunction( "RouteToZone", RandomZone ) - - Vehicle:SetTaskAtWaypoint( Route, #Route, TaskRouteToZone ) -- Set for the given Route at Waypoint 2 the TaskRouteToZone. - - Vehicle:Route( Route, math.random( 10, 20 ) ) -- Move after a random seconds to the Route. See the Route method for details. - -end - -RouteToZone( GroundGroup, ZoneList[1] ) - diff --git a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz b/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz deleted file mode 100644 index f7620ef..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/GRP-502 - Route at waypoint to random point.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-502 - Route at waypoint to random point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua b/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua deleted file mode 100644 index 021dc73..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.lua +++ /dev/null @@ -1,45 +0,0 @@ ---- This makes a vehicle drive to random zones when a waypoint has been reached. --- Name: GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point --- Author: FlightControl --- Date Created: 08 Aug 2017 - - -local ZoneList = { - ZONE:New( "ZONE1" ), - ZONE:New( "ZONE2" ), - ZONE:New( "ZONE3" ), - ZONE:New( "ZONE4" ), - ZONE:New( "ZONE5" ), -} - -VehicleGroup = GROUP:FindByName( "Vehicle #001" ) - ---- @param Wrapper.Group#GROUP RoutedGroup -function ReRoute( VehicleGroup ) - - VehicleGroup:E( "Routing" ) - - local ZoneNumber = math.random( 1, #ZoneList ) - VehicleGroup:E( ZoneNumber ) - - local FromCoord = VehicleGroup:GetCoordinate() -- Core.Point#COORDINATE - local FromWP = FromCoord:WaypointGround() - - local ZoneTo = ZoneList[ ZoneNumber ] -- Core.Zone#ZONE - local ToCoord = ZoneTo:GetCoordinate() - local ToWP = ToCoord:WaypointGround( 72, "Vee" ) - - local TaskReRoute = VehicleGroup:TaskFunction( "ReRoute" ) - VehicleGroup:SetTaskWaypoint( ToWP, TaskReRoute ) - - VehicleGroup:Route( { FromWP, ToWP }, 1 ) - -end - -ReRoute( VehicleGroup ) - - - - - - diff --git a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz b/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz deleted file mode 100644 index 73e8be6..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/GRP-503 - NTTR Route at waypoint to random point.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-503 - NTTR Route at waypoint to random point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua b/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua deleted file mode 100644 index 909d0f1..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- This makes a vehicle drive its route in a repetitive way. --- Name: GRP-550 - Patrol a route --- Author: FlightControl --- Date Created: 24 Sep 2017 - - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Patrol the route of the Vehicle. -Vehicle:PatrolRoute() - --- Find the Ship and create a GROUP object. -Ship = GROUP:FindByName( "Ship" ) - --- Patrol the route of the Ship. -Ship:PatrolRoute() diff --git a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz b/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz deleted file mode 100644 index 4f3631a..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/GRP-550 - Patrol a route.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-550 - Patrol a route/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua b/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua deleted file mode 100644 index d934f10..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- This makes a vehicle drive its route using the waypoints of the route and selecing random points on the route. --- Name: GRP-551 - Patrol to random points of a route --- Author: FlightControl --- Date Created: 24 Sep 2017 - - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Patrol to random points of the route at 120 km/h in "Vee" formation. -Vehicle:PatrolRouteRandom( 120, "Vee" ) - --- Find the Ship and create a GROUP object. -Ship = GROUP:FindByName( "Ship" ) - --- Patrol to random points of the route at 120 km/h in "Vee" formation. -Ship:PatrolRouteRandom( 120, "Vee" ) diff --git a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz b/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz deleted file mode 100644 index aa4c000..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/GRP-551 - Patrol to random points of a route.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-551 - Patrol to random points of a route/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua b/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua deleted file mode 100644 index c3dbcc7..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.lua +++ /dev/null @@ -1,16 +0,0 @@ ---- This makes a vehicle drive its route selecting random points in a zone. --- Name: GRP-552 - Patrol in a zone --- Author: FlightControl --- Date Created: 24 Sep 2017 - - -- Find the Vehicle and create a GROUP object. - Vehicle = GROUP:FindByName( "Vehicle" ) - - -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. - Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE" ) }, 120, "Vee" ) - - -- Find the Vehicle and create a GROUP object. - Ship = GROUP:FindByName( "Ship" ) - - -- Patrol to random points in the trigger zone ZONE, at 120 km/h in Vee format. - Ship:PatrolZones( { ZONE:New( "ZONESHIP" ) }, 120, "Vee" ) diff --git a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz b/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz deleted file mode 100644 index 0ae4359..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/GRP-552 - Patrol in a zone.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-552 - Patrol in a zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua b/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua deleted file mode 100644 index db2f18d..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.lua +++ /dev/null @@ -1,16 +0,0 @@ ---- This makes a vehicle drive its route selecting random points in a zone. --- Name: GRP-553 - Patrol in a list of zones --- Author: FlightControl --- Date Created: 24 Sep 2017 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Patrol to random points in the trigger zones ZONEVEHICLE1, ZONEVEHICLE2, ZONEVEHICLE3, at 120 km/h in Vee format. -Vehicle:PatrolZones( { ZONE:New( "ZONEVEHICLE1" ), ZONE:New( "ZONEVEHICLE2" ), ZONE:New( "ZONEVEHICLE3" ) }, 120, "Vee" ) - --- Find the Ship and create a GROUP object. -Ship = GROUP:FindByName( "Ship" ) - --- Patrol to random points in the trigger zones ZONESHIP1, ZONESHIP2, ZONESHIP3, at 120 km/h in Vee format. -Ship:PatrolZones( { ZONE:New( "ZONESHIP1" ), ZONE:New( "ZONESHIP2" ), ZONE:New( "ZONESHIP3" ) }, 120, "Vee" ) diff --git a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz b/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz deleted file mode 100644 index a6c26cc..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/GRP-553 - Patrol in a list of zones.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-553 - Patrol in a list of zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-600 - Respawn.miz b/Moose_Missions/GRP - Group Commands/GRP-600 - Respawn.miz deleted file mode 100644 index d0b781b..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-600 - Respawn.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua b/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua deleted file mode 100644 index 2fb61d5..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.lua +++ /dev/null @@ -1,11 +0,0 @@ ---- This makes a vehicle respawn itself when the mission starts. --- The vehicle is hidden, so you need to observe from the watch tower! --- Name: GRP-601 - Respawn hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Respawn the vehicle. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz b/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz deleted file mode 100644 index cf7649c..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/GRP-601 - Respawn hidden.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-601 - Respawn hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua b/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua deleted file mode 100644 index e5fb8c0..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.lua +++ /dev/null @@ -1,16 +0,0 @@ ---- This makes a vehicle respawn itself in zone ZONEVEHICLE1. --- Name: GRP-610 - Respawn in Zone --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz b/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz deleted file mode 100644 index 20c40ea..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/GRP-610 - Respawn in Zone.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-610 - Respawn in Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua b/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua deleted file mode 100644 index e88b31f..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.lua +++ /dev/null @@ -1,18 +0,0 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in relation to the original template position. --- --- Name: GRP-611 - Respawn multiple units in Zone --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz b/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz deleted file mode 100644 index 7192105..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/GRP-611 - Respawn multiple units in Zone.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-611 - Respawn multiple units in Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua b/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua deleted file mode 100644 index 9eacdde..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.lua +++ /dev/null @@ -1,19 +0,0 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in randomized within the new zone. --- --- Name: GRP-612 - Respawn multiple units in Zone randomized. --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) -Vehicle:InitRandomizePositionZone( true ) - --- Respawn the vehicle in RespawnZone1. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz b/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz deleted file mode 100644 index fb363ce..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/GRP-612 - Respawn multiple units in Zone randomized.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-612 - Respawn multiple units in Zone randomized/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua b/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua deleted file mode 100644 index 15bd883..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- This makes a vehicle respawn within ZONEVEHICLE1. --- The vehicle is hidden, so you need to observe at the watch tower through external view. --- Name: GRP-615 - Respawn in Zone hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz b/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz deleted file mode 100644 index 0933a29..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/GRP-615 - Respawn in Zone hidden.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-615 - Respawn in Zone hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua b/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua deleted file mode 100644 index bc2268a..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.lua +++ /dev/null @@ -1,19 +0,0 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in relation to the original template position. --- The vehicle is hidden, so you need to observe from the watch tower (external view). --- --- Name: GRP-616 - Respawn multiple units in Zone hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) - --- Respawn the vehicle in RespawnZone1. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz b/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz deleted file mode 100644 index 1e7a918..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/GRP-616 - Respawn multiple units in Zone hidden.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-616 - Respawn multiple units in Zone hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua b/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua deleted file mode 100644 index 8df3b24..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.lua +++ /dev/null @@ -1,20 +0,0 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1 hidden. --- The vehicle group consists of multiple units and are spawned in randomized within the new zone. --- The vehicle is hidden, so you need to observe from the watch tower (external view). --- --- Name: GRP-617 - Respawn multiple units in Zone randomized hidden --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) -Vehicle:InitRandomizePositionZone( true ) - --- Respawn the vehicle in RespawnZone1. -Vehicle:Respawn() \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz b/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz deleted file mode 100644 index 29b373d..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/GRP-617 - Respawn multiple units in Zone randomized hidden.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-617 - Respawn multiple units in Zone randomized hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua b/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua deleted file mode 100644 index 16fc27d..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- This makes a vehicle respawn itself within ZONEVEHICLE1. --- The vehicle group consists of multiple units and are spawned in randomized within the new zone. --- When the last vehicle of the group is destroyed, the group will respawn. --- --- Name: GRP-620 - Respawn multiple units when destroyed --- Author: FlightControl --- Date Created: 01 Mar 2018 - --- Find the Vehicle and create a GROUP object. -Vehicle = GROUP:FindByName( "Vehicle" ) - --- Setup RespawnZone1 linking to the trigger zone ZONEVEHICLE1. -RespawnZone1 = ZONE:New( "ZONEVEHICLE1") - --- Prepare the spawning to be done in RespawnZone1. -Vehicle:InitZone( RespawnZone1 ) -Vehicle:InitRandomizePositionZone( true ) - -Vehicle:HandleEvent( EVENTS.Dead ) -function Vehicle:OnEventDead( EventData ) - - self:E( { "Size ", Size = Vehicle:GetSize() } ) - - -- When the last vehicle of the group is declared dead, respawn the group. - if Vehicle:GetSize() == 1 then - -- Respawn the vehicle in RespawnZone1. - Vehicle:Respawn() - end -end \ No newline at end of file diff --git a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz b/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz deleted file mode 100644 index a778f23..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/GRP-620 - Respawn multiple units when destroyed.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-620 - Respawn multiple units when destroyed/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua b/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua deleted file mode 100644 index c5ae02e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: GRP-900 - Option Green and Red State --- Author: FlightControl --- Date Created: 10 Dec 2017 --- --- This tests the option to set the alarm state of a group to RED or GREEN. --- Both options are tested with two groups. --- Please check the dcs.log in case of errors, and the time the group reacts to the approaching target. --- The Red State Group should react much faster than the Green State Group. --- --- Join the Game Master to observe the reaction of the ground units. --- --- Blue is attacking. --- Green is defending. --- - - -RedStateGroup = GROUP:FindByName( "Red State" ) -GreenStateGroup = GROUP:FindByName( "Green State" ) - - -RedStateGroup:OptionAlarmStateRed() -GreenStateGroup:OptionAlarmStateGreen() - - - - diff --git a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz b/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz deleted file mode 100644 index 6c1e781..0000000 Binary files a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/GRP-900 - Option Green and Red State.miz and /dev/null differ diff --git a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/pack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/unpack.ps1 b/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/GRP - Group Commands/GRP-900 - Option Green and Red State/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua b/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua deleted file mode 100644 index 11c0bbb..0000000 --- a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua +++ /dev/null @@ -1,43 +0,0 @@ - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = GROUP:FindByName( "Red Plane 1" ) - local Plane2 = GROUP:FindByName( "Red Plane 2" ) - local Plane3 = GROUP:FindByName( "Red Plane 3" ) - local Plane4 = GROUP:FindByName( "Red Plane 4" ) - - -- This would create a menu for the red coalition under the main DCS "Others" menu. - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) - - - local function ShowStatus( StatusText, Coalition ) - - Plane1:MessageToRed( StatusText, 15 ) - Plane2:MessageToRed( StatusText, 15 ) - end - - local MenuStatus -- Menu#MENU_COALITION - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND - - local function RemoveStatusMenu() - MenuStatus:Remove() - end - - local function AddStatusMenu() - - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) - MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) - end - - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) - -end - - - - diff --git a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz b/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz deleted file mode 100644 index 423e442..0000000 Binary files a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz and /dev/null differ diff --git a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/pack.ps1 b/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/unpack.ps1 b/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MEN - Menu Options/Nevada/MEN-102 - Menu Coalition Multi Player/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua b/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua deleted file mode 100644 index fa483f1..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.lua +++ /dev/null @@ -1,56 +0,0 @@ - -do - -- This demo creates a menu structure for the two clients of planes. - -- Each client will receive a different menu structure. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - -- And play with the Add and Remove menu options. - - -- Note that in multi player, this will only work after the DCS clients bug is solved. - - local function ShowStatus( PlaneClient, StatusText, Coalition ) - - MESSAGE:New( Coalition, 15 ):ToRed() - PlaneClient:Message( StatusText, 15 ) - end - - local MenuStatus = {} - - local function RemoveStatusMenu( MenuClient ) - local MenuClientName = MenuClient:GetName() - MenuStatus[MenuClientName]:Remove() - end - - --- @param Wrapper.Client#CLIENT MenuClient - local function AddStatusMenu( MenuClient ) - local MenuClientName = MenuClient:GetName() - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" ) - MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" ) - end - - SCHEDULER:New( nil, - function() - local PlaneClient = CLIENT:FindByName( "Plane 1" ) - if PlaneClient and PlaneClient:IsAlive() then - local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient ) - end - end, {}, 10, 10 ) - - SCHEDULER:New( nil, - function() - local PlaneClient = CLIENT:FindByName( "Plane 2" ) - if PlaneClient and PlaneClient:IsAlive() then - local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient ) - MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient ) - end - end, {}, 10, 10 ) - -end - - - - diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz b/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz deleted file mode 100644 index bd91d29..0000000 Binary files a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/MEN-001 - Menu Client.miz and /dev/null differ diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/pack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/unpack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-001 - Menu Client/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua b/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua deleted file mode 100644 index f7ffacc..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.lua +++ /dev/null @@ -1,43 +0,0 @@ - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = CLIENT:FindByName( "Plane 1" ) - local Plane2 = CLIENT:FindByName( "Plane 2" ) - - - -- This would create a menu for the red coalition under the main DCS "Others" menu. - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) - - - local function ShowStatus( StatusText, Coalition ) - - MESSAGE:New( Coalition, 15 ):ToRed() - Plane1:Message( StatusText, 15 ) - Plane2:Message( StatusText, 15 ) - end - - local MenuStatus -- Menu#MENU_COALITION - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND - - local function RemoveStatusMenu() - MenuStatus:Remove() - end - - local function AddStatusMenu() - - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) - MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) - end - - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) - -end - - - - diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz b/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz deleted file mode 100644 index af903a1..0000000 Binary files a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/MEN-002 - Menu Coalition.miz and /dev/null differ diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/pack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/unpack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-002 - Menu Coalition/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua b/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua deleted file mode 100644 index 94d602a..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.lua +++ /dev/null @@ -1,56 +0,0 @@ - -do - -- This demo creates a menu structure for the two groups of planes. - -- Each group will receive a different menu structure. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - -- And play with the Add and Remove menu options. - - -- Note that in multi player, this will only work after the DCS groups bug is solved. - - local function ShowStatus( PlaneGroup, StatusText, Coalition ) - - MESSAGE:New( Coalition, 15 ):ToRed() - PlaneGroup:Message( StatusText, 15 ) - end - - local MenuStatus = {} - - local function RemoveStatusMenu( MenuGroup ) - local MenuGroupName = MenuGroup:GetName() - MenuStatus[MenuGroupName]:Remove() - end - - --- @param Wrapper.Group#GROUP MenuGroup - local function AddStatusMenu( MenuGroup ) - local MenuGroupName = MenuGroup:GetName() - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" ) - MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" ) - end - - SCHEDULER:New( nil, - function() - local PlaneGroup = GROUP:FindByName( "Plane 1" ) - if PlaneGroup and PlaneGroup:IsAlive() then - local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup ) - end - end, {}, 10, 10 ) - - SCHEDULER:New( nil, - function() - local PlaneGroup = GROUP:FindByName( "Plane 2" ) - if PlaneGroup and PlaneGroup:IsAlive() then - local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup ) - MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup ) - end - end, {}, 10, 10 ) - -end - - - - diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz b/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz deleted file mode 100644 index eba92a6..0000000 Binary files a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/MEN-003 - Menu Group.miz and /dev/null differ diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/pack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/unpack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-003 - Menu Group/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua b/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua deleted file mode 100644 index 11c0bbb..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.lua +++ /dev/null @@ -1,43 +0,0 @@ - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = GROUP:FindByName( "Red Plane 1" ) - local Plane2 = GROUP:FindByName( "Red Plane 2" ) - local Plane3 = GROUP:FindByName( "Red Plane 3" ) - local Plane4 = GROUP:FindByName( "Red Plane 4" ) - - -- This would create a menu for the red coalition under the main DCS "Others" menu. - local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" ) - - - local function ShowStatus( StatusText, Coalition ) - - Plane1:MessageToRed( StatusText, 15 ) - Plane2:MessageToRed( StatusText, 15 ) - end - - local MenuStatus -- Menu#MENU_COALITION - local MenuStatusShow -- Menu#MENU_COALITION_COMMAND - - local function RemoveStatusMenu() - MenuStatus:Remove() - end - - local function AddStatusMenu() - - -- This would create a menu for the red coalition under the MenuCoalitionRed menu object. - MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" ) - MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" ) - end - - local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu ) - local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu ) - -end - - - - diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz b/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz deleted file mode 100644 index a3cf15c..0000000 Binary files a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/MEN-102 - Menu Coalition Multi Player.miz and /dev/null differ diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/pack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/unpack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-102 - Menu Coalition Multi Player/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua b/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua deleted file mode 100644 index ab24d82..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.lua +++ /dev/null @@ -1,56 +0,0 @@ - -TestMenus = {} - -Menu = MENU_MISSION:New( "Generate Menus" ) - -do - -- This demo creates a menu structure for the planes within the red coalition. - -- To test, join the planes, then look at the other radio menus (Option F10). - -- Then switch planes and check if the menu is still there. - - local Plane1 = GROUP:FindByName( "Red Plane 1" ) - local Plane2 = GROUP:FindByName( "Red Plane 2" ) - local Plane3 = GROUP:FindByName( "Red Plane 3" ) - local Plane4 = GROUP:FindByName( "Red Plane 4" ) - - local CoalitionText = { - [coalition.side.BLUE] = "BLUE", - [coalition.side.RED] = "RED", - } - - local function MenuMessage( Text, Parameter ) - MESSAGE:NewType( Text .. Parameter, MESSAGE.Type.Information ):ToAll() - end - - local function MenuRemove(m) - TestMenus[m]:Remove() - end - - local function GenerateMissionMenu() - local m = #TestMenus+1 - TestMenus[m] = MENU_MISSION:New( "Menu Mission "..m ) - for n = 1, 8 do - local MenuMissionCommand = MENU_MISSION_COMMAND:New( "Show Mission "..m.."."..n, TestMenus[m], MenuMessage, "Mission ", m.."."..n) - end - local MenuMissionRemoveCommand = MENU_MISSION_COMMAND:New( "Remove Mission "..m, TestMenus[m], MenuRemove, m) - end - - local function GenerateCoalitionMenu( Coalition ) - local m = #TestMenus+1 - TestMenus[m] = MENU_COALITION:New( Coalition, "Menu Coalition "..CoalitionText[Coalition].." ".. m ) - for n = 1, 8 do - local MenuMissionCommand = MENU_COALITION_COMMAND:New( Coalition, "Show Coalition "..CoalitionText[Coalition].." "..m.."."..n, TestMenus[m], MenuMessage, "Coalition ", CoalitionText[Coalition].." "..m.."."..n) - end - local MenuMissionRemoveCommand = MENU_COALITION_COMMAND:New( Coalition, "Remove Coalition "..CoalitionText[Coalition].." "..m, TestMenus[m], MenuRemove, m) - end - - -- Create a mission menu to generate the menus. - local MenuMission = MENU_MISSION_COMMAND:New( "Generate Mission Menus", Menu, GenerateMissionMenu ) - local MenuCoalitionBlue = MENU_MISSION_COMMAND:New( "Generate Blue Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.BLUE ) - local MenucoalitionRed = MENU_MISSION_COMMAND:New( "Generate Red Coalition Menus", Menu, GenerateCoalitionMenu, coalition.side.RED ) - -end - - - - diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz b/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz deleted file mode 100644 index ce8d41f..0000000 Binary files a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/MEN-200 - Menu Stress Test 1.miz and /dev/null differ diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/pack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/unpack.ps1 b/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MEN - Menu Options/Normandy/MEN-200 - Menu Stress Test 1/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua b/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua deleted file mode 100644 index b28f664..0000000 --- a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.lua +++ /dev/null @@ -1,20 +0,0 @@ - --- Only use Include.File when developing new MOOSE classes. --- When using Moose.lua in the DO SCIPTS FILE initialization box, --- these Include.File statements are not needed, because all classes within Moose will be loaded. - - --- This is an example of a global -local Trainer = MISSILETRAINER - :New( 200, "Trainer: Welcome to the missile training, trainee! Missiles will be fired at you. Try to evade them. Good luck!" ) - :InitMessagesOnOff(true) - :InitAlertsToAll(true) - :InitAlertsHitsOnOff(true) - :InitAlertsLaunchesOnOff(false) -- I'll put it on below ... - :InitBearingOnOff(true) - :InitRangeOnOff(true) - :InitTrackingOnOff(true) - :InitTrackingToAll(true) - :InitMenusOnOff(false) - -Trainer:InitAlertsToAll(true) -- Now alerts are also on diff --git a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz b/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz deleted file mode 100644 index ab26d57..0000000 Binary files a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/MIT-001 - Missile Trainer.miz and /dev/null differ diff --git a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/pack.ps1 b/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/unpack.ps1 b/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MIT - Missile Trainer/MIT-001 - Missile Trainer/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua b/Moose_Missions/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua deleted file mode 100644 index 0ee9770..0000000 --- a/Moose_Missions/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE - Basic Demo.lua +++ /dev/null @@ -1,86 +0,0 @@ -------------------------------------------------------------------------- --- MOP-100 - MARKEROPS_BASE - Basic Demo -------------------------------------------------------------------------- --- Documentation --- --- MARKEROPS_BASE: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.MarkerOps_Base.html --- -------------------------------------------------------------------------- --- On the F10, call a tanker to start from the carrier. It will fly to --- an initial zone. Set a marker on the F10 map with keyword "TankerDemo". --- The Tanker will fly there. Set a marker on the F10 map with keywords --- "TankerDemo RTB". The tanke will RTB to the carrier. -------------------------------------------------------------------------- --- Date: May 2021 -------------------------------------------------------------------------- - --- globals -mytanker = nil -tankergroup = nil -TankerAuftrag = nil - -function menucalltanker() - - if not mytanker then - -- new MARKEROPS_BASE object - mytanker = MARKEROPS_BASE:New("TankerDemo",{"RTB"}) -- Core.MarkerOps_Base#MARKEROPS_BASE - -- start FlightGroup - tankergroup = FLIGHTGROUP:New("Tanker") - tankergroup:SetHomebase(AIRBASE:FindByName("Truman")) - tankergroup:SetDefaultRadio(245,"AM",false) - tankergroup:SetDespawnAfterLanding() - tankergroup:SwitchTACAN(45, "TKR", 1, "X") - tankergroup:SetDefaultCallsign(CALLSIGN.Tanker.Texaco,1) - -- Mission - local InitialHold = ZONE:New("Initial Hold"):GetCoordinate() - TankerAuftrag = AUFTRAG:NewTANKER(InitialHold,18000,UTILS.KnotsToAltKIAS(220,18000),90,20,0) - TankerAuftrag:SetMissionRange(500) - tankergroup:AddMission(TankerAuftrag) - else - local status = tankergroup:GetState() - local m = MESSAGE:New(string.format("Tanker %s ops in status: %s", mytanker.Tag, status),10,"Info",true):ToAll() - end - - -- Handler function - local function Handler(Keywords,Coord) - - local MustRTB = false - for _,_word in pairs (Keywords) do - if string.lower(_word) == "rtb" then - MustRTB = true - end - end - - -- cancel current Auftrag - TankerAuftrag:Cancel() - - -- check if we need to RTB - if MustRTB then - tankergroup:RTB(AIRBASE:FindByName("Truman")) - else - -- no, fly to coordinate of marker - local auftrag = AUFTRAG:NewTANKER(Coord,18000,UTILS.KnotsToAltKIAS(220,18000),90,20,0) - auftrag:SetMissionRange(500) - tankergroup:AddMission(auftrag) - TankerAuftrag = auftrag - end - end - - -- Event functions - function mytanker:OnAfterMarkAdded(From,Event,To,Text,Keywords,Coord) - local m = MESSAGE:New(string.format("Tanker %s Mark Added.", self.Tag),10,"Info",true):ToAll() - Handler(Keywords,Coord) - end - - function mytanker:OnAfterMarkChanged(From,Event,To,Text,Keywords,Coord) - local m = MESSAGE:New(string.format("Tanker %s Mark Changed.", self.Tag),10,"Info",true):ToAll() - Handler(Keywords,Coord) - end - - function mytanker:OnAfterMarkDeleted(From,Event,To) - local m = MESSAGE:New(string.format("Tanker %s Mark Deleted.", self.Tag),10,"Info",true):ToAll() - end -end - -MenuTop = MENU_COALITION:New( coalition.side.BLUE,"Call Tanker") -MenuTanker = MENU_COALITION_COMMAND:New(coalition.side.BLUE,"Start Tanker",MenuTop,menucalltanker) diff --git a/Moose_Missions/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz b/Moose_Missions/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz deleted file mode 100644 index bc21396..0000000 Binary files a/Moose_Missions/MOP-100 - MARKEROPS_BASE/MOP-100 - MARKEROPS_BASE.miz and /dev/null differ diff --git a/Moose_Missions/MOP-100 - MARKEROPS_BASE/pack.ps1 b/Moose_Missions/MOP-100 - MARKEROPS_BASE/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MOP-100 - MARKEROPS_BASE/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MOP-100 - MARKEROPS_BASE/unpack.ps1 b/Moose_Missions/MOP-100 - MARKEROPS_BASE/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MOP-100 - MARKEROPS_BASE/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua b/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua deleted file mode 100644 index b3fd78c..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.lua +++ /dev/null @@ -1,16 +0,0 @@ --- --- #MANTIS --- Moose derived Modular, Automatic and Network capable Targeting and Interception System. --- Controls a network of SAM sites. Use detection to switch on the AA site closest to the enemy. --- Leverage evasiveness from @{Functional.Sead#SEAD}. --- Leverage attack range setup added by DCS in 11/20. --- @usage --- Set up your SAM sites in the mission editor. Name the groups with common prefix like "Red SAM". --- Set up your EWR system in the mission editor. Name the groups with common prefix like "Red EWR". Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc. --- [optional] Set up your HQ. Can be any group, e.g. a command vehicle. --- --- Start up your MANTIS --- -myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR",nil,"red",false) - -myredmantis:Start() diff --git a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz b/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz deleted file mode 100644 index 91cc977..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/MTS-010 - Basic Mantis Demo.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-010 - Basic Mantis Demo/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua b/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua deleted file mode 100644 index cdf7f3e..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.lua +++ /dev/null @@ -1,23 +0,0 @@ -------------------------------------------------------------------------- --- MTS-100 - MANTIS - Autorelocate HQ and EWR -------------------------------------------------------------------------- --- Documentation --- --- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html --- --- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 16 Dec 20 --- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available --- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html -------------------------------------------------------------------------- --- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters. --- HQ and EWR will randomly relocate between 30 and 60 mins --- The SA 11 Radar will only relocate if not detected units are in range -------------------------------------------------------------------------- --- Date: 17 Dec 2020 -------------------------------------------------------------------------- - -myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",false) -myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS! -myredmantis:Debug(false) -myredmantis.verbose = true -myredmantis:Start() \ No newline at end of file diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz b/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz deleted file mode 100644 index 76270fc..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/MTS-100 - Autorelocate HQ and EWR.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-100 - Autorelocate HQ and EWR/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua b/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua deleted file mode 100644 index baf38d3..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.lua +++ /dev/null @@ -1,23 +0,0 @@ -------------------------------------------------------------------------- --- MTS-100 - MANTIS - Autorelocate HQ and EWR -------------------------------------------------------------------------- --- Documentation --- --- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html --- --- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 16 Dec 20 --- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available --- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html -------------------------------------------------------------------------- --- Observe a set of Blue SAM sites being attacked by Red SEAD and Helicopters --- HQ and EWR will randomly relocate between 30 and 60 mins --- The Radar will only relocate if not detected units are in range -------------------------------------------------------------------------- --- Date: 26 Dec 2020 -------------------------------------------------------------------------- - -myredmantis = MANTIS:New("mybluemantis","Blue SAM","Blue EWR","Blue HQ","blue",false) -myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS! -myredmantis:Debug(false) -myredmantis.verbose = true -myredmantis:Start() \ No newline at end of file diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz b/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz deleted file mode 100644 index 5e04bcc..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/MTS-100 - Blue Autorelocate HQ and EWR.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-100 - Blue Autorelocate HQ and EWR/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua b/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua deleted file mode 100644 index 89fcae1..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.lua +++ /dev/null @@ -1,38 +0,0 @@ -------------------------------------------------------------------------- --- MTS-110 - Mantis Link to A2A-Dispatcher -------------------------------------------------------------------------- --- Documentation --- --- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html --- --- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 16 Dec 20 --- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available --- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html -------------------------------------------------------------------------- --- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters. --- HQ and EWR will randomly relocate between 30 and 60 mins --- SU-27 GCICAP Flights will start from Pashkovsky to help the SAMs -------------------------------------------------------------------------- --- Date: 17 Dec 2020 -------------------------------------------------------------------------- - -myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",false) ---myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS! -myredmantis:Debug(false) ---myredmantis.verbose = false -myredmantis:Start() - --- link in AI_A2A_Dispatcher - -Red_GCI = AI_A2A_DISPATCHER:New(myredmantis.Detection) -- use existing detection object - -Red_GCI:SetTacticalDisplay(true) -Red_GCI:SetDefaultLandingAtRunway() -Red_GCI:SetDefaultTakeoffInAir() -Red_GCI:SetDisengageRadius(125000) -Red_GCI:SetDefaultOverhead(0.4) -Red_GCI:SetDefaultGrouping(2) -Red_GCI:SetGciRadius(125000) -Red_GCI:SetSquadron("Russian Tigers Sq1",AIRBASE.Caucasus.Krasnodar_Pashkovsky,"Red Interceptor",10) -Red_GCI:SetSquadronGci("Russian Tigers Sq1",900,1800) -Red_GCI:Start() -- never forget to use Start()!! diff --git a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz b/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz deleted file mode 100644 index 502d010..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/MTS-110 - Mantis Link to A2A-Dispatcher.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-110 - Mantis Link to A2A-Dispatcher/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua b/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua deleted file mode 100644 index af72dad..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.lua +++ /dev/null @@ -1,71 +0,0 @@ -------------------------------------------------------------------------- --- MTS-200 - MANTIS - Advanced Mode -------------------------------------------------------------------------- --- Documentation --- --- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html --- --- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 17 Dec 20 --- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available --- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html -------------------------------------------------------------------------- --- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters. --- HQ and EWR will be destroyed after 10 and 15 mins, respectively --- Detection will slow down accordingly, if both units are dead, all SAM sites go to RED state --- Set up of a new HQ and EWR will recover MANTIS -------------------------------------------------------------------------- --- Date: 21 Dec 2020 -------------------------------------------------------------------------- - -myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",true) ---myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS! -myredmantis:SetAdvancedMode(true, 100) -- switch on advanced mode - detection will slow down or die if HQ and EWR die -myredmantis:Debug(false) -myredmantis.verbose = true -- watch DCS.log -myredmantis:Start() - -function destroy(objectname) - local text = "Destroying "..objectname - m=MESSAGE:New(text,30,"Info"):ToAll() - local grp = GROUP:FindByName(objectname) - grp:Destroy() -end - -function createhq() - newhq = SPAWN - :New("Red HQ-1") - :InitDelayOff() - :OnSpawnGroup( - function (group) - myredmantis:SetCommandCenter(group) - end - ) - :Spawn() - local text = "Creating new HQ!" - m=MESSAGE:New(text,30,"Info"):ToAll() -end - -function createewr() - newewr = SPAWN - :New("Red EWR-1") - :InitDelayOff() - :Spawn() - local text = "Creating new EWR!" - m=MESSAGE:New(text,30,"Info"):ToAll() -end - -hqtimer = TIMER:New(destroy,"Red HQ") -ewrtimer = TIMER:New(destroy,"Red EWR") -awacstimer = TIMER:New(destroy,"Red EWR Awacs") - -nhqtimer = TIMER:New(createhq) -newrtimer = TIMER:New(createewr) - --- slow down -hqtimer:Start(300) -- 5 min -ewrtimer:Start(360) -- 6 min -awacstimer:Start(420) -- 7 min - ---speed up -nhqtimer:Start(600) -- 10 min -newrtimer:Start(660) -- 11 min diff --git a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz b/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz deleted file mode 100644 index 4b7fbd7..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/MTS-200 - MANTIS - Advanced Mode.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-200 - MANTIS - Advanced Mode/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua b/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua deleted file mode 100644 index 2398a52..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.lua +++ /dev/null @@ -1,90 +0,0 @@ -------------------------------------------------------------------------- --- MTS-210 - MANTIS - Advanced Mode plus AWACS -------------------------------------------------------------------------- --- Documentation --- --- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html --- --- Note: As of Dec/20, MANTIS is WIP. Needs a recent build of Moose.lua > 20 Dec 20 --- for CONTROLLABLE:RelocateGroundRandomInRadius() to be available --- https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/CONTROLLABLE.RelocateGroundRandomInRadius.html -------------------------------------------------------------------------- --- Observe a set of SAM sites being attacked by F18 SEAD, A10 and Helicopters. --- HQ, Awacs and EWR will be destroyed after 5, 6, 7 mins, respectively --- Detection will slow down accordingly, if both units are dead, all SAM sites go to RED state --- Set up of a new HQ and EWR will recover MANTIS from min 10 onwards -------------------------------------------------------------------------- --- Date: 27 Dec 2020 -------------------------------------------------------------------------- - -myredmantis = MANTIS:New("myredmantis","Red SAM","Red EWR","Red HQ","red",true,"Red Awacs") -myredmantis:SetAutoRelocate(true, true) -- make HQ and EWR relocatable, if they are actually mobile in DCS! -myredmantis:SetAdvancedMode(true, 100) -- switch on advanced mode - detection will slow down or die if HQ and EWR die -myredmantis:SetSAMRange(85) -myredmantis:SetSAMRadius(30000) -myredmantis:Debug(false) -myredmantis.verbose = true -- watch DCS.log -myredmantis:Start() - - -function destroy(objectname) - local text = "Destroying "..objectname - m=MESSAGE:New(text,30,"Info"):ToAll() - local grp = GROUP:FindByName(objectname) - grp:Destroy() -end - -function createhq() - newhq = SPAWN - :New("Red HQ-1") - :InitDelayOff() - :OnSpawnGroup( - function (group) - myredmantis:SetCommandCenter(group) - end - ) - :Spawn() - local text = "Creating new HQ!" - m=MESSAGE:New(text,30,"Info"):ToAll() -end - -function createewr() - newewr = SPAWN - :New("Red EWR-1") - :InitDelayOff() - :Spawn() - local text = "Creating new EWR!" - m=MESSAGE:New(text,30,"Info"):ToAll() -end - -function createawacs() - newewr = SPAWN - :New("Red Awacs 1") - :InitDelayOff() - :OnSpawnGroup( - function (grp) - local name = grp:GetName() - myredmantis:SetAwacs(name) - end - ) - :Spawn() - local text = "Creating new AWACS!" - m=MESSAGE:New(text,30,"Info"):ToAll() -end - -hqtimer = TIMER:New(destroy,"Red HQ") -ewrtimer = TIMER:New(destroy,"Red EWR") -awacstimer = TIMER:New(destroy,"Red Awacs") - -nhqtimer = TIMER:New(createhq) -newrtimer = TIMER:New(createewr) -newAtimer = TIMER:New(createawacs) --- slow down -hqtimer:Start(300) -- 5 min -ewrtimer:Start(360) -- 6 min -awacstimer:Start(420) -- 7 min - ---speed up -nhqtimer:Start(600) -- 10 min -newrtimer:Start(660) -- 11 min -newAtimer:Start(720) -- 12 min \ No newline at end of file diff --git a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz b/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz deleted file mode 100644 index 31f7007..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/MTS-210 - MANTIS - Advanced Mode plus AWACS.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-210 - MANTIS - Advanced Mode plus AWACS/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua b/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua deleted file mode 100644 index 7bc7a93..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.lua +++ /dev/null @@ -1,71 +0,0 @@ -------------------------------------------------------------------------- --- MTS-300 - MANTIS - Advanced Mode Complex Example -------------------------------------------------------------------------- --- Documentation --- --- MANTIS: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Mantis.html --- -------------------------------------------------------------------------- --- Observe a set of SAM sites being attacked by F18 SEAD and A10Cs. --- HQ will be destroyed after 10 mins. --- Watch the long an short range MANTIS in action, with the SA10 also using SHORAD for defense. -------------------------------------------------------------------------- --- Date: 14 July 2021 - --- Set up SHORAD -local redsamset = SET_GROUP:New():FilterCoalitions("red"):FilterPrefixes({"Red AAA","Red SA11","Red EWR"}):FilterStart() -local myredshorad = SHORAD:New("Gudata Shorad","Red Shorad",redsamset,12000,600,"red",false) -- Functional.Shorad#SHORAD -myredshorad:SetDefenseLimits(80,95) - --- Short/Mid-Range SAM sites -local myredmantis = MANTIS:New("Gudauta AAA","Red AAA","Red EWR",nil,"red",true,"Red AWACS",false) -myredmantis:SetSAMRadius(25000) -myredmantis:SetSAMRange(85) -myredmantis:SetDetectInterval(20) -myredmantis:Start() - --- Long-range SAM site, also linked to SHORAD -local myredsa10 = MANTIS:New("Gudauta SA10","Red SA11","Red EWR","Red HQ","red",true,"Red AWACS",false) -myredsa10:SetSAMRadius(UTILS.NMToMeters(40)) -myredsa10:SetSAMRange(90) -myredsa10:SetDetectInterval(20) -myredsa10:AddShorad(myredshorad,720) -myredsa10:SetAdvancedMode(true,90) -myredsa10:SetAutoRelocate(true,false) ---myredsa10:Debug(true) -myredsa10:Start() - --- Using some "OnAfter..." events to shape the mission -function myredsa10:OnAfterShoradActivated(From, Event, To, Name, Radius, Ontime) - -- show some info - local m = MESSAGE:New(string.format("Mantis switched on Shorad for %s | Radius %d | OnTime %d", Name, Radius, Ontime),10,"Info"):ToAll() -end - -function myredsa10:OnAfterAdvStateChange(From, Event, To, Oldstate, Newstate, Interval) - -- show some info - local state = { [1] = "GREEN", [2] = "AMBER", [3] = "RED" } - local oldstate = state[Oldstate+1] - local newstate = state[Newstate+1] - local m = MESSAGE:New(string.format("Mantis switched Advanced from from %s to %s interval %dsec", oldstate, newstate, Interval),10,"Info"):ToAll() -end - -function myredsa10:OnAfterRedState(From, Event, To, Group) - -- show some info - local SamName = Group:GetName() - local m = MESSAGE:New(string.format("Mantis switched %s to RED state!", SamName),10,"Info"):ToAll() -end - -function myredsa10:OnAfterGreenState(From, Event, To, Group) - -- show some info - local SamName = Group:GetName() - local m = MESSAGE:New(string.format("Mantis switched %s to GREEN state!", SamName),10,"Info"):ToAll() -end - --- Destroy HQ after 5 mins -function TerminateHQ() - local group = GROUP:FindByName("Red HQ") - group:Destroy() -end - -local desthqtimer = TIMER:New(TerminateHQ) -desthqtimer:Start(600) diff --git a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz b/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz deleted file mode 100644 index 4c6a33b..0000000 Binary files a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/MTS-300 - MANTIS - Advanced Mode Complex Example.miz and /dev/null differ diff --git a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/pack.ps1 b/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/unpack.ps1 b/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/MTS - Mantis/MTS-300 - MANTIS - Advanced Mode Complex Example/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua b/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua deleted file mode 100644 index 4bbcf78..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.lua +++ /dev/null @@ -1,19 +0,0 @@ - --- ATIS Batumi Airport on 143.00 MHz AM. -atisBatumi=ATIS:New(AIRBASE.Caucasus.Batumi, 143.00) -atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi") -atisBatumi:SetTowerFrequencies({260, 131}) -atisBatumi:Start() - --- ATIS Vaziani Airport on 144.00 MHz AM. -atisVaziani=ATIS:New(AIRBASE.Caucasus.Vaziani, 144.00) -atisVaziani:SetRadioRelayUnitName("Radio Relay Vaziani") -atisVaziani:SetTowerFrequencies({269, 140}) -atisVaziani:Start() - --- Only for debugging/info. -local airbases=AIRBASE.GetAllAirbases() -for _,_airbase in pairs(airbases) do - local airbase=_airbase --Wrapper.Airbase#AIRBASE - airbase:GetRunwayData(nil, true) -end diff --git a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz b/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz deleted file mode 100644 index 95f6695..0000000 Binary files a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/ATIS - 100 - Caucasus Batumi.miz and /dev/null differ diff --git a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/pack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/unpack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 100 - Caucasus Batumi/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua b/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua deleted file mode 100644 index 9f05411..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.lua +++ /dev/null @@ -1,30 +0,0 @@ --- ATIS Nellis AFB on 270.10 MHz AM. -atisNellis=ATIS:New(AIRBASE.Nevada.Nellis_AFB, 270.1) -atisNellis:SetRadioRelayUnitName("Radio Relay Nellis") -atisNellis:SetActiveRunway("21L") -atisNellis:SetTowerFrequencies({327.000, 132.550}) -atisNellis:SetTACAN(12) -atisNellis:AddILS(109.1, "21") -atisNellis:Start() - --- ATIS Creech AFB on 290.45 MHz -atisCreech=ATIS:New(AIRBASE.Nevada.Creech_AFB, 290.45) -atisCreech:SetRadioRelayUnitName("Radio Relay Creech") -atisCreech:SetTowerFrequencies({360.6, 118.3}) -atisCreech:AddILS(108.7, "08") -atisCreech:SetTACAN(87) -atisCreech:Start() - --- ATIS McCarran International on 132.4 MHz -atisMcCarran=ATIS:New(AIRBASE.Nevada.McCarran_International_Airport, 132.4) -atisMcCarran:SetRadioRelayUnitName("Radio Relay McCarran") -atisMcCarran:SetTowerFrequencies({257.8, 119.9}) -atisMcCarran:SetRunwayHeadingsMagnetic({"25L", "25R"}) -atisMcCarran:SetActiveRunway("R") -atisMcCarran:AddILS(110.3, "25R") -atisMcCarran:AddILS(111.75, "25L") -atisMcCarran:SetVOR(116.9) -atisMcCarran:SetTACAN(116) -atisMcCarran:SetElevation() -atisMcCarran:SetRunwayLength() -atisMcCarran:Start() diff --git a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz b/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz deleted file mode 100644 index 55164c9..0000000 Binary files a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/ATIS - 200 - Nevada Nellis.miz and /dev/null differ diff --git a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/pack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/unpack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 200 - Nevada Nellis/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua b/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua deleted file mode 100644 index 89824a2..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.lua +++ /dev/null @@ -1,26 +0,0 @@ - -atisDubai=ATIS:New(AIRBASE.PersianGulf.Dubai_Intl, 131.7) -atisDubai:SetRadioRelayUnitName("Radio Relay Dubai Intl") -atisDubai:SetMetricUnits() -atisDubai:SetActiveRunway("R") -atisDubai:SetTowerFrequencies({251.05, 118.75}) -atisDubai:AddILS(110.9, "30") -atisDubai:AddILS(110.1, "12") -atisDubai:Start() - -atisAbuDhabi=ATIS:New(AIRBASE.PersianGulf.Abu_Dhabi_International_Airport, 125.1) -atisAbuDhabi:SetRadioRelayUnitName("Radio Relay Abu Dhabi International Airport") -atisAbuDhabi:SetMetricUnits() -atisAbuDhabi:SetActiveRunway("L") -atisAbuDhabi:SetTowerFrequencies({250.5, 119.2}) -atisAbuDhabi:SetVOR(114.25) -atisAbuDhabi:Start() - --- For debug only! Mark Runway info on F10 map. ---atisAbuDhabi:MarkRunways(true) - --- Jiroft Airport. No radio relay unit ==> No subtitles. -atisJiroft=ATIS:New(AIRBASE.PersianGulf.Jiroft_Airport, 130) -atisJiroft:SetMetricUnits() -atisJiroft:SetTowerFrequencies({250.75, 136}) -atisJiroft:Start() \ No newline at end of file diff --git a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz b/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz deleted file mode 100644 index 033bb6c..0000000 Binary files a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/ATIS - 300 - Persian Gulf Dubai.miz and /dev/null differ diff --git a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/pack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/unpack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 300 - Persian Gulf Dubai/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua b/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua deleted file mode 100644 index 54b1a58..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.lua +++ /dev/null @@ -1,37 +0,0 @@ --- Beirut Rafic Hariri Airport -atisBeirut=ATIS:New(AIRBASE.Syria.Beirut_Rafic_Hariri, 130.0) -atisBeirut:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Beirut_Rafic_Hariri) -atisBeirut:SetTowerFrequencies({251.450, 118.900, 39.850, 4.475}) -atisBeirut:SetVOR(112.60) -atisBeirut:AddILS(109.5, "17") -atisBeirut:SetMapMarks() -atisBeirut:Start() - --- Damascus Airport -atisDamascus=ATIS:New(AIRBASE.Syria.Damascus, 131.0) -atisDamascus:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Damascus) -atisDamascus:SetTowerFrequencies({251.500, 118.500, 39.900, 4.500}) -atisDamascus:SetActiveRunway("R") -atisDamascus:SetVOR(116.00) -atisDamascus:AddILS(109.9, "23") -atisDamascus:SetMapMarks() -atisDamascus:Start() - --- Ramat David Airport -atisRamatDavid=ATIS:New(AIRBASE.Syria.Ramat_David, 132.0) -atisRamatDavid:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Ramat_David) -atisRamatDavid:SetTowerFrequencies({251.000, 118.600, 39.400, 4.250}) -atisRamatDavid:ReportQNHOnly() -- More realitic as only QNH not QFE is reported. -atisRamatDavid:ReportZuluTimeOnly() -- More realistic as -atisRamatDavid:SetMapMarks() -atisRamatDavid:Start() - --- Incirlik -atisIncirlik=ATIS:New(AIRBASE.Syria.Incirlik, 250.40) -atisIncirlik:SetRadioRelayUnitName("Radio Relay "..AIRBASE.Syria.Incirlik) -atisIncirlik:SetImperialUnits() -atisIncirlik:SetTACAN(21) -atisIncirlik:SetTowerFrequencies({250.350}) -atisIncirlik:AddILS(109.30, "5") -atisIncirlik:AddILS(111.70, "23") -atisIncirlik:Start() \ No newline at end of file diff --git a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz b/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz deleted file mode 100644 index 1b0af4e..0000000 Binary files a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/ATIS - 500 - Syria.miz and /dev/null differ diff --git a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/pack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/unpack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 500 - Syria/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua b/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua deleted file mode 100644 index a0a5ed3..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- SRS: --- SRS version 1.9.6.0+ required. See https://github.com/ciribob/DCS-SimpleRadioStandalone --- SRS is installed in the D:\DCS\_SRS directory. NOTE that backslashes need to be escaped and you have to adjust the directory for you personal install path. ---- - - --- Damascus Airport: Use male voice with en-US culture (accent) -atisDamascus=ATIS:New(AIRBASE.Syria.Damascus, 250.00) -atisDamascus:SetSRS("D:\\DCS\\_SRS", "male", "en-US") -atisDamascus:SetTowerFrequencies({251.500, 118.500, 39.900, 4.500}) -atisDamascus:SetActiveRunway("R") -atisDamascus:SetVOR(116.00) -atisDamascus:AddILS(109.9, "23") -atisDamascus:SetMapMarks() -atisDamascus:Start() - - --- Incirlik: Use specific voice named "Microsoft Hedda Desktop", which is a female German adult. Hope you don't mind the accent too much ;) -atisIncirlik=ATIS:New(AIRBASE.Syria.Incirlik, 251.50) -atisIncirlik:SetSRS("D:\\DCS\\_SRS", nil, nil, "Microsoft Hedda Desktop") -atisIncirlik:SetImperialUnits() -atisIncirlik:SetTACAN(21) -atisIncirlik:SetTowerFrequencies({250.350}) -atisIncirlik:AddILS(109.30, "5") -atisIncirlik:AddILS(111.70, "23") -atisIncirlik:Start() - - diff --git a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz b/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz deleted file mode 100644 index ae6c88d..0000000 Binary files a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/ATIS - 510 - Syria SRS.miz and /dev/null differ diff --git a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/pack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/unpack.ps1 b/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - ATIS/ATIS - 510 - Syria SRS/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua b/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua deleted file mode 100644 index ccca445..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.lua +++ /dev/null @@ -1,149 +0,0 @@ ----------------------------------------------------------------------------------------- ---- --- Name: BOS-100 - Stennis Hornet and Tomcat --- Author: funkyfranky --- Date Created: 17 August 2019 --- --- # Situation: --- --- Practice Case I/II/III recovery using the F/A-18C Hornet or F-14B Tomcat. --- --- See mission briefing for further details. --- --- *** IMPORTANT *** --- If you run the mission in single player, hit ESC twice before entering a slot! --- Otherwise the script will not load due to a long standing DCS bug. --- ----------------------------------------------------------------------------------------- - --- No MOOSE settings menu. Comment out this line if required. -_SETTINGS:SetPlayerMenuOff() - --- S-3B Recovery Tanker spawning in air. -local tanker=RECOVERYTANKER:New("USS Stennis", "Texaco Group") -tanker:SetTakeoffAir() -tanker:SetRadio(250) -tanker:SetModex(511) -tanker:SetTACAN(1, "TKR") -tanker:__Start(1) - --- E-2D AWACS spawning on Stennis. -local awacs=RECOVERYTANKER:New("USS Stennis", "E-2D Wizard Group") -awacs:SetAWACS() -awacs:SetRadio(260) -awacs:SetAltitude(20000) -awacs:SetCallsign(CALLSIGN.AWACS.Wizard) -awacs:SetRacetrackDistances(30, 15) -awacs:SetModex(611) -awacs:SetTACAN(2, "WIZ") -awacs:__Start(1) - --- Rescue Helo with home base Lake Erie. Has to be a global object! -rescuehelo=RESCUEHELO:New("USS Stennis", "Rescue Helo") -rescuehelo:SetHomeBase(AIRBASE:FindByName("Lake Erie")) -rescuehelo:SetModex(42) -rescuehelo:__Start(1) - --- Create AIRBOSS object. -local AirbossStennis=AIRBOSS:New("USS Stennis") - --- Add recovery windows: --- Case I from 9 to 10 am. -local window1=AirbossStennis:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25) --- Case II with +15 degrees holding offset from 15:00 for 60 min. -local window2=AirbossStennis:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 23) --- Case III with +30 degrees holding offset from 2100 to 2200. -local window3=AirbossStennis:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 21) - --- Set folder of airboss sound files within miz file. -AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/") - --- Single carrier menu optimization. -AirbossStennis:SetMenuSingleCarrier() - --- Skipper menu. -AirbossStennis:SetMenuRecovery(30, 20, false) - --- Remove landed AI planes from flight deck. -AirbossStennis:SetDespawnOnEngineShutdown() - --- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). -AirbossStennis:Load() - --- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. -AirbossStennis:SetAutoSave() - --- Enable trap sheet. -AirbossStennis:SetTrapSheet() - --- Start airboss class. -AirbossStennis:Start() - - ---- Function called when recovery tanker is started. -function tanker:OnAfterStart(From,Event,To) - - -- Set recovery tanker. - AirbossStennis:SetRecoveryTanker(tanker) - - -- Use tanker as radio relay unit for LSO transmissions. - AirbossStennis:SetRadioRelayLSO(self:GetUnitName()) - -end - ---- Function called when AWACS is started. -function awacs:OnAfterStart(From,Event,To) - -- Set AWACS. - AirbossStennis:SetAWACS(awacs) -end - - ---- Function called when rescue helo is started. -function rescuehelo:OnAfterStart(From,Event,To) - -- Use rescue helo as radio relay for Marshal. - AirbossStennis:SetRadioRelayMarshal(self:GetUnitName()) -end - ---- Function called when a player gets graded by the LSO. -function AirbossStennis:OnAfterLSOGrade(From, Event, To, playerData, grade) - local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData - local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade - - ---------------------------------------- - --- Interface your Discord bot here! --- - ---------------------------------------- - - local score=tonumber(Grade.points) - local name=tostring(PlayerData.name) - - -- Report LSO grade to dcs.log file. - env.info(string.format("Player %s scored %.1f", name, score)) -end - - ---------------------------- ---- Generate AI Traffic --- ---------------------------- - --- Spawn some AI flights as additional traffic. -local F181=SPAWN:New("FA-18C Group 1"):InitModex(111) -- Coming in from NW after ~ 6 min -local F182=SPAWN:New("FA-18C Group 2"):InitModex(112) -- Coming in from NW after ~20 min -local F183=SPAWN:New("FA-18C Group 3"):InitModex(113) -- Coming in from W after ~18 min -local F14=SPAWN:New("F-14B 2ship"):InitModex(211) -- Coming in from SW after ~ 4 min -local E2D=SPAWN:New("E-2D Group"):InitModex(311) -- Coming in from NE after ~10 min -local S3B=SPAWN:New("S-3B Group"):InitModex(411) -- Coming in from S after ~16 min - --- Spawn always 9 min before the recovery window opens. -local spawntimes={"8:51", "14:51", "20:51"} -for _,spawntime in pairs(spawntimes) do - local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime() - if _time>0 then - SCHEDULER:New(nil, F181.Spawn, {F181}, _time) - SCHEDULER:New(nil, F182.Spawn, {F182}, _time) - SCHEDULER:New(nil, F183.Spawn, {F183}, _time) - SCHEDULER:New(nil, F14.Spawn, {F14}, _time) - SCHEDULER:New(nil, E2D.Spawn, {E2D}, _time) - SCHEDULER:New(nil, S3B.Spawn, {S3B}, _time) - end -end - diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz b/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz deleted file mode 100644 index 159e5f4..0000000 Binary files a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/BOS-100 - Stennis Hornet and Tomcat.miz and /dev/null differ diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/pack.ps1 b/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/unpack.ps1 b/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-100 - Stennis Hornet and Tomcat/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua b/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua deleted file mode 100644 index b21d267..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.lua +++ /dev/null @@ -1,54 +0,0 @@ -------------------------------------------------------------------------- --- BOS-110 - Airboss launch tanker from ramp -------------------------------------------------------------------------- --- Documentation --- --- AIRBOSS: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.Airboss.html --- -------------------------------------------------------------------------- --- Simple Recovery tanker script demonstrating the use of the RECOVERYTANKER.uncontrolledac method. --- or RECOVERYTANKER:SetUseUncontrolledAircraft(). Both are shown below. --- You will require an AI skill S-3B tanker group placed in the mission editor, --- Set to "Takeoff from Ramp" and ensure "Uncontrolled" is ticked. --- Ensure "Late activation" is not ticked. --- --- 2 S-3B Tankers will be spawned on the USS Stennis as a visible objects (not late activation) but without crew. --- After 30 seconds, the first S-3B will spawn crew, start up go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). --- After 1 minute, the second S-3B will spawn crew, start up and go on station overhead at angels 12 with 300 knots TAS (~249 KIAS) --- Radio frequencies, callsign, Alt and Speed are set below and overrule the settings of the AI group. -------------------------------------------------------------------------- --- Date: 29 Dec 2020 --- Author: Azza276 -------------------------------------------------------------------------- - --- S-3B at USS Stennis spawning on deck, Start with Delay in Moose. -local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") - --- Custom settings for radio frequency, TACAN and callsign. -tankerStennis:SetRadio(261) -tankerStennis:SetTACAN(37, "SHL") -tankerStennis:SetCallsign(CALLSIGN.Tanker.Shell, 3) - ---RECOVERYTANKER.uncontrolledac if true, use an uncontrolled tanker group already present in the mission. -tankerStennis.uncontrolledac = true - --- Start recovery tanker. --- NOTE: Delay to show Aircraft visible on deck then starts later (30 seconds after mission start). -tankerStennis:__Start(30) - -------------------------------------------------------------------------------------------------- - --- S-3B at USS Stennis spawning on deck, Start with Delay in Mission Editor Trigger. Variable is a global. -tankerStennis2=RECOVERYTANKER:New( "USS Stennis", "Texaco Group-1") -tankerStennis2:SetRadio(271) -tankerStennis2:SetTACAN(38, "SHE") -tankerStennis2:SetCallsign(3, 2) --First parameter is Callsign name (1=Texaco, 2=Arco, 3=Shell) -tankerStennis2:SetAltitude(12000) --Sets Orbit Altitude -tankerStennis2:SetSpeed(300) --Sets speed to 300 knots TAS (~249 KIAS at 12000ft) - ---RECOVERYTANKER:SetUseUncontrolledAircraft() to use an uncontrolled tanker group already present in the mission. -tankerStennis2:SetUseUncontrolledAircraft() - ---- tankerStennis2:Start() --- The above without "--" is loaded to the Mission editor trigger "Do Script" action after 60 seconds condition. --- NOTE: Delay to show Aircraft visible on deck then starts later (60 seconds after mission start).. \ No newline at end of file diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz b/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz deleted file mode 100644 index ef77eaf..0000000 Binary files a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/BOS-110 - Airboss launch tanker from ramp.miz and /dev/null differ diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/pack.ps1 b/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/unpack.ps1 b/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-110 - Airboss launch tanker from ramp/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua b/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua deleted file mode 100644 index b8a1242..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.lua +++ /dev/null @@ -1,124 +0,0 @@ ----------------------------------------------------------------------------------------- ---- --- Name: BOS-200 - Tarawa Harrier --- Author: funkyfranky --- Date Created: 18 August 2019 --- --- # Situation: --- --- Practice Case I/II/III recovery using the AV-8B Harrier on the USS Tarawa. --- --- See mission briefing for further details. --- --- *** IMPORTANT *** --- If you run the mission in single player, hit ESC twice before entering a slot! --- Otherwise the script will not load due to a long standing DCS bug. --- ----------------------------------------------------------------------------------------- - --- No MOOSE settings menu. Comment out this line if required. -_SETTINGS:SetPlayerMenuOff() - --- Rescue Helo with home base USS Viksburg. Has to be a global object! -rescuehelo=RESCUEHELO:New("USS Tarawa", "Rescue Helo") -rescuehelo:SetHomeBase(AIRBASE:FindByName("USS Viksburg")) -rescuehelo:SetModex(42) - --- Create AIRBOSS object. -local AirbossTarawa=AIRBOSS:New("USS Tarawa") - --- Add recovery windows: --- Case I from 9:00 to 10:00 am. -local window1=AirbossTarawa:AddRecoveryWindow( "9:00", "10:00", 1, nil, true, 25) --- Case II with +15 degrees holding offset from 15:00 for 60 min. -local window2=AirbossTarawa:AddRecoveryWindow("15:00", "16:00", 2, 15, true, 20) --- Case III with +30 degrees holding offset from 2100 to 2200. -local window3=AirbossTarawa:AddRecoveryWindow("21:00", "22:00", 3, 30, true, 20) - --- Set TACAN. -AirbossTarawa:SetTACAN(73, "X", "LHA") - --- Not sure if Tarawa has ICLS? ---AirbossTarawa:SetICLSoff() - --- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). -AirbossTarawa:Load() - --- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. -AirbossTarawa:SetAutoSave() - --- Set radio relay units in order to properly send transmissions with subtitles only visible if correct frequency is tuned in. -AirbossTarawa:SetRadioRelayLSO("CH-53E Radio Relay") -AirbossTarawa:SetRadioRelayMarshal("SH-60B Radio Relay") - --- Radios. -AirbossTarawa:SetMarshalRadio(243) -AirbossTarawa:SetLSORadio(265) - ---Set folder of airboss sound files within miz file. -AirbossTarawa:SetSoundfilesFolder("Airboss Soundfiles/") - --- Remove landed AI planes from flight deck. -AirbossTarawa:SetDespawnOnEngineShutdown() - --- Single carrier menu optimization. -AirbossTarawa:SetMenuSingleCarrier() - --- Add Skipper menu to start recovery via F10 radio menu. -AirbossTarawa:SetMenuRecovery(30, 20, true) - --- Start Airboss. -AirbossTarawa:Start() - - ---- Function called when a recovery starts. -function AirbossTarawa:OnAfterRecoveryStart(From, Event, To, Case, Offset) - -- Start helo. - rescuehelo:Start() -end - ---- Function called when a recovery ends. -function AirbossTarawa:OnAfterRecoveryStop(From,Event,To) - -- Send helo RTB. - rescuehelo:RTB() -end - ---- Function called when the rescue helo has returned to base. -function rescuehelo:OnAfterReturned(From, Event, To, airbase) - -- Stop helo. - self:__Stop(3) -end - ---- Function called when a player gets graded by the LSO. -function AirbossTarawa:OnAfterLSOGrade(From, Event, To, playerData, grade) - local PlayerData=playerData --Ops.Airboss#AIRBOSS.PlayerData - local Grade=grade --Ops.Airboss#AIRBOSS.LSOgrade - - ---------------------------------------- - --- Interface your Discord bot here! --- - ---------------------------------------- - - local score=tonumber(Grade.points) - local name=tostring(PlayerData.name) - - -- Report LSO grade to dcs.log file. - env.info(self.lid..string.format("Player %s scored %.1f", name, score)) -end - - ---------------------------- ---- Generate AI Traffic --- ---------------------------- - -local AV8B1=SPAWN:New("Harrier Group 1"):InitModex(70) -local AV8B2=SPAWN:New("Harrier Group 2"):InitModex(80) - --- Spawn always 9 min before the recovery window opens. -local spawntimes={"9:06", "14:51", "20:51"} -for _,spawntime in pairs(spawntimes) do - local _time=UTILS.ClockToSeconds(spawntime)-timer.getAbsTime() - if _time>0 then - SCHEDULER:New(nil, AV8B1.Spawn, {AV8B1}, _time) - SCHEDULER:New(nil, AV8B2.Spawn, {AV8B2}, _time) - end -end diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz b/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz deleted file mode 100644 index 4042b94..0000000 Binary files a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/BOS-200 - Tarawa Harrier.miz and /dev/null differ diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/pack.ps1 b/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/unpack.ps1 b/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - Airboss/Caucasus/BOS-200 - Tarawa Harrier/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua b/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua deleted file mode 100644 index da3faac..0000000 --- a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg Stennig FA-18C.lua +++ /dev/null @@ -1,83 +0,0 @@ -------------------------- --- AIRBOSS Test Script -- -------------------------- - --- Set mission menu. -AIRBOSS.MenuF10Root=MENU_MISSION:New("Airboss").MenuPath - --- No MOOSE settings menu. -_SETTINGS:SetPlayerMenuOff() - --- S-3B Recovery Tanker spawning in air. -local tanker=RECOVERYTANKER:New("CVN-74", "- Texaco Tanker") -tanker:SetTakeoffAir() -tanker:SetRadio(256) -tanker:SetModex(511) -tanker:SetTACAN(1, "TKR") -tanker:Start() - --- E-2D AWACS spawning in air -local awacs=RECOVERYTANKER:New("CVN-74", "AWACS") -awacs:SetAWACS() -awacs:SetTakeoffAir() -awacs:SetRadio(264) -awacs:SetAltitude(20000) -awacs:SetCallsign(CALLSIGN.AWACS.Overloard) -awacs:SetRacetrackDistances(20, 8) -awacs:SetModex(611) -awacs:SetTACAN(2, "OLV") -awacs:Start() - --- Rescue Helo spawned in air with home base USS Perry. Has to be a global object! -rescuehelo=RESCUEHELO:New("CVN-74", "CV Helo") -rescuehelo:SetHomeBase(AIRBASE:FindByName("CG-67")) -rescuehelo:SetTakeoffAir() -rescuehelo:SetModex(42) -rescuehelo:Start() - --- Create AIRBOSS object. -local AirbossStennis=AIRBOSS:New("CVN-74") - --- Add recovery windows: -local window1=AirbossStennis:AddRecoveryWindow("18:30", "21:00", 1, nil, true, 20) - --- Radio freqs. -AirbossStennis:SetMarshalRadio(305) -AirbossStennis:SetLSORadio(265) - --- Radio relay units. -AirbossStennis:SetRadioRelayLSO(rescuehelo:GetUnitName()) -AirbossStennis:SetRadioRelayMarshal(tanker:GetUnitName()) - --- Set folder of airboss sound files within miz file. -AirbossStennis:SetSoundfilesFolder("Airboss Soundfiles/") - --- Single carrier menu optimization. -AirbossStennis:SetMenuSingleCarrier() - --- Enable skipper menu. -AirbossStennis:SetMenuRecovery(15, 30, true) - --- AI groups explicitly excluded from handling by the Airboss -AirbossStennis:SetHandleAIOFF() - --- Remove landed AI planes from flight deck. -AirbossStennis:SetDespawnOnEngineShutdown() - --- Load all saved player grades from your "Saved Games\DCS" folder (if lfs was desanitized). -AirbossStennis:Load() - --- Automatically save player results to your "Saved Games\DCS" folder each time a player get a final grade from the LSO. -AirbossStennis:SetAutoSave() - --- Enable trap sheet. -AirbossStennis:SetTrapSheet() - --- Set recovery tanker -AirbossStennis:SetRecoveryTanker(tanker) - --- Set AWACS. -AirbossStennis:SetAWACS(awacs) - --- Start airboss class. -AirbossStennis:Start() diff --git a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz b/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz deleted file mode 100644 index 17e6727..0000000 Binary files a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/BOS-200 - Fortress Cherbourg.miz and /dev/null differ diff --git a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/pack.ps1 b/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/unpack.ps1 b/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - Airboss/Normandy/BOS-200 - Fortress Cherbourg/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua deleted file mode 100644 index 1c57bd1..0000000 --- a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.lua +++ /dev/null @@ -1,16 +0,0 @@ ---- --- RECOVERYTANKER: Simple --- --- Simple Recovery tanker script using default settings. --- --- Tanker will be spawned on the USS Stennis and go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). --- --- Radio frequencies, callsign are taken from the settings of the late activated template group in the mission editor. ---- - --- S-3B at USS Stennis spawning on deck. First Parameter is the UNIT name of the Carrier, second the GROUP name of the tanker template. -local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") - --- Start recovery tanker. --- NOTE: If you spawn on deck, it seems prudent to delay the spawn a bit after the mission starts. -tankerStennis:__Start(1) diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz deleted file mode 100644 index 7a3c2cf..0000000 Binary files a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/RecoveryTanker - 010 - Simple.miz and /dev/null differ diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/pack.ps1 b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/unpack.ps1 b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 010 - Simple/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua deleted file mode 100644 index 7c1bcf6..0000000 --- a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.lua +++ /dev/null @@ -1,22 +0,0 @@ ---- --- RECOVERYTANKER: Custom --- --- Simple Recovery tanker script using some customized settings. --- --- Tanker will be spawned on the USS Stennis and go on station overhead at angels 6 with 274 knots TAS (~250 KIAS). --- --- Radio frequencies, callsign are set below and overrule the settings of the late activated template group. ---- - --- S-3B at USS Stennis spawning on deck. -local tankerStennis=RECOVERYTANKER:New("USS Stennis", "Texaco Group") - --- Custom settings for radio frequency, TACAN, callsign and modex. -tankerStennis:SetRadio(261) -tankerStennis:SetTACAN(37, "SHL") -tankerStennis:SetCallsign(CALLSIGN.Tanker.Arco, 3) -tankerStennis:SetModex(0) -- "Triple nuts" - --- Start recovery tanker. --- NOTE: If you spawn on deck, it seems prudent to delay the spawn a bit after the mission starts. -tankerStennis:__Start(1) diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz deleted file mode 100644 index be59480..0000000 Binary files a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/RecoveryTanker - 020 - Custom.miz and /dev/null differ diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/pack.ps1 b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/unpack.ps1 b/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/OPS - Recovery Tanker/RecoveryTanker - 020 - Custom/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua b/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua deleted file mode 100644 index cd25ae5..0000000 --- a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.lua +++ /dev/null @@ -1,80 +0,0 @@ --- This test mission models the behaviour of the AI_PATROL_ZONE class. --- --- It creates a 2 AI_PATROL_ZONE objects with the name Patrol1 and Patrol2. --- Patrol1 will govern a GROUP object to patrol the zone defined by PatrolZone1, within 3000 meters and 6000 meters, within a speed of 400 and 600 km/h. --- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 60 secondes, before returning to base. --- --- Patrol2 will goven a GROUP object to patrol the zone defined by PatrolZone2, within 600 meters and 1000 meters, within a speed of 300 and 400 km/h. --- When the GROUP object that is assigned to Patrol has fuel below 20%, the GROUP object will orbit for 0 secondes, before returning to base. --- --- The Patrol1 and Patrol2 object have 2 state transition functions defined, which customize the default behaviour of the RTB state. --- When Patrol1 goes RTB, it will create a new GROUP object, that will be assigned to Patrol2. --- When Patrol2 goes RTB, it will create a new GROUP object, that will be assgined to Patrol1. --- --- In this way, the Patrol1 and Patrol2 objects are fluctuating the patrol pattern from PatrolZone1 and PatrolZone2 :-) - - -PatrolZoneGroup1 = GROUP:FindByName( "Patrol Zone 1" ) -PatrolZone1 = ZONE_POLYGON:New( "Patrol Zone 1", PatrolZoneGroup1 ) - -PatrolZoneGroup2 = GROUP:FindByName( "Patrol Zone 2" ) -PatrolZone2 = ZONE_POLYGON:New( "Patrol Zone 2", PatrolZoneGroup2 ) - -PatrolSpawn = SPAWN:New( "Patrol Group" ) -PatrolGroup = PatrolSpawn:Spawn() - -Patrol1 = AI_PATROL_ZONE:New( PatrolZone1, 3000, 6000, 400, 600 ) -Patrol1:ManageFuel( 0.2, 60 ) -Patrol1:SetControllable( PatrolGroup ) -Patrol1:__Start( 5 ) - -Patrol2 = AI_PATROL_ZONE:New( PatrolZone2, 600, 1000, 300, 400 ) -Patrol2:ManageFuel( 0.2, 0 ) - ---- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- @param #AI_PATROL_ZONE self --- @param Wrapper.Group#GROUP AIGroup --- @return #boolean If false is returned, then the OnAfter state transition function will not be called. -function Patrol1:OnLeaveRTB( AIGroup ) - AIGroup:MessageToRed( "Returning to base", 20 ) -end - ---- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self --- @param Wrapper.Group#GROUP AIGroup -function Patrol1:OnAfterRTB( AIGroup ) - local NewGroup = PatrolSpawn:Spawn() - Patrol2:SetControllable( NewGroup ) - Patrol2:__Start( 1 ) -end - ---- State transition function for the PROCESS\_PATROLZONE **Patrol1** object --- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self --- @param Wrapper.Group#GROUP AIGroup -function Patrol1:OnEnterPatrol( AIGroup ) - AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone1:GetName() , 20 ) -end - ---- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- @param #AI_PATROL_ZONE self --- @param Wrapper.Group#GROUP AIGroup --- @return #boolean If false is returned, then the OnEnter state transition function will not be called. -function Patrol2:OnBeforeRTB( AIGroup ) - AIGroup:MessageToRed( "Returning to base", 20 ) -end - ---- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self --- @param Wrapper.Group#GROUP AIGroup -function Patrol2:OnEnterRTB( AIGroup ) - local NewGroup = PatrolSpawn:Spawn() - Patrol1:SetControllable( NewGroup ) - Patrol1:__Start( 1 ) -end - ---- State transition function for the PROCESS\_PATROLZONE **Patrol2** object --- @param Process_PatrolCore.Zone#AI_PATROL_ZONE self --- @param Wrapper.Group#GROUP AIGroup -function Patrol2:OnEnterPatrol( AIGroup ) - AIGroup:MessageToRed( "Patrolling in zone " .. PatrolZone2:GetName() , 20 ) -end diff --git a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz b/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz deleted file mode 100644 index a5d0516..0000000 Binary files a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/PAT-001 - Switching Patrol Zones.miz and /dev/null differ diff --git a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/pack.ps1 b/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/unpack.ps1 b/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/PAT - Patrolling/PAT-001 - Switching Patrol Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.lua b/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.lua deleted file mode 100644 index 296604a..0000000 --- a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.lua +++ /dev/null @@ -1,19 +0,0 @@ --- This test mission demonstrates the RADIO class, particularily when the transmiter is anything but a UNIT or a GROUP (a STATIC in this case) --- The Player is in a Su25T parked on Batumi, and a Russian command center named "Russian Command Center" is placed 12km east of Batumi. - --- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important. --- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (108AM here) - -CommandCenter = STATIC:FindByName("Russian Command Center") - --- Let's get a reference to the Command Center's RADIO -CommandCenterRadio = CommandCenter:GetRadio() - --- Now, we'll set up the next transmission -CommandCenterRadio:SetFileName("Noise.ogg") -- We first need the file name of a sound, -CommandCenterRadio:SetFrequency(108) -- then a frequency in MHz, -CommandCenterRadio:SetModulation(radio.modulation.AM) -- a modulation (we use DCS' enumartion, this way we don't have to type numbers)... -CommandCenterRadio:SetPower(100) -- and finally a power in Watts. A "normal" ground TACAN station has a power of 120W. - --- We have finished tinkering with our transmission, now is the time to broadcast it ! -CommandCenterRadio:Broadcast() \ No newline at end of file diff --git a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.miz b/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.miz deleted file mode 100644 index 7ba85ee..0000000 Binary files a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/RAD-000 - Transmission from Static.miz and /dev/null differ diff --git a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/pack.ps1 b/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/unpack.ps1 b/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAD - Radio/RAD-000 - Transmission from Static/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.lua b/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.lua deleted file mode 100644 index 53b86ec..0000000 --- a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.lua +++ /dev/null @@ -1,25 +0,0 @@ --- This test mission demonstrates the RADIO class, particularily when the transmiter is a UNIT or a GROUP --- The Player is in a Su25T parked on Batumi, and a Russian MiG-29 creatively named "Sergey" is placed above Kobuleti and is --- inbound for a landing on Batumi - --- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important. --- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (108AM here) - -Sergey = UNIT:FindByName("Sergey") - --- Let's get a reference to Sergey's RADIO -SergeyRadio = Sergey:GetRadio() - --- Now, we'll set up the next transmission -SergeyRadio:SetFileName("Noise.ogg") -- We first need the file name of a sound, -SergeyRadio:SetFrequency(108) -- then a frequency in MHz, -SergeyRadio:SetModulation(radio.modulation.AM) -- and a modulation (we use DCS' enumartion, this way we don't have to type numbers). - --- Since Sergey is a UNIT, we can add a subtitle (displayed on the top left) to the transmission, and loop the transmission -SergeyRadio:SetSubtitle("Hey, hear that noise ?", 5) -- The subtitle "Noise" will be displayed for 5 secs -SergeyRadio:SetLoop(false) - --- Notice that we didn't have to imput a power ? If the broadcater is a UNIT or a GROUP, DCS automatically guesses the power to use depending on the type of UNIT or GROUP - --- We have finished tinkering with our transmission, now is the time to broadcast it ! -SergeyRadio:Broadcast() \ No newline at end of file diff --git a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.miz b/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.miz deleted file mode 100644 index 9926af0..0000000 Binary files a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/RAD-001 - Transmission from UNIT or GROUP.miz and /dev/null differ diff --git a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/pack.ps1 b/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/unpack.ps1 b/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAD - Radio/RAD-001 - Transmission from UNIT or GROUP/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.lua b/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.lua deleted file mode 100644 index 0d7a473..0000000 --- a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.lua +++ /dev/null @@ -1,91 +0,0 @@ --- This test mission demonstrates the RADIO class in a practical scenario. --- It also focuses on how to create transmissions faster and more efficiently --- Please Read both RAD-000 and RAD-001, as well as SCH-000 code first. - --- Note that if you are not using an ASM aircraft (a clickable cockpit aircraft), then the frequency and the modulation is not important. --- If you want to test the mission fully, replance the SU25T by an ASM aircraft you own and tune to the right frequency (115AM here) - --- The Player is in a Su25T parked on Batumi, and a Russian command center named "Batumi Tower" placed near Batumi will act as Batumi's Radio Tower. --- This mission also features the "Viktor" flight, a Russian Su25, who is inbound for landing on Batumi. --- The goal of this script is to manage the dialog between Viktor and Batumi Tower. - --- The (short) conversation between Viktor and Batumi Tower will happen on 115 AM --- Time 0 : Batumi Tower "Viktor flight, this is Batumi Tower, enter left base runway one two five, report 5 kilometers final. Over." --- Time 10 : Viktor "Report 5 kilometers final, one two five, viktor" --- Time 145 : Viktor "Batumi Tower, Viktor is 5 kilomters final, request landing clearance. Over?" --- Time 154 : Batumi Tower "Viktor flight, you are claer to land, runway one two five. Check gear down." --- Time 160 : Viktor "Clear to land, One two five, Viktor" --- Time 210 : Viktor "Viktor, touchdown" --- Time 215 : Batumi Tower "Viktor, confirmed touchdown, taxi to parking area, Batumi Tower out." - - -BatumiRadio = STATIC:FindByName("Batumi Tower"):GetRadio() -ViktorRadio = UNIT:FindByName("Viktor"):GetRadio() - --- Let's first explore different shortcuts to setup a transmission before broadcastiong it ------------------------------------------------------------------------------------------------------------------------------------------------------- --- First, the long way. -BatumiRadio:SetFileName("Batumi Tower - Enter left base.ogg") -BatumiRadio:SetFrequency(115) -BatumiRadio:SetModulation(radio.modulation.AM) -BatumiRadio:SetPower(100) - --- Every RADIO.SetXXX() function returns the radio, so we can rewrite the code above this way : -BatumiRadio:SetFileName("Batumi Tower - Enter left base.ogg"):SetFrequency(115):SetModulation(radio.modulation.AM):SetPower(100) - --- We can also use the shortcut RADIO:NewGenericTransmission() to set multiple parameters in one function call --- If our broadcaster was a UNIT or a GROUP, the more appropriate shortcut to use would have been NewUnitTransmission() --- it works for both UNIT and GROUP, despite its name ! -BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115, radio.modulation.AM, 100) - --- If you already set some parameters previously, you don't have to redo it ! --- NewGenericTransmission's paramter have to be set in order -BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115) -- Modulation is still AM and power is still 100 (set previously) - ---If you want to change only the sound file, the frequency and the power for exemple, you can still use the appropriate Set function -BatumiRadio:NewGenericTransmission("Batumi Tower - Enter left base.ogg", 115):SetPower(100) - --- We have finished tinkering with our transmission, now is the time to broadcast it ! -BatumiRadio:Broadcast() - --- Now, if Viktor answered imedately, the two radio broadcasts would overlap. We need to delay Viktor's answer. ------------------------------------------------------------------------------------------------------------------------------------------------------- -CommunitcationScheduler = SCHEDULER:New( nil, - function() - ViktorRadio:SetFileName("Viktor - Enter left base ack.ogg"):SetFrequency(115):SetModulation(radio.modulation.AM):Broadcast() -- We don't specify a subtitle since we don't want one - end, {}, 10 -- 10s delay - ) - --- Viktor takes 145s to be 5km final, and need to contact Batumi Tower. ------------------------------------------------------------------------------------------------------------------------------------------------------- -CommunitcationScheduler:Schedule( nil, - function() - ViktorRadio:SetFileName("Viktor - Request landing clearance.ogg"):Broadcast() --We only specify the new file name, since frequency and modulation didn't change - end, {}, 145 - ) - --- Now that you understand everything about the RADIO class, the rest is pretty trivial -------------------------------------------------------------------------------------------------------------------------------------------------------- -CommunitcationScheduler:Schedule( nil, - function() - BatumiRadio:SetFileName("Batumi Tower - Clear to land.ogg"):Broadcast() - end, {}, 154 - ) - -CommunitcationScheduler:Schedule( nil, - function() - ViktorRadio:SetFileName("Viktor - Clear to land ack.ogg"):Broadcast() - end, {}, 160 - ) - -CommunitcationScheduler:Schedule( nil, - function() - ViktorRadio:SetFileName("Viktor - Touchdown.ogg"):Broadcast() - end, {}, 210 - ) - -CommunitcationScheduler:Schedule( nil, - function() - BatumiRadio:SetFileName("Batumi Tower - Taxi to parking.ogg"):Broadcast() - end, {}, 215 - ) \ No newline at end of file diff --git a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.miz b/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.miz deleted file mode 100644 index 5cd7958..0000000 Binary files a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/RAD-002 - Transmission Tips and Tricks.miz and /dev/null differ diff --git a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/pack.ps1 b/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/unpack.ps1 b/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAD - Radio/RAD-002 - Transmission Tips and Tricks/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.lua b/Moose_Missions/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.lua deleted file mode 100644 index f34f4c1..0000000 --- a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.lua +++ /dev/null @@ -1,22 +0,0 @@ --- This test mission demonstrates the BEACON class. --- The goal is to activate 2 types of beacons : 1 TACAN beacon attach to an aircraft, and 1 generic radio beacon attach to a ground UNIT - --- The player aircraft needs to be ASM and TACAN compatible. Please replace the M2000C by an aircraft you own and can receive TACAN signals - --- Activates the trace to see what BEACON does in the log ---BASE:TraceClass("BEACON") -BASE:TraceLevel(3) - --- Create our UNITs on which we'll attach a BEACON -local Aircraft = UNIT:FindByName("Unit1") -local LandUnit = UNIT:FindByName("Unit2") - --- Now, let's start with the TACAN Beacon. --- Note that they are limited to Y band. Notice also that this particular TACAN can be homed on. -local BeaconAircraft = Aircraft:GetBeacon() -BeaconAircraft:AATACAN(6, "UNIT1", true) - --- And let's setup the ground based radio beacon ! --- Notice how this beacon will stop in 20 sec (last parameter). -local BeaconLand = LandUnit:GetBeacon() -BeaconLand:RadioBeacon("Morse.ogg", 129, radio.modulation.AM, 100, 20) \ No newline at end of file diff --git a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.miz b/Moose_Missions/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.miz deleted file mode 100644 index 23f70b2..0000000 Binary files a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/RAD-010 - Beacons.miz and /dev/null differ diff --git a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/pack.ps1 b/Moose_Missions/RAD - Radio/RAD-010 - Beacons/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/unpack.ps1 b/Moose_Missions/RAD - Radio/RAD-010 - Beacons/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAD - Radio/RAD-010 - Beacons/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAD - Radio/RAD-100 - Speech/RAD-100 - Speech.lua b/Moose_Missions/RAD - Radio/RAD-100 - Speech/RAD-100 - Speech.lua deleted file mode 100644 index e4b50bf..0000000 --- a/Moose_Missions/RAD - Radio/RAD-100 - Speech/RAD-100 - Speech.lua +++ /dev/null @@ -1,19 +0,0 @@ --- This test mission demonstrates the BEACON class. --- The goal is to activate 2 types of beacons : 1 TACAN beacon attach to an aircraft, and 1 generic radio beacon attach to a ground UNIT - --- The player aircraft needs to be ASM and TACAN compatible. Please replace the M2000C by an aircraft you own and can receive TACAN signals - --- Activates the trace to see what BEACON does in the log ---BASE:TraceClass("BEACON") -BASE:TraceLevel(3) - --- Create our UNITs on which we'll attach a BEACON -local Aircraft = UNIT:FindByName("Unit1") -local LandUnit = UNIT:FindByName("Unit2") - -RadioSpeech = RADIOSPEECH:New( 124 ) -RadioSpeech:SetSenderUnitName( "Unit2" ) - -RadioSpeech:Start(2) - -RadioSpeech:ScheduleRepeat( 5, 30, 0, nil, RadioSpeech.Speak, "springfield11, patrolling" ) \ No newline at end of file diff --git a/Moose_Missions/RAD - Radio/RAD-100 - Speech/RAD-100 - Speech.miz b/Moose_Missions/RAD - Radio/RAD-100 - Speech/RAD-100 - Speech.miz deleted file mode 100644 index 9facc53..0000000 Binary files a/Moose_Missions/RAD - Radio/RAD-100 - Speech/RAD-100 - Speech.miz and /dev/null differ diff --git a/Moose_Missions/RAD - Radio/RAD-100 - Speech/pack.ps1 b/Moose_Missions/RAD - Radio/RAD-100 - Speech/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/RAD - Radio/RAD-100 - Speech/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAD - Radio/RAD-100 - Speech/unpack.ps1 b/Moose_Missions/RAD - Radio/RAD-100 - Speech/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/RAD - Radio/RAD-100 - Speech/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.lua deleted file mode 100644 index cdec703..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.lua +++ /dev/null @@ -1,18 +0,0 @@ --- Name: RAT-001 - Basic --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft at random airports on the map. --- --- # Test cases: --- --- 1. Observe five Yak-40 aircraft being spawned at random airports of the map and fly to random destination airports. --- After the aircraft arrive at their destination they get despawned and then respawned at a new random airport with new random destination. - --- Create RAT object. The only required parameter is the name of the template group in the mission editor. -local yak=RAT:New("RAT_Yak") - --- Spawn five aircraft. -yak:Spawn(5) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.miz deleted file mode 100644 index 3c785cc..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/RAT-001 - Basic.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-001 - Basic/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.lua deleted file mode 100644 index e692999..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Name: RAT-002 - Fixed Departure --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft of the same type at Gudauta and let them travel to random airports on the map. --- --- # Test cases: --- --- 1. Observe five Yak-40 aircraft being spawned at Gudauta. Destination airport for each aircraft is random. --- After the aircraft arrive at their destination they get despawned and then respawned again at Gudauta. But the next destination is random again. - --- Create RAT object. The only required parameter is the name of the template group in the mission editor. -local yak=RAT:New("RAT_Yak") - --- Set destination airport. -yak:SetDeparture("Gudauta") - --- Spawn five aircraft. -yak:Spawn(5) - diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.miz deleted file mode 100644 index 280188a..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/RAT-002 - Fixed Departure.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-002 - Fixed Departure/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.lua deleted file mode 100644 index 7664e1d..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Name: RAT-003 - Fixed Destination --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft of the same type at random airports and let them all travel to Sochi-Adler. --- --- # Test cases: --- --- 1. Observe five Yak-40 aircraft being spawned at random airports. They will all fly to Sochi-Adler. --- After the aircraft arrive at their destination they get despawned and then respawned at a random aiport with destination Sochi-Adler. - --- Create RAT object. The only required parameter is the name of the template group in the mission editor. -local yak=RAT:New("RAT_Yak") - --- Set destination airport. -yak:SetDestination("Sochi-Adler") - --- Spawn five aircraft. -yak:Spawn(5) - diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.miz deleted file mode 100644 index a0dbe0f..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/RAT-003 - Fixed Destination.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-003 - Fixed Destination/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.lua deleted file mode 100644 index 7a7e2bd..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Name: RAT-004 - Fixed Departure and Destination --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft of the same type at Guadauta or Batumi and make them fly to Gelendzhik or Beslan. --- --- # Test cases: --- --- 1. Observe five Yak-40 aircraft being spawned at Gudauta or Batumi. Their destination will be either Gelendzhik or Beslan. --- After the aircraft arrive at their destination they get despawned and then respawned again at one of the defined departure airports. --- Then they will travel to one of the defined destinations again. - --- Create RAT object. The only required parameter is the name of the template group in the mission editor. -local yak=RAT:New("RAT_Yak") - --- Set destination airports. If multiple destinations are specified, they have to be given as a table, i.e. in curly brackets {}. -yak:SetDeparture({"Gudauta", "Batumi"}) - --- Set destination airports. One of these is chosen randomly as destination. -yak:SetDestination({"Gelendzhik", "Beslan"}) - --- Spawn five aircraft. -yak:Spawn(5) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.miz deleted file mode 100644 index 2ee30fe..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/RAT-004 - Fixed Departure and Destination.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-004 - Fixed Departure and Destination/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Resticted Coalition.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Resticted Coalition.miz deleted file mode 100644 index a7e98ac..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Resticted Coalition.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Restricted Coalition.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Restricted Coalition.lua deleted file mode 100644 index 29d5bed..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/RAT-005 - Restricted Coalition.lua +++ /dev/null @@ -1,47 +0,0 @@ --- Name: RAT-005 - Restricted Coalition --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft of the same type at airports belonging to a certain coalition. --- In the mission editor, we have set Sochi-Adler, Gelendzhik, Batumi, Senaki-Kolkhi and Kutaisi to red. --- Likewise, Tbilisi-Lochini, Beslan, Nalchik, Mozdok and Mineralnye-Vody were set to blue. --- --- # Test cases: --- --- 1. Observe three Yak-40 aircraft being spawned at red airports only. The will also only get destination airports belonging to that coalition. --- 2. Observe three Yak-40 being spawned at blue airports only. The coalition of the aircraft is changed manually. - --- Create RAT object. Additionally, to the template group name we give the group an alias to be able to distinguish to another group created from this template. -local yak=RAT:New("RAT_Yak", "Yak Red") - --- This restricts the possible departure and destination airports the airports belonging to the red coalition. --- Here it is important that in the mission editor enough (>2) airports have been set to red! Otherwise there will be no possible departure and/or destination airports. -yak:SetCoalition("sameonly") - --- Explicitly exclude Senaki from possible departures and destinations. -yak:ExcludedAirports("Senaki-Kolkhi") - --- Spawn three aircraft. -yak:Spawn(3) - - - --- Create RAT object. Alias is "Yak Blue". If the same template is used multiple times, it is important to give each RAT object an indiviual name! -local yakblue=RAT:New("RAT_Yak", "Yak Blue") - --- Change coalition of Yak to blue. -yakblue:SetCoalitionAircraft("blue") - --- This restricts the possible departure and destination airports the airports belonging to the blue coalition since the coalition is changed manually. -yakblue:SetCoalition("sameonly") - --- We also change the livery of these groups. If a table of liveries is given, each spawned group gets a random livery. -yakblue:Livery({"Georgian Airlines"}) - --- Explicitly exclude Nalchik from possible departures and destinations. -yakblue:ExcludedAirports({"Nalchik", "Mozdok"}) - --- Spawn three aircraft. -yakblue:Spawn(3) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-005 - Resticted Coalition/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.lua deleted file mode 100644 index 087629c..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Name: RAT-006 - Continue Journey --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft of the same type at Gudauta. Each will get a random destination. --- Once the aircraft arrives at its destination, it will be respawned there and continue its journey to another random airport. --- Note that we do NOT have to set a departure airport. --- --- # Test cases: --- --- 1. Observe five Yak-40 aircraft being spawned at Gudauta. From there they will hop from airport to airport on the map. - --- Create RAT object. The only required parameter is the name of the template group in the mission editor. -local yak=RAT:New("RAT_Yak") - --- Set Gudauta as departure airport for all spawned aircraft. (Not required for ContinueJourney() to work.) -yak:SetDeparture("Gudauta") - --- This makes aircraft respawn at their destination airport instead of another random airport. -yak:ContinueJourney() - --- Spawn five aircraft. -yak:Spawn(5) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.miz deleted file mode 100644 index 297a583..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/RAT-006 - Continue Journey.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-006 - Continue Journey/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.lua deleted file mode 100644 index 51d2584..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.lua +++ /dev/null @@ -1,31 +0,0 @@ --- Name: RAT-007 - Commute --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft of the same type at Mozdok and let them fly to Mineralnye Vody. --- Once the aircraft arrives at its destination, it will be respawned there and fly back to Mozdok. --- Note that: --- We do NOT have to set a departure or destination airports. If we don't, the first departure and destination are random. --- Commute() also works for random destination and departure airports. But once they are chosen, aircraft will only commute between those. --- Also note that Commute() does NOT work with spawn in air since the departure airport is not defined then. --- --- # Test cases: --- --- 1. Observe two C-17A being spawned at Mozdok and fly back and forth between Mozdok and Mineralnye Vody until the end of time. - --- Create RAT object. The only required parameter is the name of the template group in the mission editor. -local c17=RAT:New("RAT_C17") - --- Set Gudauta as departure airport. -c17:SetDeparture("Mozdok") - --- Set Mineralnye Vody as destination. -c17:SetDestination("Mineralnye Vody") - --- This makes aircraft respawn at their destination airport and fly back to its departure. Hence, departure cannot be in air. -c17:Commute() - --- Spawn two aircraft. -c17:Spawn(2) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.miz deleted file mode 100644 index 02611dc..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/RAT-007 - Commute.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-007 - Commute/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.lua deleted file mode 100644 index e50b6f1..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.lua +++ /dev/null @@ -1,53 +0,0 @@ --- Name: RAT-008 - Spawn in Air --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft above airports or at zones pre-defined in the mission editor. --- Note that if takeoff is set to air: --- Airports are treated like zones with a certain radius. --- Spawn happens at a random point anywhere within the zone. --- --- --- # Test cases: --- --- 1. Obsever ten Yak-40 being spawned in air near random airports of the map. --- 2. Observe five C-17A being spawned within Zones "RAT Zone West", and "RAT Zone North". --- 3. Observe eight IL76 being spawned within RAT Zone North or somewhere near Anapa Vityazevo airport. - - --- Create RAT object from Yak-40 template. -local yak=RAT:New("RAT_YAK") - --- Set takeoff type to air. -yak:SetTakeoff("air") - --- Spawn ten Yak-40s. -yak:Spawn(10) - - --- Create RAT object from C-17A template. -local c17=RAT:New("RAT_C17") - --- Set takeoff type to air. -c17:SetTakeoff("air") - --- Set departure zones for C-17. -c17:SetDeparture({"RAT Zone West", "RAT Zone South"}) - --- Spawn five C-17s. -c17:Spawn(5) - - --- Create RAT object from IL76 template. -local il76=RAT:New("RAT_IL76") - --- Set takeoff type to air. -il76:SetTakeoff("air") - --- Set departure zones for C-17. You can mix zone names and airport names. -il76:SetDeparture({"RAT Zone North", "Anapa-Vityazevo"}) - --- Spawn eight C-17s. -il76:Spawn(8) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.miz deleted file mode 100644 index a6c8f9f..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/RAT-008 - Spawn in Air.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-008 - Spawn in Air/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.lua deleted file mode 100644 index ab5a020..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.lua +++ /dev/null @@ -1,46 +0,0 @@ --- Name: RAT-009 - Set Cruise Altitude --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn several aircraft randomly but make them fly at certain cruise altitudes. --- In the first example we specify the flight level, i.e. the altitude above sea level in hundreds of meters. --- There are also methods to set the cruise altitude in meters. These are used in the second example. --- --- Note that when setting a lower bound for the cruise altitude, this automatically adjusts the minimum distance to possible destinations, since the aircraft must have enough time to climb to that alt and descent again to the destination. --- --- # Test cases: --- --- 1. Obsever five Yak-40 being spawned at random airports. They will travel to a random destination but the cruising altitude will not be below 5,000 feet and not be above 20,000 feet. --- Most aircraft will travel at or near 10,000 ft. --- 2. Observe two C-17 being spawned at Tbilisi-Lochini. They will travel to a random destination but the cruise alt is set to be > 5 km. - - --- Create RAT object from Yak-40 template. -local yak=RAT:New("RAT_YAK") - --- Set the minimum flight level. No aircaft will travel below this altitude. -yak:SetFLmin(50) - --- Set maximum flight level to 20,000 ft ASL. No aircraft will be assigned a cruise flight level above this altitude. -yak:SetFLmax(200) - --- Set cruise flight level to 10,000 ft. The final choise is random between FLmin and FLmax, but morst aircraft will travel at his or near this altitude. -yak:SetFLcruise(100) - --- Spawn five Yak-40s. -yak:Spawn(5) - - --- Create RAT object from C-17A template. -local c17=RAT:New("RAT_C17") - --- Set departure zones for C-17. -c17:SetDeparture("Tbilisi-Lochini") - --- All aircraft will fly at least at a height of 5 km ASL. -c17:SetMinCruiseAltitude(5000) - --- Spawn two C-17s. -c17:Spawn(2) diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.miz deleted file mode 100644 index 26f4f3b..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/RAT-009 - Set Cruise Altitude.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-009 - Set Cruise Altitude/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.lua deleted file mode 100644 index 844caab..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.lua +++ /dev/null @@ -1,67 +0,0 @@ --- Name: RAT-010 - Helo FARP and Ship --- Author: funkyfranky --- Date Created: 23 Sep 2017 --- --- # Situation: --- --- Spawn helos at FARPS or ships. --- --- # Test cases: --- --- 1. Obsever five Yak-40 being spawned at random airports. They will travel to a random destination but the cruising altitude will not be below 5,000 feet and not be above 20,000 feet. - --- Create RAT object from Huey template. -local huey1=RAT:New("RAT_HUEY", "Huey Berlin") - --- Huey departing from FARP Berlin. -huey1:SetDeparture({"FARP Berlin"}) - --- Flying to Normandy. -huey1:SetDestination({"Normandy"}) - --- Take-off with engines on. -huey1:SetTakeoff("hot") - --- Huey will respawn at Normandy and fly back to FARP Berlin. -huey1:Commute() - --- Huey will be spawned. -huey1:Spawn() - - --- Create RAT object from Huey template. -local huey2=RAT:New("RAT_HUEY", "Huey London") - --- Huey departing from FARP London. -huey2:SetDeparture({"FARP London"}) - --- Flying to Normandy. -huey2:SetDestination({"Normandy"}) - --- Take-off with engines on. -huey2:SetTakeoff("hot") - --- Huey will respawn at Normandy and fly back to FARP London. -huey2:Commute() - --- Huey will be spawned. -huey2:Spawn() - - --- Create RAT object from Huey template. -local huey3=RAT:New("RAT_HUEY", "Huey Anapa") - --- Huey departing from FARP London. -huey3:SetDeparture({"FARP London", "FARP Berlin", "Anapa-Vityazevo"}) - --- Flying to Normandy. -huey3:SetDestination({"FARP London", "FARP Berlin", "Anapa-Vityazevo"}) - --- Take-off with engines on. -huey3:SetTakeoff("hot") - --- Huey will continue its journey. -huey3:ContinueJourney() - --- Huey will be spawned. -huey3:Spawn() \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.miz deleted file mode 100644 index 682643e..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/RAT-010 - Helo FARP and Ship.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-010 - Helo FARP and Ship/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.lua b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.lua deleted file mode 100644 index d6b1684..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.lua +++ /dev/null @@ -1,43 +0,0 @@ --- Name: RAT-011 - Carrier Ops --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- Spawn aircraft flying to and from aircraft carriers --- --- # Test cases: --- --- 1. Observe two SU-33 taking of from Novorossiysk and fly to the Kuznetsov. --- 2. Observe two F-14A taking of from the Carl Vinson flying into Batumi. - --- Create RAT object from Su-33 template. -local su33=RAT:New("RAT_SU33") - --- Huey departing from FARP Berlin. -su33:SetDeparture({"Novorossiysk"}) - --- Flying to Normandy. -su33:SetDestination({"Kuznetsov"}) - --- Take-off with engines on. -su33:SetTakeoff("hot") - --- Spawn two aircraft. -su33:Spawn(2) - - --- Create RAT object from Su-33 template. -local f14=RAT:New("RAT_F14") - --- Huey departing from FARP Berlin. -f14:SetDeparture({"Carl Vinson"}) - --- Flying to Normandy. -f14:SetDestination({"Batumi"}) - --- Take-off with engines on. -f14:SetTakeoff("hot") - --- Spawn two aircraft. -f14:Spawn(2) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.miz b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.miz deleted file mode 100644 index ab2f536..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/RAT-011 - Carrier Ops.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Caucasus/RAT-011 - Carrier Ops/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.lua b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.lua deleted file mode 100644 index 8f7bf39..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.lua +++ /dev/null @@ -1,68 +0,0 @@ --- Name: RAT-010 - Traffic at McCarran International --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- We want to generate some random air traffic at McCarran International Airport. --- --- # Test cases: --- --- 1. KC-135 aircraft are spawned at zones north and east heading to McCarran. --- 2. E-3A aircraft are spawned at McCarran with random destinations. --- 3. Yak-40 aircraft are spawned at random airports heading for McCarran. --- 3. TF-51D aircraft are spawned at Henderson, Boulder City or Echo Bay heading for McCarran. - --- Create RAT object from KC-135 template. -local kc135=RAT:New("RAT_KC135") - --- Set departure zones. We need takeoff "air" for that. -kc135:SetDeparture({"RAT Zone North", "RAT Zone East"}) - --- Set spawn in air. -kc135:SetTakeoff("air") - --- Aircraft will fly to McCarran -kc135:SetDestination("McCarran International Airport") - --- Spawn two aircraft. -kc135:Spawn(2) - - --- Create RAT object from E-3A template. -local e3=RAT:New("RAT_E3") - --- Aircraft are spawned at McCarran. Destinations are random. -e3:SetDeparture("McCarran International Airport") - --- Enable respawn after landing with a delay of six minutes. -e3:RespawnAfterLanding(360) - --- Spawn two aircraft. -e3:Spawn(2) - - --- Create RAT object from Yak-40 template. -local yak=RAT:New("RAT_YAK") - --- These are the airports a Yak-40 gets a parking slot. -yak:SetDeparture({"Tonopah Airport", "Tonopah Test Range Airfield", "Henderson Executive Airport", "Nellis AFB", "Groom Lake", "Laughlin Airport"}) - --- Destination McCarran. -yak:SetDestination("McCarran International Airport") - --- Spawn eight Yak-40. -yak:Spawn(8) - - --- Create RAT object from E-3A template. -local tf51=RAT:New("RAT_TF51") - --- Departure airport will be chosen from this list. -tf51:SetDeparture({"Henderson Executive Airport", "Boulder City Airport", "Echo Bay"}) - --- All will fly to McCarran. -tf51:SetDestination("McCarran International Airport") - --- Spawn four TF-51D -tf51:Spawn(4) diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.miz b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.miz deleted file mode 100644 index ca6d068..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/RAT-010 - Traffic at McCarran International.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-010 - Traffic at McCarran International/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.lua b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.lua deleted file mode 100644 index 67f5caa..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.lua +++ /dev/null @@ -1,96 +0,0 @@ --- Name: RAT-011 - Traffic at Nellis AFB --- Author: funkyfranky --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- We want to generate some random air traffic at Nellis AFB. --- --- # Test cases: --- --- 1. F-15C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech. --- 2. A-10C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech. --- 3. F/A-18C are spawned at Tonopah, Groom Lake or Creech and fly to Nellis. --- 4. KC-135 are spawned in air at two zones heading for Nellis. - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Create RAT object from F-15C template. -local f15=RAT:New("RAT_F15C") - --- Departure Nellis. -f15:SetDeparture("Nellis AFB") - --- Destination Tonopah, Groom Lake or Creech. -f15:SetDestination({"Tonopah Test Range Airfield", "Groom Lake AFB", "Creech AFB"}) - --- Spawn three flights. -f15:Spawn(3) - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - -local a10=RAT:New("RAT_A10C") - --- Departure Nellis. -a10:SetDeparture("Nellis AFB") - --- Destination Tonopa, Groom Lake or Creech. -a10:SetDestination({"Tonopah Test Range Airfield", "Groom Lake AFB", "Creech AFB"}) - --- Spawning will happen 60 seconds after mission start. -a10:SetSpawnDelay(60) - --- Spawn three flights. -a10:Spawn(3) - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Creat RAT object from F/A-18C template. -local f18=RAT:New("RAT_F18C") - --- Departure airports. -f18:SetDeparture({"Tonopah Test Range Airfield", "Groom Lake AFB", "Creech AFB"}) - --- Destination Nellis. -f18:SetDestination("Nellis AFB") - --- Spawn three flights. -f18:Spawn(3) - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Create RAT object from KC-135 template. -local kc135=RAT:New("RAT_KC135") - --- Set departure zones. We need takeoff "air" for that. -kc135:SetDeparture({"RAT Zone North", "RAT Zone East"}) - --- Set spawn in air. -kc135:SetTakeoff("air") - --- Aircraft will fly to McCarran -kc135:SetDestination("Nellis AFB") - --- Spawning of aircraft will happen in 2 minute intervalls. -kc135:SetSpawnInterval(120) - --- Spawn two aircraft. -kc135:Spawn(2) - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Store time at mission start -local T0=timer.getTime() - --- Send message with current misson time to all coalisions -local function print_mission_time() - local Tnow=timer.getTime() - local mission_time=Tnow-T0 - local mission_time_minutes=mission_time/60 - local mission_time_seconds=mission_time%60 - local text=string.format("Mission Time: %i:%02d", mission_time_minutes,mission_time_seconds) - MESSAGE:New(text, 5):ToAll() -end - --- Start scheduler to report mission time. -local Scheduler_Mission_Time = SCHEDULER:New(nil, print_mission_time, {}, 0, 10) \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.miz b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.miz deleted file mode 100644 index d57c7bd..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/RAT-011 - Traffic at Nellis AFB.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Nevada/RAT-011 - Traffic at Nellis AFB/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.lua b/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.lua deleted file mode 100644 index e2b905c..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.lua +++ /dev/null @@ -1,85 +0,0 @@ --- Name: RAT-020 - WWII Scenario --- Author: funkyfranky --- Date Created: 16 Sep 2017 --- --- # Situation: --- --- We want to generate some random air traffic of WWII units in 1944 Normandy. --- In the mission editor we have defined a couple of red and blue airfields. --- Germans are located to the east while the allies hold the western airfiels and those of southern England. --- Note that the default setting of the RAT aircraft is to hold their weapons and to ignore enemy threads. --- --- # Test cases: --- --- 1. Four two-ship flights of Bf-109 get random routes restricted to red airfields. --- 2. Two two-ship flights of FW-190 similar to the Bf-109s. --- 3. Three two-ship flights of TF-51 get random routes restricted to blue airfields. --- 4. Two two-ship flights of Spitfires are set up analogously to the TF-51 --- 5. One two-ship flight of Spitfires is explicitly ordered to fly back and forth across the channel. - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Create RAT object from Bf-109 template. -local bf109=RAT:New("RAT_Bf109") - --- Airports are restricted to red. -bf109:SetCoalition("sameonly") - --- Spawn four Bf-109. -bf109:Spawn(4) - --- Create RAT object from FW-190 template. -local fw190=RAT:New("RAT_Fw190") - --- Again, airports restricted to red. -fw190:SetCoalition("sameonly") - --- Spawn two FW-190. -fw190:Spawn(2) - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Create RAT object from TF-51 template. -local tf51=RAT:New("RAT_TF-51") - --- Allow only blue airports for departure and destination. -tf51:SetCoalition("sameonly") - --- We exclude ever airport across the channel. -tf51:ExcludedAirports({"Needs Oar Point", "Funtington", "Tangmere", "Ford", "Chailey"}) - --- Spawn three TF-51. -tf51:Spawn(3) - - --- Creat RAT object from Spitfire template. -local spit=RAT:New("RAT_Spit") - --- Blue airports only. -spit:SetCoalition("sameonly") - --- We exclude ever airport across the channel. -spit:ExcludedAirports({"Needs Oar Point", "Funtington", "Tangmere", "Ford", "Chailey"}) - --- Spawn two two-ship flights. -spit:Spawn(2) - --- Create RAT object from Spitfire template. --- NOTE that since we have already used this template, we need to give it another name. --- This is done by the second parameter, which is the alias name for RAT aircraft. --- In particular, this will be the name given in the F10 Menu. --- IMPORTANT: It is no problem to reuse the same template multiple times. But each template must get its own alias! -local spit_commute=RAT:New("RAT_Spit", "RAT_Spit_Commute") - --- These Spitfires get the order fly across the channel and to commute between Chailey and Le Molay. -spit_commute:SetDeparture("Chailey") -spit_commute:SetDestination("Le Molay") -spit_commute:Commute() - --- Set another livery for these aircraft. -spit_commute:Livery("RAF, No. 126 Squadron, Harrowbeer") - --- Spawn one two-ship flight. -spit_commute:Spawn() - --- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.miz b/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.miz deleted file mode 100644 index daf4d2e..0000000 Binary files a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/RAT-020 - WWII Scenario.miz and /dev/null differ diff --git a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/pack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/unpack.ps1 b/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/RAT - Random Air Traffic/Normandy/RAT-020 - WWII Scenario/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.lua b/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.lua deleted file mode 100644 index be50637..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- Simple function scheduling --- --- === --- --- Author: FlightControl --- Date Created: 12 Dec 2016 --- --- # Situation --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- # Test cases: --- --- 1. The log should contain a "Hello World" line that is fired off 10 seconds after mission start. --- --- --- # Status: TESTED - 12 Dec 2016 - -local TestScheduler = SCHEDULER:New( nil, - function() - BASE:E( "Hello World 1") - end, {}, 1 - ) - -SCHEDULER:New( nil, - function() - BASE:E( "Hello World 2") - end, {}, 2 - ) - -collectgarbage() - diff --git a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz b/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz deleted file mode 100644 index 90c6fbc..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/SCH-000 - Simple Scheduling.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-000 - Simple Scheduling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.lua b/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.lua deleted file mode 100644 index e759b70..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- Simple Object Scheduling --- --- === --- --- Author: FlightControl --- Date Created: 12 Dec 2016 --- --- # Situation --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- # Test cases: --- --- 1. Tracing of a scheduler in an Object. --- The log should contain a "Hello World" line of the object, that is fired off 1 seconds after mission start. --- --- # Status: TESTED - 12 Dec 2016 - -local TEST_BASE = { - ClassName = "TEST_BASE", - } - -function TEST_BASE:New( Message ) - self = BASE:Inherit( self, BASE:New() ) - - local TestScheduler = SCHEDULER:New( self, - function( Object, Message ) - Object:E( Message ) - end, { Message }, 1 - ) -end - -local Test = TEST_BASE:New( "Hello World" ) \ No newline at end of file diff --git a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz b/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz deleted file mode 100644 index 61e1d4f..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/SCH-001 - Simple Object Scheduling.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-001 - Simple Object Scheduling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.lua b/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.lua deleted file mode 100644 index 4e1c841..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.lua +++ /dev/null @@ -1,24 +0,0 @@ ---- Simple repeat scheduling of a function. --- --- === --- --- Author: FlightControl --- Date Created: 13 Dec 2016 --- --- # Situation --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- # Test cases: --- --- 1. The log should contain "Hello World Repeat" lines that is fired off 1 second after mission start and is repeated every 1 seconds. --- --- --- # Status: TESTED - 13 Dec 2016 - -local TestScheduler = SCHEDULER:New( nil, - function() - BASE:E( "Hello World Repeat") - end, {}, 1, 1 - ) \ No newline at end of file diff --git a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz b/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz deleted file mode 100644 index d8423fa..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/SCH-100 - Simple Repeat Scheduling.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-100 - Simple Repeat Scheduling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.lua b/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.lua deleted file mode 100644 index 67f7211..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.lua +++ /dev/null @@ -1,44 +0,0 @@ ---- Object Repeat Scheduling. --- --- === --- --- Author: FlightControl --- Date Created: 13 Dec 2016 --- --- # Situation --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- Three Test objects are created. --- --- # Test cases: --- --- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1". --- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute. --- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute. --- --- # Status: TESTED - 13 Dec 2016 - -local TEST_BASE = { - ClassName = "TEST_BASE", - } - -function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop ) - self = BASE:Inherit( self, BASE:New() ) - - self.TestScheduler = SCHEDULER:New( self, - function( Object, Message ) - Object:E( Message ) - end, { Message }, Start, Repeat, Randomize, Stop - ) - return self -end - -do -local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 ) -end - -local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 ) - -local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 ) diff --git a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz b/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz deleted file mode 100644 index 0fb76ba..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/SCH-110 - Object Repeat Scheduling.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-110 - Object Repeat Scheduling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.lua b/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.lua deleted file mode 100644 index 107ba46..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.lua +++ /dev/null @@ -1,41 +0,0 @@ ---- Simple repeat scheduling of a function. --- --- === --- --- Author: FlightControl --- Date Created: 14 Dec 2016 --- --- # Situation --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- Start a schedule called TestScheduler. TestScheduler will repeat the words "Hello World Repeat" every second in the log. --- After 10 seconds, TestScheduler will stop the scheduler. --- After 20 seconds, TestScheduler will restart the scheduler. --- --- # Test cases: --- --- 1. Check that the "Hello World Repeat" lines are consistent with the scheduling timing. They should stop showing after 10 seconds, and restart after 20 seconds. --- --- --- # Status: TESTED - 14 Dec 2016 - -local TestScheduler = SCHEDULER:New( nil, - function() - BASE:E( timer.getTime() .. " - Hello World Repeat") - end, {}, 1, 1 - ) - -SCHEDULER:New( nil, - function() - TestScheduler:Stop() - end, {}, 10 - ) - -SCHEDULER:New( nil, - function() - TestScheduler:Start() - end, {}, 20 - ) - \ No newline at end of file diff --git a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz b/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz deleted file mode 100644 index 4eea3e9..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/SCH-200 - Simple Repeat Scheduling Stop and Start.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-200 - Simple Repeat Scheduling Stop and Start/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.lua b/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.lua deleted file mode 100644 index f5e5dab..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.lua +++ /dev/null @@ -1,60 +0,0 @@ ---- No Object Scheduling because of garbage collect and Object nillification. --- --- === --- --- Author: FlightControl --- Date Created: 12 Dec 2016 --- --- # Situation --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- A Test object is created. --- It is nillified directly after the Schedule has been planned. --- There should be no schedule fired. --- The Test object should be garbage collected! --- --- THIS IS A VERY IMPORTANT TEST! --- --- # Test cases: --- --- 1. No schedule should be fired! The destructors of the Test object should be shown. --- 2. Commend the nillification of the Test object in the source, and test again. --- The schedule should now be fired and Hello World should be logged through the Test object. --- --- # Status: STARTED - 12 Dec 2016 - -local TEST_BASE = { - ClassName = "TEST_BASE", - } - -function TEST_BASE:New( Message ) - self = BASE:Inherit( self, BASE:New() ) - - self.TestScheduler = SCHEDULER:New( self, - function( Object, Message ) - Object:E( Message ) - end, { Message }, 1 - ) - return self -end - -do -local Test1 = TEST_BASE:New( "Hello World Test 1" ) -Test1 = nil -BASE:E( Test1 ) -end - -local Test2 = TEST_BASE:New( "Hello World Test 2" ) -BASE:E( Test2 ) - -local Test3 = TEST_BASE:New( "Hello World Test 3" ) -Test3 = nil -BASE:E( Test3 ) - -collectgarbage() - -BASE:E( "Collect Garbage executed." ) -BASE:E( "You should only see a Hello Worlld message for Test 2!" ) -BASE:E( "Check if Test 1 and Test 3 are garbage collected!" ) \ No newline at end of file diff --git a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz b/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz deleted file mode 100644 index 37a00c1..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/SCH-300 - GC Simple Object Scheduling.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-300 - GC Simple Object Scheduling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.lua b/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.lua deleted file mode 100644 index 54faeb6..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.lua +++ /dev/null @@ -1,80 +0,0 @@ ---- Object Repeat Scheduling. --- --- === --- --- Author: FlightControl --- Date Created: 13 Dec 2016 --- --- # Situation --- Three objects Test1, Test2, Test 3 are created with schedule a function. --- After 15 seconds, Test1 is nillified and Garbage Collect is done. --- After 30 seconds, Test2 is nillified and Garbage Collect is done. --- After 45 seconds, Test3 is nillified and Garbage Collect is done. --- Uses the Tracing functions from BASE within the DCS.log file. Check the DCS.log file for the results. --- Create a new SCHEDULER object. --- Check the DCS.log. --- --- --- Three Test objects are created. --- --- # Test cases: --- --- 1. Object Test1 should start after 1 seconds showing every second "Hello World Repeat 1". --- 2. Object Test2 should start after 2 seconds showing every 2 seconds "Hello World Repeat 2" and stop after one minute. --- 3. Object Test3 should start after 10 seconds showing with a 10 seconds randomized interval of 10 seconds "Hello World Repeat 3" and stop after one minute. --- 4. After 15 seconds, Test1 should stop working. No "Hello World Repeat 1" may be shown after 15 seconds. --- 5. After 30 seconds, Test2 should stop working. No "Hello World Repeat 2" may be shown after 30 seconds. --- 6. After 45 seconds, Test3 should stop working. No "Hello World Repeat 3" may be shown after 45 seconds. --- --- # Status: TESTED - 13 Dec 2016 - -local TEST_BASE = { - ClassName = "TEST_BASE", - } - -function TEST_BASE:New( Message, Start, Repeat, Randomize, Stop ) - self = BASE:Inherit( self, BASE:New() ) - - self.TestScheduler = SCHEDULER:New( self, - function( Object, Message ) - Object:E( Message ) - end, { Message }, Start, Repeat, Randomize, Stop - ) - return self -end - -do -local Test1 = TEST_BASE:New( "Hello World Repeat 1", 1, 1 ) - --- Nillify Test1 after 15 seconds and garbage collect. -local Nil1 = SCHEDULER:New( nil, - function() - BASE:E( "Nillify Test1 and Garbage Collect" ) - Test1 = nil - collectgarbage() - end, {}, 15 ) - -end - -local Test2 = TEST_BASE:New( "Hello World Repeat 2", 2, 2, 0, 60 ) - - -local Test3 = TEST_BASE:New( "Hello World Repeat 3", 10, 10, 1.0, 60 ) - --- Nillify Test2 after 30 seconds and garbage collect. -local Nil2 = SCHEDULER:New( nil, - function() - BASE:E( "Nillify Test2 and Garbage Collect" ) - Test2 = nil - collectgarbage() - end, {}, 30 ) - --- Nillify Test3 after 45 seconds and garbage collect. -local Nil3 = SCHEDULER:New( nil, - function() - BASE:E( "Nillify Test3 and Garbage Collect" ) - Test3 = nil - collectgarbage() - end, {}, 45 ) - -collectgarbage() diff --git a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz b/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz deleted file mode 100644 index 2c5e0ba..0000000 Binary files a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/SCH-310 - GC Object Repeat Scheduling.miz and /dev/null differ diff --git a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/pack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/unpack.ps1 b/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCH - Scheduler/SCH-310 - GC Object Repeat Scheduling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.lua b/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.lua deleted file mode 100644 index a64c35b..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.lua +++ /dev/null @@ -1,38 +0,0 @@ ---- --- Name: SCO-100 - Scoring Demo --- Author: FlightControl --- Date Created: 21 Feb 2017 --- --- # Situation: --- --- A shooting range has been setup. Fly the Ka-50 or the Su-25T to the statics and units located near the airport, and shoot them. --- --- # Test cases: --- --- 1. Observe the scoring granted to your flight when you hit and kill targets. - - -HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - -Scoring = SCORING:New( "Shooting Range 1" ) - -Scoring:SetScaleDestroyScore( 10 ) - -Scoring:SetScaleDestroyPenalty( 40 ) - -Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 ) - --- Test for zone scores. - --- This one is to test scoring on normal units. -ShootingRangeZone = ZONE:New( "ScoringZone1" ) -Scoring:AddZoneScore( ShootingRangeZone, 200 ) - --- This one is to test scoring on scenery. --- Note that you can only destroy scenery with heavy weapons. -SceneryZone = ZONE:New( "ScoringZone2" ) -Scoring:AddZoneScore( SceneryZone, 200 ) - -Scoring:AddStaticScore(STATIC:FindByName( "Shooting Range #010" ), 100 ) diff --git a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.miz b/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.miz deleted file mode 100644 index 28aca2a..0000000 Binary files a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/SCO-100 - Scoring Demo.miz and /dev/null differ diff --git a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/pack.ps1 b/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/unpack.ps1 b/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-100 - Scoring Demo/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.lua b/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.lua deleted file mode 100644 index 176e709..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.lua +++ /dev/null @@ -1,21 +0,0 @@ ---- --- Name: SCO-101 - Scoring Client to Client --- Author: FlightControl --- Date Created: 24 Feb 2017 --- --- # Situation: --- --- A shooting range has been setup to test client to client scoring. --- --- # Test cases: --- --- 1. Observe the scoring granted to your flight when you hit and kill other clients. - - -HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -Scoring = SCORING:New( "Detect Demo" ) - - diff --git a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz b/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz deleted file mode 100644 index c19221f..0000000 Binary files a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/SCO-101 - Scoring Client to Client.miz and /dev/null differ diff --git a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/pack.ps1 b/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/unpack.ps1 b/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-101 - Scoring Client to Client/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.lua b/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.lua deleted file mode 100644 index 0161bdd..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.lua +++ /dev/null @@ -1,41 +0,0 @@ ---- --- Name: SCO-200 - Telemetry --- Author: FlightControl --- Date Created: 24 Sep 2017 --- --- # Situation: --- --- A shooting range has been setup. Fly the Ka-50 or the Su-25T to the statics and objects located near the airport, and shoot them. --- --- # Test cases: --- --- 1. Observe the scoring granted to your flight when you hit and kill targets. --- 2. Check the scoring telemetry communicated to the website. - - -HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - -Scoring = SCORING:New( "Shooting Range 1" ) - -Scoring:SetTelemetryServer( "96.49.78.227", 5010 ) - -Scoring:SetScaleDestroyScore( 10 ) - -Scoring:SetScaleDestroyPenalty( 40 ) - -Scoring:AddUnitScore( UNIT:FindByName( "Unit #001" ), 200 ) - --- Test for zone scores. - --- This one is to test scoring on normal units. -ShootingRangeZone = ZONE:New( "ScoringZone1" ) -Scoring:AddZoneScore( ShootingRangeZone, 200 ) - --- This one is to test scoring on scenery. --- Note that you can only destroy scenery with heavy weapons. -SceneryZone = ZONE:New( "ScoringZone2" ) -Scoring:AddZoneScore( SceneryZone, 200 ) - -Scoring:AddStaticScore(STATIC:FindByName( "Shooting Range #010" ), 100 ) diff --git a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.miz b/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.miz deleted file mode 100644 index 27b2a51..0000000 Binary files a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/SCO-200 - Telemetry.miz and /dev/null differ diff --git a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/pack.ps1 b/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/unpack.ps1 b/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-200 - Telemetry/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua b/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua deleted file mode 100644 index 1277353..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.lua +++ /dev/null @@ -1,139 +0,0 @@ ---- --- Name: SCO-500 - Scoring Multi Player Demo Mission 1 --- Author: Pikey and FlightControl --- Date Created: 1 Mar 2017 --- --- # Situation: --- --- A demo mission for the scoring. Read the briefing and have fun. --- --- # Test cases: --- --- 1. Observe the scoring granted to your flight when you hit and kill targets. - --- Define the patrol zones -BlueCapZone = ZONE_POLYGON:New( "BlueCapZone", GROUP:FindByName( "Blue CAP Zone Patrol" ) ) -RedCapZone = ZONE_POLYGON:New( "RedCapZone", GROUP:FindByName( "Red CAP Zone Patrol" ) ) - --- Define the engage zones -BlueEngageZone = ZONE_POLYGON:New( "BlueEngageZone", GROUP:FindByName( "Blue CAP Zone Engage" ) ) -RedEngageZone = ZONE_POLYGON:New( "RedEngageZone", GROUP:FindByName( "Red CAP Zone Engage" ) ) - --- Define the Spawn zones for ground vehicles -BlueSpawnGroundZone = ZONE_POLYGON:New( "BlueSpawnGroundZone", GROUP:FindByName( "Blue Spawn Zone" ) ) ---RedSpawnGroundZone = ZONE_POLYGON:New( "RedSpawnGroundZone", GROUP:FindByName( "Red Spawn Zone" ) ) - -RedSpawnGroundZone = ZONE:New( "Red Spawn Zone" ) - --- Define the Scoring zones that define the shelters -BlueShelterZone = ZONE_POLYGON:New( "Blue Shelters", GROUP:FindByName( "Blue Shelters" ) ) -RedShelterZone = ZONE_POLYGON:New( "Red Shelters", GROUP:FindByName( "Red Shelters" ) ) - --- Define the Set of Clients that are used for the AI Balancers -BluePlanesClientSet = SET_CLIENT:New():FilterCoalitions( "blue" ):FilterCategories( "plane" ):FilterPrefixes( "Blue Player") -RedPlanesClientSet = SET_CLIENT:New():FilterCoalitions( "red" ):FilterCategories( "plane" ):FilterPrefixes( "Red Player") - --- Define the Spawn objects for the AI planes -BluePlanesSpawn = SPAWN:New( "BlueAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 ) -RedPlanesSpawn = SPAWN:New( "RedAICAP" ):InitCleanUp( 120 ):InitLimit( 5, 0 ) - --- Define the AI Balancers for the planes -BlueAIB = AI_BALANCER:New( BluePlanesClientSet, BluePlanesSpawn ):InitSpawnInterval( 60, 1200 ) -RedAIB = AI_BALANCER:New( RedPlanesClientSet, RedPlanesSpawn ):InitSpawnInterval( 60, 1200 ) - --- Define the Spawn objects for the airbase defenses -BlueAirbaseDefense1Spawn = SPAWN:New( "Blue Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 ) -BlueAirbaseDefense2Spawn = SPAWN:New( "Blue Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 ) -RedAirbaseDefense1Spawn = SPAWN:New( "Red Airbase Defense 1" ):InitLimit( 10, 10 ):SpawnScheduled( 60, 0 ) -RedAirbaseDefense2Spawn = SPAWN:New( "Red Airbase Defense 2" ):InitLimit( 2, 10 ):SpawnScheduled( 60, 0 ) - --- Define the ground forces spawning engines... - --- First define the template arrays. -BlueGroundTemplates = { "Blue Ground Forces 1", "Blue Ground Forces 2", "Blue Ground Forces 3" } -RedGroundTemplates = { "Red Ground Forces 2", "Red Ground Forces 2", "Red Ground Forces 3" } - --- New we are using these templates to define the spawn objects for the ground forces. --- We spawn them at random places into the define zone. -BlueGroundSpawn = SPAWN - :New( "Blue Ground Forces" ) - :InitLimit( 12, 30 ) - :InitRandomizeZones( { BlueSpawnGroundZone } ) - :InitRandomizeTemplate( BlueGroundTemplates ) - :SpawnScheduled( 60, 0.2 ) - -RedGroundSpawn = SPAWN - :New( "Red Ground Forces" ) - :InitLimit( 12, 30 ) - :InitRandomizeTemplate( RedGroundTemplates ) - :InitRandomizeZones( { RedSpawnGroundZone } ) - :SpawnScheduled( 60, 0.2 ) - - - -BlueCap = {} -RedCap = {} - --- Define the OnAfterSpawned events of the AI balancer Spawn Groups -function BlueAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - if AIGroup then - BlueCap[AIGroup] = BlueCap[AIGroup] or AI_CAP_ZONE:New( BlueCapZone, 500, 3000, 450, 1200 ) - local Cap = BlueCap[AIGroup] -- AI.AI_CAP#AI_CAP_ZONE - - Cap:ManageFuel( 0.4, 180 ) - Cap:SetEngageZone( BlueEngageZone ) - Cap:SetControllable( AIGroup ) - Cap:Start() - end -end - -function RedAIB:OnAfterSpawned( SetGroup, From, Event, To, AIGroup ) - - if AIGroup then - RedCap[AIGroup] = RedCap[AIGroup] or AI_CAP_ZONE:New( RedCapZone, 500, 3000, 450, 1200 ) - local Cap = RedCap[AIGroup] -- AI.AI_CAP#AI_CAP_ZONE - - Cap:ManageFuel( 0.4, 180 ) - Cap:SetEngageZone( BlueEngageZone ) - Cap:SetControllable( AIGroup ) - Cap:Start() - end -end - - - - --- Okay, now that we defined all this stuff, now make the SCORING setup ... - --- First define a Scoring object -local Scoring = SCORING:New( "SCO-500 - Scoring Demonstration Mission" ) - --- Define within the scoring the shelter designated targets. -Scoring:AddZoneScore( BlueShelterZone, 50 ) -- Per shelter destroyed, 50 extra points are granted. -Scoring:AddZoneScore( RedShelterZone, 50 ) -- Per shelter destroyed, 50 extra points are granted. - --- Define the static objects that give extra scores -Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 1"), 100 ) -Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 2"), 100 ) -Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 3"), 100 ) -Scoring:AddStaticScore( STATIC:FindByName( "Red Factory 4"), 100 ) - -Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #001"), 80 ) -Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #002"), 80 ) -Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #003"), 80 ) -Scoring:AddStaticScore( STATIC:FindByName( "Red Truck #004"), 80 ) - -Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 1" ), 100 ) -Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 2" ), 100 ) -Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 3" ), 100 ) -Scoring:AddStaticScore( STATIC:FindByName( "Blue Factory 4" ), 100 ) - -Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #001" ), 80 ) -Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #002" ), 80 ) -Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #003" ), 80 ) -Scoring:AddStaticScore( STATIC:FindByName( "Blue Truck #004" ), 80 ) - --- Scale the scoring rewarded. -Scoring:SetScaleDestroyScore( 30 ) -Scoring:SetScaleDestroyPenalty( 90 ) -- Penalties are punished more than normal destroys. - diff --git a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz b/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz deleted file mode 100644 index 321599a..0000000 Binary files a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/SCO-500 - Scoring Multi Player Demo Mission 1.miz and /dev/null differ diff --git a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/pack.ps1 b/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/unpack.ps1 b/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SCO - Scoring/SCO-500 - Scoring Multi Player Demo Mission 1/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.lua b/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.lua deleted file mode 100644 index e53f6d9..0000000 --- a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.lua +++ /dev/null @@ -1,16 +0,0 @@ - -BlueAirbaseSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterStart() - -RedAirbaseSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterStart() - -RedAirbaseHelipadSet = SET_AIRBASE:New():FilterCoalitions("red"):FilterCategories("helipad"):FilterStart() - -BlueAirbaseShipSet = SET_AIRBASE:New():FilterCoalitions("blue"):FilterCategories("ship"):FilterStart() - -BlueAirbaseSet:Flush() - -RedAirbaseSet:Flush() - -RedAirbaseHelipadSet:Flush() - -BlueAirbaseShipSet:Flush() \ No newline at end of file diff --git a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz b/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz deleted file mode 100644 index 8f92aac..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/SET-001 - Airbase Sets.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-001 - Airbase Sets/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.lua b/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.lua deleted file mode 100644 index 98700a4..0000000 --- a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: SET-102 - Test SET_GROUP object against ZONE --- Author: FlightControl --- Date Created: 31 Mar 2017 --- --- # Situation: --- --- A ZONE has been defined, and the SET_GROUP object is checked against the zone. --- --- # Test cases: --- --- 1. Observe the zone perimeter, and place the SET_GROUP object in or out of the zone. --- 2. Observe the results of the functions. - - -SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart() - -Zone = ZONE:New( "Zone" ) - -SetGroupObject:ForEachGroupCompletelyInZone( Zone, - function( GroupObject ) - GroupObject:E( { GroupObject:GetName(), "I am completely in Zone" } ) - end ) - -SetGroupObject:ForEachGroupPartlyInZone( Zone, - function( GroupObject ) - GroupObject:E( { GroupObject:GetName(), "I am partially in Zone" } ) - end ) - -SetGroupObject:ForEachGroupNotInZone( Zone, - function( GroupObject ) - GroupObject:E( { GroupObject:GetName(), "I am not in Zone" } ) - end ) - diff --git a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.miz b/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.miz deleted file mode 100644 index 71fb102..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/SET-102 - Test SET_GROUP object against ZONE.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-102 - Test SET_GROUP object against ZONE/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.lua b/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.lua deleted file mode 100644 index 985aee4..0000000 --- a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- --- Name: SET-103 - Test SET_GROUP players added and deleted --- Author: FlightControl --- Date Created: 31 Mar 2017 --- --- # Situation: --- --- Multiple groups of ground vehicles have been defined. --- There are collected in a SET_GROUP. --- A human player is jumping into the seat on one of these vehicles of the SET_GROUP. --- --- # Test cases: --- --- 1. Observe the player added and deleted from the SET_GROUP depending on the behaviour. - - -SetGroupObject = SET_GROUP:New():FilterCoalitions("blue"):FilterPrefixes("Group Object"):FilterStart() diff --git a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.miz b/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.miz deleted file mode 100644 index ae60709..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/SET-103 - Test SET_GROUP players added and deleted.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-103 - Test SET_GROUP players added and deleted/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.lua b/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.lua deleted file mode 100644 index af79af8..0000000 --- a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.lua +++ /dev/null @@ -1,3 +0,0 @@ - -SetClient = SET_CLIENT:New():FilterCoalitions("blue"):FilterCategories("plane"):FilterCountries("USA"):FilterStart() - diff --git a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz b/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz deleted file mode 100644 index 69ba6f8..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/SET-201 - Client Sets.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-201 - Client Sets/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/SET-GRP-000 - Add and Remove.lua b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/SET-GRP-000 - Add and Remove.lua deleted file mode 100644 index 94a84ee..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/SET-GRP-000 - Add and Remove.lua +++ /dev/null @@ -1,31 +0,0 @@ --- Create a group set. -SetVehicles = SET_GROUP:New() - --- Add groups by name to the set. -SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } ) - --- For each unit in the set, smoke the unit green. So, for each unit in the 3 groups within the set, the smoke will be triggered. -SetVehicles:ForEachGroup( - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeGreen() - end - end -) - - --- Now we remove Vehicle A. -SetVehicles:RemoveGroupsByName( { "Vehicle A" } ) - --- So Vehicle A should not be smoking now in a red color. -SetVehicles:ForEachGroup( - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeRed() - end - end -) diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/SET-GRP-000 - Add and Remove.miz b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/SET-GRP-000 - Add and Remove.miz deleted file mode 100644 index 4608b6a..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/SET-GRP-000 - Add and Remove.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-000 - Add and Remove/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-101 - Group Sets.lua b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-101 - Group Sets.lua deleted file mode 100644 index d15682c..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-101 - Group Sets.lua +++ /dev/null @@ -1,159 +0,0 @@ -SetVehicles = SET_GROUP:New() - -SetVehicles:AddGroupsByName( { "Vehicle A", "Vehicle B", "Vehicle C" } ) - -SetVehicles:ForEachGroup( - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeGreen() - end - end -) - - - -SetBluePlanesGroup = SET_GROUP:New() - :FilterCoalitions( "blue" ) - :FilterCategories( "plane" ) - :FilterStart() - -SetNorthKoreaGroup = SET_GROUP:New() - :FilterCountries( "RUSSIA" ) - :FilterStart() - -SetSAMGroup = SET_GROUP:New() - :FilterPrefixes( "SAM" ) - :FilterStart() - :SetIteratorIntervals( 5, 10 ) - -SetGroundGroup = SET_GROUP:New() - :FilterCategories( "ground" ) - :FilterStart() - -SetGroundGroup:Flush() - -SpawnUS_Plane = SPAWN:New( 'Spawn Test USA Plane') -GroupUS_Plane = SpawnUS_Plane:Spawn() - -SpawnUS_Vehicle = SPAWN:New( 'Spawn Test USA Vehicle') -GroupUS_Vehicle = SpawnUS_Vehicle:Spawn() - -SpawnUS_Ship = SPAWN:New( 'Spawn Test USA Ship') -GroupUS_Ship = SpawnUS_Ship:Spawn() - -SpawnRU_Vehicle = SPAWN:New( 'Spawn Test RUSSIA Vehicle') -GroupRU_Vehicle = SpawnRU_Vehicle:Spawn() - -SpawnRU_Ship = SPAWN:New( 'Spawn Test RUSSIA Ship') -GroupRU_Ship = SpawnRU_Ship:Spawn() - -SpawnM2A2_AttackVehicle = SPAWN:New( 'Spawn Test M2A2 Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) -SpawnSAM_AttackVehicle = SPAWN:New( 'Spawn Test SAM Attack Vehicle' ):InitRandomizeUnits( true, 10, 4 ) - -for i = 1, 30 do - GroupM2A2_AttackVehicle = SpawnM2A2_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) - GroupSAM_AttackVehicle = SpawnSAM_AttackVehicle:SpawnInZone( ZONE:New("Spawn Zone") ) -end - -SetVehicleCompletely = SET_GROUP:New() - :FilterPrefixes( "Spawn Vehicle Zone Completely" ) - :FilterStart() - -SetVehiclePartly = SET_GROUP:New() - :FilterPrefixes( "Spawn Vehicle Zone Partly" ) - :FilterStart() - -SetVehicleNot = SET_GROUP:New() - :FilterPrefixes( "Spawn Vehicle Zone Not" ) - :FilterStart() - -Spawn_Vehicle_Zone_Completely = SPAWN:New( 'Spawn Vehicle Zone Completely' ):InitRandomizeUnits( true, 10, 4) -Spawn_Vehicle_Zone_Partly = SPAWN:New( 'Spawn Vehicle Zone Partly' ):InitRandomizeUnits( true, 10, 4 ) -Spawn_Vehicle_Zone_Not = SPAWN:New( 'Spawn Vehicle Zone Not' ):InitRandomizeUnits( true, 10, 4 ) -for i = 1, 30 do - Spawn_Vehicle_Zone_Completely:SpawnInZone( ZONE:New("Spawn Zone Completely") ) - Spawn_Vehicle_Zone_Partly:SpawnInZone( ZONE:New("Spawn Zone Partly") ) - Spawn_Vehicle_Zone_Not:SpawnInZone( ZONE:New("Spawn Zone Not") ) -end - ---DBBlue:TraceDatabase() ---SCHEDULER:New( DBBluePlanes, DBBluePlanes.Flush, { }, 1 ) ---SCHEDULER:New( DBRedVehicles, DBRedVehicles.Flush, { }, 1 ) ---SCHEDULER:New( DBShips, DBShips.Flush, { }, 1 ) ---SCHEDULER:New( DBBelgium, DBBelgium.Flush, { }, 1 ) ---SCHEDULER:New( DBNorthKorea, DBNorthKorea.Flush, { }, 1 ) ---SCHEDULER:New( DBKA50Vinson, DBKA50Vinson.Flush, { }, 1 ) --- ---SCHEDULER:New( DBBluePlanesGroup, DBBluePlanesGroup.Flush, { }, 1 ) ---SCHEDULER:New( DBNorthKoreaGroup, DBNorthKoreaGroup.Flush, { }, 1 ) - -SetBluePlanesGroup:ForEachGroup( - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeBlue() - end - end -) - -SetNorthKoreaGroup:ForEachGroup( - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeRed() - end - end -) - -SetSAMGroup:ForEachGroup( - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeOrange() - end - end -) - -GroupZoneCompletely = GROUP:FindByName( "Zone Completely" ) -GroupZonePartly = GROUP:FindByName( "Zone Partly" ) -GroupZoneNot = GROUP:FindByName( "Zone Not" ) - -ZoneCompletely = ZONE_POLYGON:New( "Zone Completely", GroupZoneCompletely ):SmokeZone( SMOKECOLOR.White ) -ZonePartly = ZONE_POLYGON:New( "Zone Partly", GroupZonePartly ):SmokeZone( SMOKECOLOR.White ) -ZoneNot = ZONE_POLYGON:New( "Zone Not", GroupZoneNot ):SmokeZone( SMOKECOLOR.White ) - -SetVehicleCompletely:ForEachGroupCompletelyInZone( ZoneCompletely, - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeBlue() - end - end -) - -SetVehiclePartly:ForEachGroupPartlyInZone( ZonePartly, - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeBlue() - end - end -) - -SetVehicleNot:ForEachGroupNotInZone( ZoneNot, - --- @param Wrapper.Group#GROUP MooseGroup - function( MooseGroup ) - for UnitId, UnitData in pairs( MooseGroup:GetUnits() ) do - local UnitAction = UnitData -- Wrapper.Unit#UNIT - UnitAction:SmokeBlue() - end - end -) - diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-GRP-101 - Group Sets.miz b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-GRP-101 - Group Sets.miz deleted file mode 100644 index 43ce638..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/SET-GRP-101 - Group Sets.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-101 - Group Sets/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.lua b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.lua deleted file mode 100644 index a851d9a..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.lua +++ /dev/null @@ -1,8 +0,0 @@ --- The mission contains templates, which are late activated groups. Only the active groups should be included. --- It should count 3 groups in DCS.log. - -SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce() -SetGroup:Flush() -SetGroup:I( { Count = SetGroup:Count() } ) - -MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll() diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.miz b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.miz deleted file mode 100644 index a0952b7..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/SET-GRP-300 - FilterActive Scenario 1.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 1/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.lua b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.lua deleted file mode 100644 index 6d8db5d..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.lua +++ /dev/null @@ -1,8 +0,0 @@ --- The mission contains templates, which are late activated groups. All groups should be included. --- It should count 7 groups in DCS.log. - -SetGroup = SET_GROUP:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() -SetGroup:Flush() -SetGroup:I( { Count = SetGroup:Count() } ) - -MESSAGE:NewType( "There are " .. SetGroup:Count() .. " groups in the SetGroup.", MESSAGE.Type.Information ):ToAll() diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.miz b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.miz deleted file mode 100644 index 17704fa..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/SET-GRP-300 - FilterActive Scenario 2.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-GRP/SET-GRP-300 - FilterActive Scenario 2/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - FilterOnce Scenario 1.miz b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - FilterOnce Scenario 1.miz deleted file mode 100644 index b292551..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - FilterOnce Scenario 1.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - Unit Sets.lua b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - Unit Sets.lua deleted file mode 100644 index 9b2806f..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/SET-UNT-100 - Unit Sets.lua +++ /dev/null @@ -1,7 +0,0 @@ - -SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() - -SetUnit:Flush() - -SetUnit:I(SetUnit:Count()) - diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-100 - FilterOnce Scenario 1/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Ground.lua b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Ground.lua deleted file mode 100644 index da158a4..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Ground.lua +++ /dev/null @@ -1,11 +0,0 @@ -SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() -SetUnit:Flush() -SetUnit:I( { Count = SetUnit:Count() } ) - -SCHEDULER:New( nil, - function() - SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() - SetUnit:Flush() - SetUnit:I( { Count = SetUnit:Count() } ) - end, {}, 60 ) - diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Scenario 2.miz b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Scenario 2.miz deleted file mode 100644 index dad54be..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/SET-UNT-110 - FilterOnce Scenario 2.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-110 - FilterOnce Scenario 2/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.lua b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.lua deleted file mode 100644 index 0be25eb..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.lua +++ /dev/null @@ -1,16 +0,0 @@ -SCHEDULER:New( nil, - function() - SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterOnce() - SetUnit:Flush() - SetUnit:I( { Count = SetUnit:Count() } ) - end, {}, 0, 30 ) - -GroupPlanes = GROUP:FindByName( "Planes #001" ) - -GroupPlanes:HandleEvent( EVENTS.EngineShutdown ) - -function GroupPlanes:OnEventEngineShutdown( EventData ) - - EventData.IniUnit:Destroy() - -end \ No newline at end of file diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.miz b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.miz deleted file mode 100644 index 67189e3..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/SET-UNT-120 - FilterOnce Scenario 3.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-120 - FilterOnce Scenario 3/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.lua b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.lua deleted file mode 100644 index d85a435..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.lua +++ /dev/null @@ -1,8 +0,0 @@ --- The mission contains templates, which are late activated groups. Only the active units should be included. --- It should count 24 units in DCS.log. - -SetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterCategories("ground"):FilterActive():FilterOnce() -SetUnit:Flush() -SetUnit:I( { Count = SetUnit:Count() } ) - -MESSAGE:NewType( "There are " .. SetUnit:Count() .. " units in the SetUnit.", MESSAGE.Type.Information ):ToAll() diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.miz b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.miz deleted file mode 100644 index 6c4c89c..0000000 Binary files a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/SET-UNT-300 - FilterActive Scenario 1.miz and /dev/null differ diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/pack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/unpack.ps1 b/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SET - Data Sets/SET-UNT/SET-UNT-300 - FilterActive Scenario 1/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.lua b/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.lua deleted file mode 100644 index ea28a16..0000000 --- a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.lua +++ /dev/null @@ -1,11 +0,0 @@ - - - --- CCCP SEAD Defenses -SEAD_RU_SAM_Defenses = SEAD - :New( - { 'SAM Test' - } - ) - - \ No newline at end of file diff --git a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz b/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz deleted file mode 100644 index 33ef4ea..0000000 Binary files a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/SEV-001 - SEAD Evasion.miz and /dev/null differ diff --git a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/pack.ps1 b/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/unpack.ps1 b/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SEV - SEAD Evasion/SEV-001 - SEAD Evasion/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.lua b/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.lua deleted file mode 100644 index 3dcfab7..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Name: SPA-011 - Ground Ops - Simple Spawning --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn a ground vehicle. --- --- # Test cases: --- --- 1. Observe that the ground vehicle is spawned. - - - --- Tests Gudauta --- ------------- --- Spawn a gound vehicle... -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) -Spawn_Group_1 = Spawn_Vehicle_1:Spawn() - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz b/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz deleted file mode 100644 index c69fc99..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/SPA-011 - Ground Ops - Simple Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-011 - Ground Ops - Simple Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.lua b/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.lua deleted file mode 100644 index 5acad6f..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.lua +++ /dev/null @@ -1,27 +0,0 @@ --- Name: SPA-012 - Ground Ops - Multiple Spawns --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. - - - --- Tests Gudauta --- ------------- --- Spawn a gound vehicle... -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) -Spawn_Group_1 = Spawn_Vehicle_1:Spawn() -Spawn_Group_2 = Spawn_Vehicle_1:Spawn() -Spawn_Group_3 = Spawn_Vehicle_1:Spawn() -Spawn_Group_4 = Spawn_Vehicle_1:Spawn() -Spawn_Group_5 = Spawn_Vehicle_1:Spawn() - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz b/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz deleted file mode 100644 index ea6b77b..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/SPA-012 - Ground Ops - Multiple Spawns.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-012 - Ground Ops - Multiple Spawns/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.lua b/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.lua deleted file mode 100644 index c24b978..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Name: SPA-013 - Ground Ops - Scheduled Spawns --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ) - - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz b/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz deleted file mode 100644 index 4f3f23d..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/SPA-013 - Ground Ops - Scheduled Spawns.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-013 - Ground Ops - Scheduled Spawns/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.lua b/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.lua deleted file mode 100644 index 9751a86..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Name: SPA-014 - Ground Ops - Scheduled Spawns Limited --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. There should not be more than 5 groups spawned. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 5, 0 ):SpawnScheduled( 5, .5 ) - - diff --git a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz b/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz deleted file mode 100644 index 7a5da7d..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/SPA-014 - Ground Ops - Scheduled Spawns Limited.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-014 - Ground Ops - Scheduled Spawns Limited/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.lua b/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.lua deleted file mode 100644 index 1cc6cfb..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.lua +++ /dev/null @@ -1,28 +0,0 @@ --- Name: SPA-015 - Ground Ops - Randomize Route --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. There should not be more than 5 groups spawned. --- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) - :InitLimit( 10, 10 ) - :InitRandomizeRoute( 1, 1, 200 ) -- Randomize route starting from point 1 till point 3, with a radius of 200 meters around each point. - :SpawnScheduled( 5, .5 ) - - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz b/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz deleted file mode 100644 index 104f8f5..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/SPA-015 - Ground Ops - Randomize Route.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-015 - Ground Ops - Randomize Route/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.lua b/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.lua deleted file mode 100644 index 867e5a5..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.lua +++ /dev/null @@ -1,30 +0,0 @@ --- Name: SPA-016 - Ground Ops - Randomize Zones --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. There should not be more than 5 groups spawned. --- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. --- 5. Observe that the position where the units are spawned, is randomized according the zones. - - - --- Tests Gudauta --- ------------- --- Create a zone table of the 2 zones. -ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } - -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) - :InitLimit( 10, 10 ) - :InitRandomizeRoute( 1, 1, 200 ) - :InitRandomizeZones( ZoneTable ) - :SpawnScheduled( 5, .5 ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz b/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz deleted file mode 100644 index b4c62f8..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/SPA-016 - Ground Ops - Randomize Zones.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-016 - Ground Ops - Randomize Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.lua b/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.lua deleted file mode 100644 index 434ab1f..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.lua +++ /dev/null @@ -1,32 +0,0 @@ --- Name: SPA-017 - Ground Ops - Set AI inactive while spawning --- Author: FlightControl --- Date Created: 24 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- But set the AI inactive when spawning. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. There should not be more than 10 groups spawned. --- 4. Observe that the AI is inactivated, and thus, the vehicles aren't moving. --- 5. Observe that the position where the units are spawned, is randomized in the zones perimeters. - - - --- Tests Gudauta --- ------------- --- Create a zone table of the 2 zones. -ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } - -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) - :InitLimit( 10, 10 ) - :InitRandomizeRoute( 1, 1, 200 ) - :InitRandomizeZones( ZoneTable ) - :InitAIOnOff( false ) -- This will disable the AI. You can also use :InitAIOff(). Set AI On (for those groups with AI Off in the ME), with :InitAIOn(). - :SpawnScheduled( 5, .5 ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.miz b/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.miz deleted file mode 100644 index b681bc2..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/SPA-017 - Ground Ops - Set AI inactive while spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-017 - Ground Ops - Set AI inactive while spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.lua b/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.lua deleted file mode 100644 index 73463d3..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: SPA-018 - Ground Ops - Randomize Templates --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. There should not be more than 10 units spawned. Make sure that group count have less than 10 units or 10 groups. --- 4. Observe that the route that the vehicles follow is randomized starting from point 1 till point 3. --- 5. Observe that the position where the units are spawned, is randomized according the zones. --- 6. Observe that the ground vehicles are spawned with randomized templates. - - --- Tests Gudauta --- ------------- --- Create a zone table of the 2 zones. -ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } - -TemplateTable = { "A", "B", "C" } - -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) - :InitLimit( 10, 10 ) - :InitRandomizeRoute( 1, 1, 200 ) - :InitRandomizeZones( ZoneTable ) - :InitRandomizeTemplate( TemplateTable ) - :SpawnScheduled( 5, .5 ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.miz b/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.miz deleted file mode 100644 index 89785f3..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/SPA-018 - Ground Ops - Randomize Templates.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-018 - Ground Ops - Randomize Templates/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.lua b/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.lua deleted file mode 100644 index 55947f7..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: SPA-019 - Ground Ops - Randomize Templates without Waypoints --- Author: FlightControl --- Date Created: 24 Feb 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned with randomized templates. --- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other. --- Note by ZERO (15/12/2020): the vehicles are spawned upon each other - - --- Tests Gudauta --- ------------- --- Create a zone table of the 2 zones. -ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } - -TemplateTable = { "A", "B", "C" } - -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) - :InitLimit( 10, 10 ) - :InitRandomizeTemplate( TemplateTable ) - :SpawnScheduled( 5, .5 ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.miz b/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.miz deleted file mode 100644 index 7fff4bc..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/SPA-019 - Ground Ops - Randomize Templates without Waypoints.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-019 - Ground Ops - Randomize Templates without Waypoints/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.lua b/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.lua deleted file mode 100644 index 4f011f1..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.lua +++ /dev/null @@ -1,30 +0,0 @@ ---- --- Name: SPA-020 - Ground Ops - Randomize Templates in Random Zones without Waypoints --- Author: FlightControl --- Date Created: 24 Feb 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned with randomized templates. --- 2. Observe that the ground vehicles are spread around the spawning area and are not stacked upon each other. --- 3. Observe that the ground vehicles are spread over the random zones, and that the initial templates formations are kept. - - --- Tests Gudauta --- ------------- --- Create a zone table of the 2 zones. -ZoneTable = { ZONE:New( "Zone1" ), ZONE:New( "Zone2" ) } - -TemplateTable = { "A", "B", "C" } - -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) - :InitLimit( 100, 10 ) - :InitRandomizeTemplate( TemplateTable ) - :InitRandomizeZones( ZoneTable ) - :SpawnScheduled( 5, .5 ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.miz b/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.miz deleted file mode 100644 index 66cda58..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/SPA-020 - Ground Ops - Randomize Templates in Zones no WP.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-020 - Ground Ops - Randomize Templates in Zones no WP/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/Revision By ZERO.txt b/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/Revision By ZERO.txt deleted file mode 100644 index 5d1bc80..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/Revision By ZERO.txt +++ /dev/null @@ -1,9 +0,0 @@ -SPA-017 - The Mission was not working. I have done it again! Now its working. -SPA-018 - Changed the code and the units into MAP. Checked and it is working. -SPA-019 - Note by ZERO (15/12/2020): the vehicles are spawned upon each other -SPA-021 - Changed the code for spawn 20 units. it was not working like described -SPA-022 - Changed the description of the mission -SPA-024 - Changed the description of the mission -SPA-100 - is not working. the function initclean() is not working -SPA-110 - Its working but its good to rework -SPA-140 - Doesnt work \ No newline at end of file diff --git a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.lua b/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.lua deleted file mode 100644 index 32d56ed..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names --- Author: FlightControl --- Date Created: 14 Mar 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. There should not be more than 5 groups spawned. (Number of units is 5 groups x 4 units in group = 20 that is a unit limits in :initLimit function in this implementation (:InitLimit( 20 , 10 ))) --- 4. Observe the unit names, they should have the name as defined within the ME. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle_1 = SPAWN - :New( "Spawn Vehicle 1" ) - :InitKeepUnitNames() - :InitLimit( 20 , 10 ) - :SpawnScheduled( 5, .5 ) - - diff --git a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.miz b/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.miz deleted file mode 100644 index 6ded206..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-021 - Ground Ops - Scheduled Spawns Limited Keep Unit Names/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua b/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua deleted file mode 100644 index 5096cdd..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Name: SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval --- Author: FlightControl --- Date Created: 18 Mar 2017 --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- The vehicle should respawn when killed. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 1, 0 ):SpawnScheduled( 30, .5 ) - - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz b/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz deleted file mode 100644 index 664bcd2..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua b/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua deleted file mode 100644 index 17c3d32..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- --- Name: SPA-023 - Ground Ops - SpawnStart and SpawnStop --- Author: FlightControl --- Date Created: 10 Jan 2017 --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- The schedule is immediately stopped and started. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ):SpawnScheduleStop() - -Spawn_Vehicle:SpawnScheduleStart() - - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz b/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz deleted file mode 100644 index 6516de6..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua deleted file mode 100644 index 4373015..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: SPA-024 - Ground Ops - Arrays --- Author: FlightControl --- Date Created: 19 Jul 2017 --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in an array. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the array parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle = SPAWN - :New( "Spawn Vehicles" ) - :InitLimit( 12, 60 ) - :InitArray( 90, 10, 10, 10 ) - - - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz deleted file mode 100644 index 8600555..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua deleted file mode 100644 index 4373015..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: SPA-024 - Ground Ops - Arrays --- Author: FlightControl --- Date Created: 19 Jul 2017 --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in an array. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the array parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle = SPAWN - :New( "Spawn Vehicles" ) - :InitLimit( 12, 60 ) - :InitArray( 90, 10, 10, 10 ) - - - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz deleted file mode 100644 index 40e37af..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-024 - Ground Ops - Arrays/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua b/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua deleted file mode 100644 index 58c162e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Name: SPA-025 - Ground Ops - Spawn Hidden --- Author: FlightControl --- Date Created: 06 Sep 2017 --- --- # Situation: --- --- At Gudauta spawn a ground vehicle, hidden --- --- # Test cases: --- --- 1. Observe that the ground vehicle is spawned and his hidden. - - - --- Tests Gudauta --- ------------- --- Spawn a gound vehicle... -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) -Spawn_Group_1 = Spawn_Vehicle_1:Spawn() - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz b/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz deleted file mode 100644 index 5c29707..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua b/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua deleted file mode 100644 index 50e602b..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Name: SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden --- Author: FlightControl --- Date Created: 06 Sep 2017 --- --- # Situation: --- --- At Gudauta spawn a ground vehicle, hidden, based on a randomized template. --- --- # Test cases: --- --- 1. Observe that a random ground vehicle is spawned and his hidden. - - - --- Tests Gudauta --- ------------- --- Spawn a gound vehicle... - -Templates = { "A", "B" } - -Spawn_Vehicle_1 = SPAWN:New( "Vehicle" ) -Spawn_Vehicle_1:InitRandomizeTemplate( Templates ) -Spawn_Group_1 = Spawn_Vehicle_1:Spawn() - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz b/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz deleted file mode 100644 index 5bce74c..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua b/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua deleted file mode 100644 index 75d4810..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Name: SPA-027 - Ground Ops - Respawning After Destroy --- Author: FlightControl --- Date Created: 10 Dec 2017 --- --- At Gudauta spawns ground vehicle, in a scheduled fashion. --- There can only be a maximum of 2 grond vehicles alive. --- When a ground vehicle is destroyed, a new one needs to be spawned at a different location in the zone. --- Until that one is also destroyed. --- --- Red is attacking the spawned blue vehicles. --- Once blue is destroyed, a new blue needs to spawn. --- Until all 10 blue vehicles are spawned. --- The position of blue is randomized in the zone. --- Blue has ROE hold weapons. --- - - -BlueVehicleSpawn = SPAWN - :New( "Tank" ) - :InitLimit( 2, 10 ) - :InitRandomizePosition( true, 200, 50 ) - :SpawnScheduled( 5, .5 ) - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz b/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz deleted file mode 100644 index 594cfaf..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua b/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua deleted file mode 100644 index c7d62a5..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Tests Kutaisi --- ------------- --- Tests the CleanUp functionality. --- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground. --- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn. -Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):InitCleanUp( 60 ):SpawnScheduled( 10, 0 ) -Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz b/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz deleted file mode 100644 index 93de9dd..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua b/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua deleted file mode 100644 index 1ff4c90..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- --- Tests Gudauta --- ------------- --- Limited scheduled spawning of groups... -Spawn_Plane_Limited_Scheduled = SPAWN:New( "Spawn Plane Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) -Spawn_Helicopter_Limited_Scheduled = SPAWN:New( "Spawn Helicopter Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) -Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 90, 0 ) - ---- --- Tests Sukhumi --- ------------- --- Limited scheduled spawning of groups with destruction... -Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) -Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) -Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) - - diff --git a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz b/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz deleted file mode 100644 index cccc451..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-110 - Limit Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua b/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua deleted file mode 100644 index 536e568..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua +++ /dev/null @@ -1,35 +0,0 @@ ---- --- Name: SPA-120 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit --- Author: FlightControl --- Date Created: 05 Feb 2017 --- --- # Situation: --- --- One airplane and one helicopter will be spawned. --- Only one airplane and one helicopter can be alive at the same time. --- Upon landing, the airplane and helicopter will respawn at Kutaisi. --- --- # Test cases: --- --- 1. Observe the spawning of the airplane and helicopter --- 2. There should not be more airplanes alive than there are set by InitLimit. --- 3. Upon landing, the planes should respawn. --- 5. The plane should respawn itself when the air unit has parked at the ramp or has landed. - - -do - - -- Declare SPAWN objects - Spawn_Plane = SPAWN:New("Plane"):InitLimit( 2, 0 ) - - -- Choose repeat functionality - - -- Repeat on ... (when landed on the airport) - Spawn_Plane:InitRepeatOnEngineShutDown() - - -- Now SPAWN the GROUPs - Spawn_Plane:SpawnScheduled(30,0) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz b/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz deleted file mode 100644 index 9b56fb4..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz b/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz deleted file mode 100644 index c44d352..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-120 - Repeat Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua b/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua deleted file mode 100644 index e65470a..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua +++ /dev/null @@ -1,51 +0,0 @@ ---- --- Name: SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit --- Author: FlightControl --- Date Created: 05 Feb 2017 --- --- # Situation: --- --- Multiple airplanes will be spawned at a scheduled interval. --- There is a limit on how many airplanes can be alive at the same time. --- Upon landing, the airplanes will respawn at Kutaisi. --- --- # Test cases: --- --- 1. Observe the spawning of the airplanes --- 2. There should not be more airplanes alive than there are set by InitLimit. --- 3. Upon landing, the planes should respawn. --- 4. The KA-50 and the C-101EB should respawn itself directly when landed. --- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. - - -do - - -- Declare SPAWN objects - Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 2, 10 ) - Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 2, 10 ) - Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 2, 10 ) - Spawn_A_10C = SPAWN:New("A-10C") - :InitLimit( 2, 10 ) - - -- Choose repeat functionality - - -- Repeat on landing - Spawn_KA_50:InitRepeatOnLanding() - Spawn_KA_50:InitDelayOff() - - Spawn_C_101EB:InitRepeatOnLanding() - Spawn_C_101EB:InitDelayOff() - - -- Repeat on enging shutdown (when landed on the airport) - Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() - Spawn_A_10C:InitRepeatOnEngineShutDown() - - -- Now SPAWN the GROUPs - Spawn_KA_50:SpawnScheduled(180,0) - Spawn_C_101EB:SpawnScheduled(180,0) - Spawn_MI_8MTV2:SpawnScheduled(180,0) - Spawn_A_10C:SpawnScheduled(180,0) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz b/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz deleted file mode 100644 index 8853abf..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua b/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua deleted file mode 100644 index b2e2028..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- --- Name: SPA-122 - Air Ops - OnLand test for Scheduled Spawns --- Author: FlightControl --- Date Created: 21 Mar 2017 --- --- # Situation: --- --- An airplane is spawned at a scheduled interval. --- There is a limit on how many airplanes can be alive at the same time. --- Upon landing, the airplane will respawn in the air. --- --- # Test cases: --- --- 1. Observe the spawning of the airplanes --- 2. There should not be more airplanes alive than there are set by InitLimit. --- 3. Upon landing, the planes should respawn. --- 4. The KA-50 and the C-101EB should respawn itself directly when landed. --- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. - - -do - - -- Declare SPAWN objects - Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 1, 0 ) - Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 1, 0 ) - Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 1, 0 ) - Spawn_A_10C = SPAWN:New("A-10C"):InitLimit( 1, 0 ) - - -- Choose repeat functionality - - -- Repeat on landing - Spawn_KA_50:InitRepeatOnLanding() - Spawn_C_101EB:InitRepeatOnLanding() - - -- Repeat on enging shutdown (when landed on the airport) - Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() - Spawn_A_10C:InitRepeatOnEngineShutDown() - - -- Now SPAWN the GROUPs - Spawn_KA_50:SpawnScheduled(30,0) - Spawn_C_101EB:SpawnScheduled(30,0) - Spawn_MI_8MTV2:SpawnScheduled(30,0) - Spawn_A_10C:SpawnScheduled(30,0) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz b/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz deleted file mode 100644 index 34ac4b5..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua b/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua deleted file mode 100644 index 3cb08ed..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua +++ /dev/null @@ -1,26 +0,0 @@ ---- --- Name: SPA-123 - Air Ops - Repeat on Landing and InitCleanUp --- Author: FlightControl --- Date Created: 15 Sep 2018 --- --- # Situation: --- --- Helicpters spawn and are lightly shot until the crash land, but don't really destroy. --- The should be respawned after a while. --- No performance overhead should be noticed. - -do - - -- Declare SPAWN objects - Spawn_KA_50 = SPAWN:New("KA-50") - Spawn_KA_50:InitLimit( 2, 10 ) - - -- Choose repeat functionality - - Spawn_KA_50:InitDelayOff() - Spawn_KA_50:InitCleanUp( 300 ) - Spawn_KA_50:SpawnScheduled( 180, 0.2 ) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz b/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz deleted file mode 100644 index 65b63ff..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.lua b/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.lua deleted file mode 100644 index a3f8eb6..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.lua +++ /dev/null @@ -1,52 +0,0 @@ ----------------------------------------------------------------------- ---SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup() Escort Task ----------------------------------------------------------------------- - --////////////////////////////////// - --////////////Tankers and awacs v1 - --////////////////////////////////// ---////////// By Targs35 ///////////// ---//////////////// from 62nd Air Wing, Brisbane server.. ---/////////////////////////////////// - ------- With thanks to the guys at MOOSE and in particular Pikes, Nolove, Delta99 and Wingthor - -- Funky Frank is the man.. ------//////////////////////////////// ---/////////// Spawn Tanker and Escorts /// - - do - - local PointVec1 = POINT_VEC3:New( -100, 20, 80 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group - local PointVec2 = POINT_VEC3:New( -100, 20, 150 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group - - --Create Spawn Groups, use the OnSpawnGroup() function to spawn two escorts and task them - - local Tanker_Texaco = SPAWN - :New("Tanker_Texaco_Droge") - :InitLimit( 1, 2 ) -- spawn 1 *alive* units max - :InitCleanUp( 240 ) - :OnSpawnGroup(function (tanker) -- tanker contains the GROUP object when the tanker spawns - local Escort_Texaco_1 = SPAWN - :New("Escort_Texaco_F14 001") - :InitLimit( 1, 2 ) - :InitCleanUp( 240 ) - :OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns - local FollowDCSTask1 = spawndgroup:TaskFollow( tanker, PointVec1 ) -- create task - spawndgroup:SetTask( FollowDCSTask1, 1 ) -- push task on the GROUP - end - ) - :SpawnScheduled( 60, 0.5 ) - - local Escort_Texaco_2 = SPAWN - :New("Escort_Texaco_F14 002") - :InitLimit( 1, 2 ) - :InitCleanUp( 240 ) - :OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns - local FollowDCSTask2 = spawndgroup:TaskFollow( tanker, PointVec2 ) - spawndgroup:SetTask( FollowDCSTask2, 1 ) - end - ) - :SpawnScheduled( 60, 0.5 ) - end - ) - :SpawnScheduled( 60, 0.5 ) - -end diff --git a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.miz b/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.miz deleted file mode 100644 index 04fb8a3..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua b/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua deleted file mode 100644 index 6eb08c7..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- --- Name: SPA-130 - Uncontrolled Spawning --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- A plane will be spawned Uncontrolled and later one will be spawned Controlled. --- Only the Controlled plane will move, the other will remain idle at the parking spot. --- --- # Test cases: --- --- 1. Observe the spawning of the UnControlled Plane. --- 2. Observe the spawning of the Controlled Plane. - - --- Create the SPAWN object looking for the group (template) "Plane". -SpawnPlane = SPAWN:New( "Plane" ) - --- Set the spawn mode to UnControlled. -SpawnPlane:InitUnControlled( true ) - --- Spawn the UnControlled Group -UnControlledPlane = SpawnPlane:Spawn() - --- Set the spawn mode back to Controlled. -SpawnPlane:InitUnControlled( false ) - -ControlledPlane = SpawnPlane:Spawn() - --- Now, let's create a menu option at a player slot plane... --- We can only create the menu option if the player has joined the slot ... -PlayerPlane = CLIENT:FindByName( "PlayerPlane", "Select Menu item to activate UnControlled plane" ) - -PlayerPlane:Alive( - function( Client, SpawnPlane ) - - --- @param Functional.Spawn#SPAWN SpawnPlane - local function ActivatePlane( SpawnPlane ) - SpawnPlane:InitUnControlled( false ) - SpawnPlane:ReSpawn( 1 ) - end - - local Menu = MENU_CLIENT_COMMAND:New( Client, "Select to activate UnControlled plane", nil, ActivatePlane, SpawnPlane ) - end - , SpawnPlane -) \ No newline at end of file diff --git a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz b/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz deleted file mode 100644 index 54974fa..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-130 - Uncontrolled Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Caucasus - SpawnAtAirbase.lua b/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Caucasus - SpawnAtAirbase.lua deleted file mode 100644 index 071ca83..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Caucasus - SpawnAtAirbase.lua +++ /dev/null @@ -1,20 +0,0 @@ --- Name: SPA-131 - Air Ops - SpawnAtAirbase --- Author: FlightControl --- Date Created: 14 Sep 2017 --- -Spawn_Plane = SPAWN:New( "Plane" ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Cold ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Hot ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Krymsk ), SPAWN.Takeoff.Runway ) - -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold ) - -Spawn_Heli = SPAWN:New( "Heli") - -Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Cold" ), SPAWN.Takeoff.Cold ) -Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Hot" ), SPAWN.Takeoff.Hot ) -Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Runway" ), SPAWN.Takeoff.Runway ) -Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "FARP Air" ), SPAWN.Takeoff.Air ) - -Spawn_Heli:SpawnAtAirbase( AIRBASE:FindByName( "Carrier" ), SPAWN.Takeoff.Cold ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua b/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua deleted file mode 100644 index b7b1df3..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Name: SPA-131 - Air Ops - SpawnAtAirbase --- Author: FlightControl --- Date Created: 14 Sep 2017 --- -Spawn_Plane = SPAWN:New( "Plane" ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Cold ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Hot ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Runway ) - - - diff --git a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz b/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz deleted file mode 100644 index c045de2..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua b/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua deleted file mode 100644 index ddb5f4a..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua +++ /dev/null @@ -1,19 +0,0 @@ ---- --- Name: SPA-140 - Spawn Client Slots --- Author: FlightControl --- Date Created: 30 Aug 2017 --- --- # Situation: --- --- A plane will be spawned Uncontrolled and later one will be spawned Controlled. --- Only the Controlled plane will move, the other will remain idle at the parking spot. --- --- # Test cases: --- - --- Create the SPAWN object looking for the group (template) "Plane". -SpawnPlane = SPAWN:New( "Plane" ) - --- Spawn the UnControlled Group -UnControlledPlane = SpawnPlane:SpawnClientAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Kutaisi ) ) - diff --git a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz b/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz deleted file mode 100644 index 319e142..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-140 - Spawn Client Slots/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua b/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua deleted file mode 100644 index 4302dd3..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua +++ /dev/null @@ -1,11 +0,0 @@ ---- --- Tests Gudauta --- -------------- --- Limited and scheduled spawning of groups, with RandomizeTemplate ... - -Templates = { "Template1", "Template2", "Template3", "Template4" } - -Spawn_Ground1 = SPAWN:New( "Spawn Vehicle1" ):InitLimit( 4, 20 ):InitRandomizeTemplate(Templates):SpawnScheduled( 15, 0 ) -Spawn_Ground2 = SPAWN:New( "Spawn Vehicle2" ):InitLimit( 4, 20 ):InitRandomizeTemplate(Templates):SpawnScheduled( 15, 0 ) - - diff --git a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz b/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz deleted file mode 100644 index acf7086..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-200 - Randomize Unit Types/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz b/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz deleted file mode 100644 index b854411..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-220 - Randomize Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua b/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua deleted file mode 100644 index f33af11..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua +++ /dev/null @@ -1,52 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundStatics = { "GroundStatic1", "GroundStatic2", "GroundStatic3" } -AirplaneStatics = { "AirplaneStatic1", "AirplaneStatic2", "AirplaneStatic3" } -HelicopterStatics = { "HelicopterStatic1", "HelicopterStatic2", "HelicopterStatic3" } -ShipStatics = { "ShipStatic1", "ShipStatic2", "ShipStatic3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local StaticName = GroundStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnGrounds:SpawnFromUnit( SpawnStatic ) - end - - do - -- Spawn Airplanes - local StaticName = AirplaneStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnAirplanes:SpawnFromUnit( SpawnStatic ) - SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 ) - end - - do - -- Spawn Helicopters - local StaticName = HelicopterStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnHelicopters:SpawnFromUnit( SpawnStatic ) - SpawnHelicopters:SpawnFromUnit( SpawnStatic, 200, 500 ) -- Spawn between 200 and 500 meters. - end - - do - -- Spawn Ships - local StaticName = ShipStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnShips:SpawnFromUnit( SpawnStatic ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz b/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz deleted file mode 100644 index 7ff571c..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-310 - Spawn at Static position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua b/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua deleted file mode 100644 index 01e52ed..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua +++ /dev/null @@ -1,52 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundUnits = { "GroundUnit1", "GroundUnit2", "GroundUnit3" } -AirplaneUnits = { "AirplaneUnit1", "AirplaneUnit2", "AirplaneUnit3" } -HelicopterUnits = { "HelicopterUnit1", "HelicopterUnit2", "HelicopterUnit3" } -ShipUnits = { "ShipUnit1", "ShipUnit2", "ShipUnit3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 10, 3 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local UnitName = GroundUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnGrounds:SpawnFromUnit( SpawnUnit ) - end - - do - -- Spawn Airplanes - local UnitName = AirplaneUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnAirplanes:SpawnFromUnit( SpawnUnit ) - SpawnAirplanes:SpawnFromUnit( SpawnUnit, 200, 500 ) - end - - do - -- Spawn Helicopters - local UnitName = HelicopterUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnHelicopters:SpawnFromUnit( SpawnUnit ) - SpawnHelicopters:SpawnFromUnit( SpawnUnit, 500, 2000 ) - end - - do - -- Spawn Ships - local UnitName = ShipUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnShips:SpawnFromUnit( SpawnUnit ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz b/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz deleted file mode 100644 index ce3a093..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-320 - Spawn at Unit position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua b/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua deleted file mode 100644 index fbb754c..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua +++ /dev/null @@ -1,61 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } -GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } -AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } -HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } -ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ) -SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local ZoneName = GroundZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnGrounds:SpawnFromVec2( SpawnVec3:GetVec2() ) - end - - do - -- Spawn Ground Randomize - local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnRandomizeGrounds:SpawnFromVec2( SpawnVec3:GetVec2() ) - end - - do - -- Spawn Airplanes - local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnAirplanes:SpawnFromVec2( SpawnVec3:GetVec2() ) - SpawnAirplanes:SpawnFromVec2( SpawnVec3:GetVec2(), 200, 500 ) - end - - do - -- Spawn Helicopters - local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnHelicopters:SpawnFromVec2( SpawnVec3:GetVec2() ) - SpawnHelicopters:SpawnFromVec2( SpawnVec3:GetVec2(), 2000, 4000 ) - end - - do - -- Spawn Ships - local ZoneName = ShipZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnShips:SpawnFromVec2( SpawnVec3:GetVec2() ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz b/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz deleted file mode 100644 index 29254e1..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-330 - Spawn at Vec2 position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua b/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua deleted file mode 100644 index df0d253..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua +++ /dev/null @@ -1,59 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } -GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } -AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } -HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } -ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ) -SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local ZoneName = GroundZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ground Randomize - local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Airplanes - local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Helicopters - local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ships - local ZoneName = ShipZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz b/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz deleted file mode 100644 index dc43e85..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-340 - Spawn at Vec3 position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua b/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua deleted file mode 100644 index e3ea496..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua +++ /dev/null @@ -1,73 +0,0 @@ ---- --- Name: SPA-350 - Spawn at Vec3 position RandomzePosition --- Author: FlightControl --- Date Created: 14 Mar 2017 --- --- # Situation: --- --- Ground troops, Airplanes, Helicopters and Ships are spawning from Vec3 points. --- The API InitRandomizePosition is tested here, ensure that groups are replaced within a 900 to 1000 zone band at random positions. --- --- # Test cases: --- --- 1. Observe the random positioning of the groups. There should be no scattering of units. --- - -local Iterations = 10 -local Iteration = 1 - -GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } -GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } -AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } -HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } -ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local ZoneName = GroundZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ground Randomize - local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Airplanes - local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Helicopters - local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ships - local ZoneName = ShipZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz b/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz deleted file mode 100644 index 681e8d8..0000000 Binary files a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz and /dev/null differ diff --git a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 b/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 b/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA - Spawning/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua b/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua deleted file mode 100644 index ce8e376..0000000 --- a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.lua +++ /dev/null @@ -1,25 +0,0 @@ --- Name: SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval --- Author: FlightControl --- Date Created: 18 Mar 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- The vehicle should respawn when killed. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. --- 3. When the vehicle spawned die, a new vehicle will be spawned - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ):InitLimit( 1, 0 ):SpawnScheduled( 30, .5 ) - - - - diff --git a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz b/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz deleted file mode 100644 index 2e94f89..0000000 Binary files a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval.miz and /dev/null differ diff --git a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 b/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 b/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-022 - Ground Ops - Scheduled Spawns Limited with long interval/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua b/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua deleted file mode 100644 index e3c4d60..0000000 --- a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: SPA-023 - Ground Ops - SpawnStart and SpawnStop --- Author: FlightControl --- Date Created: 10 Jan 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in a scheduled fashion. --- The schedule is immediately stopped and started. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the scheduler parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle = SPAWN:New( "Spawn Vehicle 1" ):SpawnScheduled( 10, 0.5 ):SpawnScheduleStop() - -Spawn_Vehicle:SpawnScheduleStart() - - - - diff --git a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz b/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz deleted file mode 100644 index 01483d8..0000000 Binary files a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/SPA-023 - Ground Ops - SpawnStart and SpawnStop.miz and /dev/null differ diff --git a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 b/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 b/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-023 - Ground Ops - SpawnStart and SpawnStop/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua b/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua deleted file mode 100644 index 4373015..0000000 --- a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: SPA-024 - Ground Ops - Arrays --- Author: FlightControl --- Date Created: 19 Jul 2017 --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in an array. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the array parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle = SPAWN - :New( "Spawn Vehicles" ) - :InitLimit( 12, 60 ) - :InitArray( 90, 10, 10, 10 ) - - - - - diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz b/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz deleted file mode 100644 index 651ba2a..0000000 Binary files a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/SPA-024 - Ground Ops - Arrays Normandy.miz and /dev/null differ diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 b/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 b/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-024 - Ground Ops - Arrays Normandy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua b/Moose_Missions/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua deleted file mode 100644 index 1208bf1..0000000 --- a/Moose_Missions/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.lua +++ /dev/null @@ -1,28 +0,0 @@ ---- --- Name: SPA-024 - Ground Ops - Arrays --- Author: FlightControl --- Date Created: 19 Jul 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn multiple ground vehicles, in an array. --- --- # Test cases: --- --- 1. Observe that the ground vehicles are spawned at the position declared within the mission editor. --- 2. The vehicles should spawn according the array parameters. - - - --- Tests Gudauta --- ------------- -Spawn_Vehicle = SPAWN - :New( "Spawn Vehicles" ) - :InitLimit( 12, 60 ) - :InitArray( 90, 10, 10, 10 ) - - - - - diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz b/Moose_Missions/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz deleted file mode 100644 index 9096e58..0000000 Binary files a/Moose_Missions/SPA-024 - Ground Ops - Arrays/SPA-024 - Ground Ops - Arrays.miz and /dev/null differ diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays/pack.ps1 b/Moose_Missions/SPA-024 - Ground Ops - Arrays/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-024 - Ground Ops - Arrays/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-024 - Ground Ops - Arrays/unpack.ps1 b/Moose_Missions/SPA-024 - Ground Ops - Arrays/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-024 - Ground Ops - Arrays/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua b/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua deleted file mode 100644 index ae0f67e..0000000 --- a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.lua +++ /dev/null @@ -1,23 +0,0 @@ --- Name: SPA-025 - Ground Ops - Spawn Hidden --- Author: FlightControl --- Date Created: 06 Sep 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn a ground vehicle, hidden --- --- # Test cases: --- --- 1. Observe that the ground vehicle is spawned and his hidden. - - - --- Tests Gudauta --- ------------- --- Spawn a gound vehicle... -Spawn_Vehicle_1 = SPAWN:New( "Spawn Vehicle 1" ) -Spawn_Group_1 = Spawn_Vehicle_1:Spawn() - - - diff --git a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz b/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz deleted file mode 100644 index 9640104..0000000 Binary files a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/SPA-025 - Ground Ops - Spawn Hidden.miz and /dev/null differ diff --git a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 b/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 b/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-025 - Ground Ops - Spawn Hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua b/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua deleted file mode 100644 index 7dbc7b7..0000000 --- a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Name: SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden --- Author: FlightControl --- Date Created: 06 Sep 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- At Gudauta spawn a ground vehicle, hidden, based on a randomized template. --- --- # Test cases: --- --- 1. Observe that a random ground vehicle is spawned and his hidden. --- 2. Observe that templates are hidden on MAP on Mission Editor - - - --- Tests Gudauta --- ------------- --- Spawn a gound vehicle... - -Templates = { "A", "B" } - -Spawn_Vehicle_1 = SPAWN:New( "vehicle" ) -Spawn_Vehicle_1:InitRandomizeTemplate( Templates ) -Spawn_Group_1 = Spawn_Vehicle_1:Spawn() - diff --git a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz b/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz deleted file mode 100644 index 54d3b28..0000000 Binary files a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden.miz and /dev/null differ diff --git a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 b/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 b/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-026 - Ground Ops - Spawn RandomizeTemplate Hidden/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua b/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua deleted file mode 100644 index ccbca07..0000000 --- a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Name: SPA-027 - Ground Ops - Respawning After Destroy --- Author: FlightControl --- Date Created: 10 Dec 2017 --- Checked in 15 dez 2020 by ZERO --- --- At Gudauta spawns ground vehicle, in a scheduled fashion. --- There can only be a maximum of 2 grond vehicles alive. --- When a ground vehicle is destroyed, a new one needs to be spawned at a different location in the zone. --- Until that one is also destroyed. --- --- Red is attacking the spawned blue vehicles. --- Once blue is destroyed, a new blue needs to spawn. --- Until all 10 blue vehicles (units) are spawned. --- The position of blue is randomized in the zone. --- Blue has ROE hold weapons. --- - - -BlueVehicleSpawn = SPAWN - :New( "Tank" ) - :InitLimit( 2, 10 ) - :InitRandomizePosition( true, 200, 50 ) - :SpawnScheduled( 5, .5 ) - - - diff --git a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz b/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz deleted file mode 100644 index 5fcdc2f..0000000 Binary files a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/SPA-027 - Ground Ops - Respawning After Destroy.miz and /dev/null differ diff --git a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 b/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 b/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-027 - Ground Ops - Respawning After Destroy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua b/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua deleted file mode 100644 index c7d62a5..0000000 --- a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.lua +++ /dev/null @@ -1,8 +0,0 @@ --- Tests Kutaisi --- ------------- --- Tests the CleanUp functionality. --- Limited spawning of groups, scheduled every 10 seconds, who are engaging into combat. Some helicopters may crash land on the ground. --- Observe when helicopters land but are not dead and are out of the danger zone, that they get removed after a while (+/- 180 seconds) and ReSpawn. -Spawn_Helicopter_Scheduled_CleanUp = SPAWN:New( "Spawn Helicopter Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):InitCleanUp( 60 ):SpawnScheduled( 10, 0 ) -Spawn_Vehicle_Scheduled_CleanUp = SPAWN:New( "Spawn Vehicle Scheduled CleanUp" ):InitLimit( 3, 100 ):InitRandomizeRoute( 1, 1, 1000 ):SpawnScheduled( 10, 0 ) - diff --git a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz b/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz deleted file mode 100644 index e2dd1ef..0000000 Binary files a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/SPA-100 - Air Ops - CleanUp of Inactive Units.miz and /dev/null differ diff --git a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 b/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 b/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-100 - Air Ops - CleanUp of Inactive Units/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua b/Moose_Missions/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua deleted file mode 100644 index 1ff4c90..0000000 --- a/Moose_Missions/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.lua +++ /dev/null @@ -1,17 +0,0 @@ ---- --- Tests Gudauta --- ------------- --- Limited scheduled spawning of groups... -Spawn_Plane_Limited_Scheduled = SPAWN:New( "Spawn Plane Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) -Spawn_Helicopter_Limited_Scheduled = SPAWN:New( "Spawn Helicopter Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 30, 0 ) -Spawn_Ground_Limited_Scheduled = SPAWN:New( "Spawn Vehicle Limited Scheduled" ):InitLimit( 4, 20 ):SpawnScheduled( 90, 0 ) - ---- --- Tests Sukhumi --- ------------- --- Limited scheduled spawning of groups with destruction... -Spawn_Plane_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Plane Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) -Spawn_Helicopter_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Helicopter Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) -Spawn_Vehicle_Limited_Scheduled_RandomizeRoute = SPAWN:New( "Spawn Vehicle Limited Scheduled Destroy" ):InitLimit( 4, 20 ):SpawnScheduled( 10, 0 ) - - diff --git a/Moose_Missions/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz b/Moose_Missions/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz deleted file mode 100644 index 2717e4a..0000000 Binary files a/Moose_Missions/SPA-110 - Limit Spawning/SPA-110 - Limit Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA-110 - Limit Spawning/pack.ps1 b/Moose_Missions/SPA-110 - Limit Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-110 - Limit Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-110 - Limit Spawning/unpack.ps1 b/Moose_Missions/SPA-110 - Limit Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-110 - Limit Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua b/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua deleted file mode 100644 index 4583954..0000000 --- a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: SPA-120 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit --- Author: FlightControl --- Date Created: 05 Feb 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- One airplane and one helicopter will be spawned. --- Only one airplane and one helicopter can be alive at the same time. --- Upon landing, the airplane and helicopter will respawn at Kutaisi. --- --- # Test cases: --- --- 1. Observe the spawning of the airplane and helicopter --- 2. There should not be more airplanes alive than there are set by InitLimit. --- 3. Upon landing, the planes should respawn. --- 5. The plane should respawn itself when the air unit has parked at the ramp or has landed. - - -do - - -- Declare SPAWN objects - Spawn_Plane = SPAWN:New("Plane"):InitLimit( 2, 0 ) - - -- Choose repeat functionality - - -- Repeat on ... (when landed on the airport) - Spawn_Plane:InitRepeatOnEngineShutDown() - - -- Now SPAWN the GROUPs - Spawn_Plane:SpawnScheduled(30,0) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz b/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz deleted file mode 100644 index dd2dea4..0000000 Binary files a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit.miz and /dev/null differ diff --git a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 b/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 b/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-120 - Air Ops - Scheduled Spawn with Repeat on Landing with Limit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz b/Moose_Missions/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz deleted file mode 100644 index f4b87a5..0000000 Binary files a/Moose_Missions/SPA-120 - Repeat Spawning/SPA-120 - Repeat Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA-120 - Repeat Spawning/pack.ps1 b/Moose_Missions/SPA-120 - Repeat Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-120 - Repeat Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-120 - Repeat Spawning/unpack.ps1 b/Moose_Missions/SPA-120 - Repeat Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-120 - Repeat Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua b/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua deleted file mode 100644 index 6d3e326..0000000 --- a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.lua +++ /dev/null @@ -1,52 +0,0 @@ ---- --- Name: SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit --- Author: FlightControl --- Date Created: 05 Feb 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- Multiple airplanes will be spawned at a scheduled interval. --- There is a limit on how many airplanes can be alive at the same time. --- Upon landing, the airplanes will respawn at Kutaisi. --- --- # Test cases: --- --- 1. Observe the spawning of the airplanes --- 2. There should not be more airplanes alive than there are set by InitLimit. --- 3. Upon landing, the planes should respawn. --- 4. The KA-50 and the C-101EB should respawn itself directly when landed. --- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. - - -do - - -- Declare SPAWN objects - Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 2, 10 ) - Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 2, 10 ) - Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 2, 10 ) - Spawn_A_10C = SPAWN:New("A-10C") - :InitLimit( 2, 10 ) - - -- Choose repeat functionality - - -- Repeat on landing - Spawn_KA_50:InitRepeatOnLanding() - Spawn_KA_50:InitDelayOff() - - Spawn_C_101EB:InitRepeatOnLanding() - Spawn_C_101EB:InitDelayOff() - - -- Repeat on enging shutdown (when landed on the airport) - Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() - Spawn_A_10C:InitRepeatOnEngineShutDown() - - -- Now SPAWN the GROUPs - Spawn_KA_50:SpawnScheduled(180,0) - Spawn_C_101EB:SpawnScheduled(180,0) - Spawn_MI_8MTV2:SpawnScheduled(180,0) - Spawn_A_10C:SpawnScheduled(180,0) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz b/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz deleted file mode 100644 index c0f441a..0000000 Binary files a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit.miz and /dev/null differ diff --git a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 b/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 b/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-121 - Air Ops - Scheduled Spawns with Repeat on Landing with Limit/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua b/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua deleted file mode 100644 index 90be1f7..0000000 --- a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.lua +++ /dev/null @@ -1,48 +0,0 @@ ---- --- Name: SPA-122 - Air Ops - OnLand test for Scheduled Spawns --- Author: FlightControl --- Date Created: 21 Mar 2017 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- An airplane is spawned at a scheduled interval. --- There is a limit on how many airplanes can be alive at the same time. --- Upon landing, the airplane will respawn in the air. --- --- # Test cases: --- --- 1. Observe the spawning of the airplanes --- 2. There should not be more airplanes alive than there are set by InitLimit. --- 3. Upon landing, the planes should respawn. --- 4. The KA-50 and the C-101EB should respawn itself directly when landed. --- 5. the MI-8MTV2 and the A-10C should respawn itself when the air unit has parked at the ramp. - - -do - - -- Declare SPAWN objects - Spawn_KA_50 = SPAWN:New("KA-50"):InitLimit( 1, 0 ) - Spawn_MI_8MTV2 = SPAWN:New("MI-8MTV2"):InitLimit( 1, 0 ) - Spawn_C_101EB = SPAWN:New("C-101EB"):InitLimit( 1, 0 ) - Spawn_A_10C = SPAWN:New("A-10C"):InitLimit( 1, 0 ) - - -- Choose repeat functionality - - -- Repeat on landing - Spawn_KA_50:InitRepeatOnLanding() - Spawn_C_101EB:InitRepeatOnLanding() - - -- Repeat on enging shutdown (when landed on the airport) - Spawn_MI_8MTV2:InitRepeatOnEngineShutDown() - Spawn_A_10C:InitRepeatOnEngineShutDown() - - -- Now SPAWN the GROUPs - Spawn_KA_50:SpawnScheduled(30,0) - Spawn_C_101EB:SpawnScheduled(30,0) - Spawn_MI_8MTV2:SpawnScheduled(30,0) - Spawn_A_10C:SpawnScheduled(30,0) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz b/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz deleted file mode 100644 index 7f64b03..0000000 Binary files a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/SPA-122 - Air Ops - OnLand test for Scheduled Spawns.miz and /dev/null differ diff --git a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 b/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 b/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-122 - Air Ops - OnLand test for Scheduled Spawns/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua b/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua deleted file mode 100644 index e7b8229..0000000 --- a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: SPA-123 - Air Ops - Repeat on Landing and InitCleanUp --- Author: FlightControl --- Date Created: 15 Sep 2018 --- Checked in 15 dez 2020 by ZERO --- --- # Situation: --- --- Helicpters spawn and are lightly shot until the crash land, but don't really destroy. --- The should be respawned after a while. --- No performance overhead should be noticed. - -do - - -- Declare SPAWN objects - Spawn_KA_50 = SPAWN:New("KA-50") - :InitLimit( 2, 0 ) - - -- Choose repeat functionality - - -- Repeat on landing - Spawn_KA_50:InitRepeatOnLanding() - Spawn_KA_50:InitDelayOff() - Spawn_KA_50:InitCleanUp( 300 ) - Spawn_KA_50:SpawnScheduled( 180, 0.2 ) - - -- Now run the mission and observe the behaviour. - -end diff --git a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz b/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz deleted file mode 100644 index be407c1..0000000 Binary files a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp.miz and /dev/null differ diff --git a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 b/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 b/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-123 - Air Ops - Repeat on Landing and InitCleanUp/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.lua b/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.lua deleted file mode 100644 index a3f8eb6..0000000 --- a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.lua +++ /dev/null @@ -1,52 +0,0 @@ ----------------------------------------------------------------------- ---SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup() Escort Task ----------------------------------------------------------------------- - --////////////////////////////////// - --////////////Tankers and awacs v1 - --////////////////////////////////// ---////////// By Targs35 ///////////// ---//////////////// from 62nd Air Wing, Brisbane server.. ---/////////////////////////////////// - ------- With thanks to the guys at MOOSE and in particular Pikes, Nolove, Delta99 and Wingthor - -- Funky Frank is the man.. ------//////////////////////////////// ---/////////// Spawn Tanker and Escorts /// - - do - - local PointVec1 = POINT_VEC3:New( -100, 20, 80 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group - local PointVec2 = POINT_VEC3:New( -100, 20, 150 ) -- This is a Vec3 class - defines the position of the escorts relative to the escorted group - - --Create Spawn Groups, use the OnSpawnGroup() function to spawn two escorts and task them - - local Tanker_Texaco = SPAWN - :New("Tanker_Texaco_Droge") - :InitLimit( 1, 2 ) -- spawn 1 *alive* units max - :InitCleanUp( 240 ) - :OnSpawnGroup(function (tanker) -- tanker contains the GROUP object when the tanker spawns - local Escort_Texaco_1 = SPAWN - :New("Escort_Texaco_F14 001") - :InitLimit( 1, 2 ) - :InitCleanUp( 240 ) - :OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns - local FollowDCSTask1 = spawndgroup:TaskFollow( tanker, PointVec1 ) -- create task - spawndgroup:SetTask( FollowDCSTask1, 1 ) -- push task on the GROUP - end - ) - :SpawnScheduled( 60, 0.5 ) - - local Escort_Texaco_2 = SPAWN - :New("Escort_Texaco_F14 002") - :InitLimit( 1, 2 ) - :InitCleanUp( 240 ) - :OnSpawnGroup(function (spawndgroup) -- spawndgrp contains the GROUP object when the escort spawns - local FollowDCSTask2 = spawndgroup:TaskFollow( tanker, PointVec2 ) - spawndgroup:SetTask( FollowDCSTask2, 1 ) - end - ) - :SpawnScheduled( 60, 0.5 ) - end - ) - :SpawnScheduled( 60, 0.5 ) - -end diff --git a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.miz b/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.miz deleted file mode 100644 index 678072b..0000000 Binary files a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup.miz and /dev/null differ diff --git a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/pack.ps1 b/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/unpack.ps1 b/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/SPA-124 - Air Ops - Scheduled Spawns with OnSpawnGroup/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua b/Moose_Missions/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua deleted file mode 100644 index 6eb08c7..0000000 --- a/Moose_Missions/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- --- Name: SPA-130 - Uncontrolled Spawning --- Author: FlightControl --- Date Created: 04 Feb 2017 --- --- # Situation: --- --- A plane will be spawned Uncontrolled and later one will be spawned Controlled. --- Only the Controlled plane will move, the other will remain idle at the parking spot. --- --- # Test cases: --- --- 1. Observe the spawning of the UnControlled Plane. --- 2. Observe the spawning of the Controlled Plane. - - --- Create the SPAWN object looking for the group (template) "Plane". -SpawnPlane = SPAWN:New( "Plane" ) - --- Set the spawn mode to UnControlled. -SpawnPlane:InitUnControlled( true ) - --- Spawn the UnControlled Group -UnControlledPlane = SpawnPlane:Spawn() - --- Set the spawn mode back to Controlled. -SpawnPlane:InitUnControlled( false ) - -ControlledPlane = SpawnPlane:Spawn() - --- Now, let's create a menu option at a player slot plane... --- We can only create the menu option if the player has joined the slot ... -PlayerPlane = CLIENT:FindByName( "PlayerPlane", "Select Menu item to activate UnControlled plane" ) - -PlayerPlane:Alive( - function( Client, SpawnPlane ) - - --- @param Functional.Spawn#SPAWN SpawnPlane - local function ActivatePlane( SpawnPlane ) - SpawnPlane:InitUnControlled( false ) - SpawnPlane:ReSpawn( 1 ) - end - - local Menu = MENU_CLIENT_COMMAND:New( Client, "Select to activate UnControlled plane", nil, ActivatePlane, SpawnPlane ) - end - , SpawnPlane -) \ No newline at end of file diff --git a/Moose_Missions/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz b/Moose_Missions/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz deleted file mode 100644 index d61159f..0000000 Binary files a/Moose_Missions/SPA-130 - Uncontrolled Spawning/SPA-130 - Uncontrolled Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPA-130 - Uncontrolled Spawning/pack.ps1 b/Moose_Missions/SPA-130 - Uncontrolled Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-130 - Uncontrolled Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-130 - Uncontrolled Spawning/unpack.ps1 b/Moose_Missions/SPA-130 - Uncontrolled Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-130 - Uncontrolled Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua b/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua deleted file mode 100644 index b7b1df3..0000000 --- a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - Nevada - SpawnAtAirbase.lua +++ /dev/null @@ -1,11 +0,0 @@ --- Name: SPA-131 - Air Ops - SpawnAtAirbase --- Author: FlightControl --- Date Created: 14 Sep 2017 --- -Spawn_Plane = SPAWN:New( "Plane" ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Cold ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Hot ) -Spawn_Plane:SpawnAtAirbase( AIRBASE:FindByName( AIRBASE.Nevada.Groom_Lake_AFB ), SPAWN.Takeoff.Runway ) - - - diff --git a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz b/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz deleted file mode 100644 index 054254c..0000000 Binary files a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/SPA-131 - Air Ops - SpawnAtAirbase.miz and /dev/null differ diff --git a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 b/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 b/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-131 - Air Ops - SpawnAtAirbase/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua b/Moose_Missions/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua deleted file mode 100644 index e882ddc..0000000 --- a/Moose_Missions/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.lua +++ /dev/null @@ -1,20 +0,0 @@ ---- --- Name: SPA-140 - Spawn Client Slots --- Author: FlightControl --- Date Created: 30 Aug 2017 --- Checked in 15 dez 2020 by ZERO (doesn't work) --- --- # Situation: --- --- A plane will be spawned Uncontrolled and later one will be spawned Controlled. --- Only the Controlled plane will move, the other will remain idle at the parking spot. --- --- # Test cases: --- - --- Create the SPAWN object looking for the group (template) "Plane". -SpawnPlane = SPAWN:New( "Plane" ) - --- Spawn the UnControlled Group -UnControlledPlane = SpawnPlane:SpawnClientAtAirbase( AIRBASE:FindByName( AIRBASE.Caucasus.Kutaisi ) ) - diff --git a/Moose_Missions/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz b/Moose_Missions/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz deleted file mode 100644 index b7266e1..0000000 Binary files a/Moose_Missions/SPA-140 - Spawn Client Slots/SPA-140 - Spawn Client Slots.miz and /dev/null differ diff --git a/Moose_Missions/SPA-140 - Spawn Client Slots/pack.ps1 b/Moose_Missions/SPA-140 - Spawn Client Slots/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-140 - Spawn Client Slots/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-140 - Spawn Client Slots/unpack.ps1 b/Moose_Missions/SPA-140 - Spawn Client Slots/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-140 - Spawn Client Slots/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua b/Moose_Missions/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua deleted file mode 100644 index 4302dd3..0000000 --- a/Moose_Missions/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.lua +++ /dev/null @@ -1,11 +0,0 @@ ---- --- Tests Gudauta --- -------------- --- Limited and scheduled spawning of groups, with RandomizeTemplate ... - -Templates = { "Template1", "Template2", "Template3", "Template4" } - -Spawn_Ground1 = SPAWN:New( "Spawn Vehicle1" ):InitLimit( 4, 20 ):InitRandomizeTemplate(Templates):SpawnScheduled( 15, 0 ) -Spawn_Ground2 = SPAWN:New( "Spawn Vehicle2" ):InitLimit( 4, 20 ):InitRandomizeTemplate(Templates):SpawnScheduled( 15, 0 ) - - diff --git a/Moose_Missions/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz b/Moose_Missions/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz deleted file mode 100644 index 5132c9a..0000000 Binary files a/Moose_Missions/SPA-200 - Randomize Unit Types/SPA-200 - Randomize Unit Types.miz and /dev/null differ diff --git a/Moose_Missions/SPA-200 - Randomize Unit Types/pack.ps1 b/Moose_Missions/SPA-200 - Randomize Unit Types/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-200 - Randomize Unit Types/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-200 - Randomize Unit Types/unpack.ps1 b/Moose_Missions/SPA-200 - Randomize Unit Types/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-200 - Randomize Unit Types/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz b/Moose_Missions/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz deleted file mode 100644 index 4f4d1db..0000000 Binary files a/Moose_Missions/SPA-220 - Randomize Zones/SPA-220 - Randomize Zones.miz and /dev/null differ diff --git a/Moose_Missions/SPA-220 - Randomize Zones/pack.ps1 b/Moose_Missions/SPA-220 - Randomize Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-220 - Randomize Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-220 - Randomize Zones/unpack.ps1 b/Moose_Missions/SPA-220 - Randomize Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-220 - Randomize Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua b/Moose_Missions/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua deleted file mode 100644 index f33af11..0000000 --- a/Moose_Missions/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.lua +++ /dev/null @@ -1,52 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundStatics = { "GroundStatic1", "GroundStatic2", "GroundStatic3" } -AirplaneStatics = { "AirplaneStatic1", "AirplaneStatic2", "AirplaneStatic3" } -HelicopterStatics = { "HelicopterStatic1", "HelicopterStatic2", "HelicopterStatic3" } -ShipStatics = { "ShipStatic1", "ShipStatic2", "ShipStatic3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local StaticName = GroundStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnGrounds:SpawnFromUnit( SpawnStatic ) - end - - do - -- Spawn Airplanes - local StaticName = AirplaneStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnAirplanes:SpawnFromUnit( SpawnStatic ) - SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 ) - end - - do - -- Spawn Helicopters - local StaticName = HelicopterStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnHelicopters:SpawnFromUnit( SpawnStatic ) - SpawnHelicopters:SpawnFromUnit( SpawnStatic, 200, 500 ) -- Spawn between 200 and 500 meters. - end - - do - -- Spawn Ships - local StaticName = ShipStatics[ math.random( 1, 3 ) ] - local SpawnStatic = STATIC:FindByName( StaticName ) - SpawnShips:SpawnFromUnit( SpawnStatic ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz b/Moose_Missions/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz deleted file mode 100644 index 1e7e74a..0000000 Binary files a/Moose_Missions/SPA-310 - Spawn at Static position/SPA-310 - Spawn at Static position.miz and /dev/null differ diff --git a/Moose_Missions/SPA-310 - Spawn at Static position/pack.ps1 b/Moose_Missions/SPA-310 - Spawn at Static position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-310 - Spawn at Static position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-310 - Spawn at Static position/unpack.ps1 b/Moose_Missions/SPA-310 - Spawn at Static position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-310 - Spawn at Static position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua b/Moose_Missions/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua deleted file mode 100644 index 01e52ed..0000000 --- a/Moose_Missions/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.lua +++ /dev/null @@ -1,52 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundUnits = { "GroundUnit1", "GroundUnit2", "GroundUnit3" } -AirplaneUnits = { "AirplaneUnit1", "AirplaneUnit2", "AirplaneUnit3" } -HelicopterUnits = { "HelicopterUnit1", "HelicopterUnit2", "HelicopterUnit3" } -ShipUnits = { "ShipUnit1", "ShipUnit2", "ShipUnit3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 10, 3 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local UnitName = GroundUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnGrounds:SpawnFromUnit( SpawnUnit ) - end - - do - -- Spawn Airplanes - local UnitName = AirplaneUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnAirplanes:SpawnFromUnit( SpawnUnit ) - SpawnAirplanes:SpawnFromUnit( SpawnUnit, 200, 500 ) - end - - do - -- Spawn Helicopters - local UnitName = HelicopterUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnHelicopters:SpawnFromUnit( SpawnUnit ) - SpawnHelicopters:SpawnFromUnit( SpawnUnit, 500, 2000 ) - end - - do - -- Spawn Ships - local UnitName = ShipUnits[ math.random( 1, 3 ) ] - local SpawnUnit = UNIT:FindByName( UnitName ) - SpawnShips:SpawnFromUnit( SpawnUnit ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz b/Moose_Missions/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz deleted file mode 100644 index a63b571..0000000 Binary files a/Moose_Missions/SPA-320 - Spawn at Unit position/SPA-320 - Spawn at Unit position.miz and /dev/null differ diff --git a/Moose_Missions/SPA-320 - Spawn at Unit position/pack.ps1 b/Moose_Missions/SPA-320 - Spawn at Unit position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-320 - Spawn at Unit position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-320 - Spawn at Unit position/unpack.ps1 b/Moose_Missions/SPA-320 - Spawn at Unit position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-320 - Spawn at Unit position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua b/Moose_Missions/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua deleted file mode 100644 index fbb754c..0000000 --- a/Moose_Missions/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.lua +++ /dev/null @@ -1,61 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } -GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } -AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } -HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } -ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ) -SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local ZoneName = GroundZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnGrounds:SpawnFromVec2( SpawnVec3:GetVec2() ) - end - - do - -- Spawn Ground Randomize - local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnRandomizeGrounds:SpawnFromVec2( SpawnVec3:GetVec2() ) - end - - do - -- Spawn Airplanes - local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnAirplanes:SpawnFromVec2( SpawnVec3:GetVec2() ) - SpawnAirplanes:SpawnFromVec2( SpawnVec3:GetVec2(), 200, 500 ) - end - - do - -- Spawn Helicopters - local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnHelicopters:SpawnFromVec2( SpawnVec3:GetVec2() ) - SpawnHelicopters:SpawnFromVec2( SpawnVec3:GetVec2(), 2000, 4000 ) - end - - do - -- Spawn Ships - local ZoneName = ShipZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnShips:SpawnFromVec2( SpawnVec3:GetVec2() ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz b/Moose_Missions/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz deleted file mode 100644 index 9a1ef71..0000000 Binary files a/Moose_Missions/SPA-330 - Spawn at Vec2 position/SPA-330 - Spawn at Vec2 position.miz and /dev/null differ diff --git a/Moose_Missions/SPA-330 - Spawn at Vec2 position/pack.ps1 b/Moose_Missions/SPA-330 - Spawn at Vec2 position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-330 - Spawn at Vec2 position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-330 - Spawn at Vec2 position/unpack.ps1 b/Moose_Missions/SPA-330 - Spawn at Vec2 position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-330 - Spawn at Vec2 position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua b/Moose_Missions/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua deleted file mode 100644 index df0d253..0000000 --- a/Moose_Missions/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.lua +++ /dev/null @@ -1,59 +0,0 @@ - -local Iterations = 10 -local Iteration = 1 - -GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } -GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } -AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } -HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } -ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ) -SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizeUnits( true, 500, 100 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local ZoneName = GroundZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ground Randomize - local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Airplanes - local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Helicopters - local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ships - local ZoneName = ShipZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz b/Moose_Missions/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz deleted file mode 100644 index b705af7..0000000 Binary files a/Moose_Missions/SPA-340 - Spawn at Vec3 position/SPA-340 - Spawn at Vec3 position.miz and /dev/null differ diff --git a/Moose_Missions/SPA-340 - Spawn at Vec3 position/pack.ps1 b/Moose_Missions/SPA-340 - Spawn at Vec3 position/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-340 - Spawn at Vec3 position/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-340 - Spawn at Vec3 position/unpack.ps1 b/Moose_Missions/SPA-340 - Spawn at Vec3 position/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-340 - Spawn at Vec3 position/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua b/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua deleted file mode 100644 index e3ea496..0000000 --- a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.lua +++ /dev/null @@ -1,73 +0,0 @@ ---- --- Name: SPA-350 - Spawn at Vec3 position RandomzePosition --- Author: FlightControl --- Date Created: 14 Mar 2017 --- --- # Situation: --- --- Ground troops, Airplanes, Helicopters and Ships are spawning from Vec3 points. --- The API InitRandomizePosition is tested here, ensure that groups are replaced within a 900 to 1000 zone band at random positions. --- --- # Test cases: --- --- 1. Observe the random positioning of the groups. There should be no scattering of units. --- - -local Iterations = 10 -local Iteration = 1 - -GroundZones = { "GroundZone1", "GroundZone2", "GroundZone3" } -GroundRandomizeZones = { "GroundRandomizeZone1", "GroundRandomizeZone2", "GroundRandomizeZone3" } -AirplaneZones = { "AirplaneZone1", "AirplaneZone2", "AirplaneZone3" } -HelicopterZones = { "HelicopterZone1", "HelicopterZone2", "HelicopterZone3" } -ShipZones = { "ShipZone1", "ShipZone2", "ShipZone3" } - -HeightLimit = 500 - -SpawnGrounds = SPAWN:New("Ground"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnRandomizeGrounds = SPAWN:New("GroundRandomize"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnAirplanes = SPAWN:New("Airplane"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnHelicopters = SPAWN:New("Helicopter"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) -SpawnShips = SPAWN:New("Ship"):InitLimit( 20, 10 ):InitRandomizePosition( true , 1000, 900 ) - ---- Spawns these groups slowly. -SCHEDULER:New( nil, - - function( Interation, Iterations ) - do - -- Spawn Ground - local ZoneName = GroundZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ground Randomize - local ZoneName = GroundRandomizeZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnRandomizeGrounds:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Airplanes - local ZoneName = AirplaneZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnAirplanes:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Helicopters - local ZoneName = HelicopterZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnHelicopters:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - do - -- Spawn Ships - local ZoneName = ShipZones[ math.random( 1, 3 ) ] - local SpawnVec3 = POINT_VEC3:NewFromVec3( ZONE:New( ZoneName ):GetVec3() ) - SpawnShips:SpawnFromVec3( SpawnVec3:GetVec3() ) - end - - end, {}, 0, 15, 0.5 -) diff --git a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz b/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz deleted file mode 100644 index e19b746..0000000 Binary files a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/SPA-350 - Spawn at Vec3 position RandomizePosition.miz and /dev/null differ diff --git a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 b/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 b/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPA-350 - Spawn at Vec3 position RandomizePosition/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.lua b/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.lua deleted file mode 100644 index a533d78..0000000 --- a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.lua +++ /dev/null @@ -1,31 +0,0 @@ ---- Name: SPS-100 - Simple Spawning --- Author: FlightControl --- Date Created: 09 Apr 2017 --- --- # Situation: --- --- At Gudauta spawn a static. --- --- # Test cases: --- --- 1. Observe that the static is spawned. - - -local ZonePosition = ZONE:New( "Position" ) - -local SpawnBuilding = SPAWNSTATIC:NewFromStatic( "Building", country.id.GERMANY ) -local SpawnBarrack = SPAWNSTATIC:NewFromStatic( "Barrack", country.id.GERMANY ) - -local ZonePointVec2 = ZonePosition:GetPointVec2() - -local Building = SpawnBuilding:SpawnFromZone( ZonePosition, 0 ) - -for Heading = 0, 360,60 do - local Radial = Heading * ( math.pi*2 ) / 360 - local x = ZonePointVec2:GetLat() + math.cos( Radial ) * 150 - local y = ZonePointVec2:GetLon() + math.sin( Radial ) * 150 - SpawnBarrack:SpawnFromPointVec2( POINT_VEC2:New( x, y ), Heading + 90 ) -end - - - diff --git a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.miz b/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.miz deleted file mode 100644 index 430c75d..0000000 Binary files a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/SPS-100 - Simple Spawning.miz and /dev/null differ diff --git a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/pack.ps1 b/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/unpack.ps1 b/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SPS - Spawning Statics/SPS-100 - Simple Spawning/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/SRD-100 - SHORAD - Basic Demo.lua b/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/SRD-100 - SHORAD - Basic Demo.lua deleted file mode 100644 index f5106a0..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/SRD-100 - SHORAD - Basic Demo.lua +++ /dev/null @@ -1,25 +0,0 @@ -------------------------------------------------------------------------- --- SRD-100 - SHORAD - Basic Demo -------------------------------------------------------------------------- --- Documentation --- --- SHORAD: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Shorad.html --- --- Note: As of Feb/21, SHORAD is WIP. Needs a recent build of Moose.lua => 2.5.3 --- -------------------------------------------------------------------------- --- Observe a set of Red SAM sites being attacked by Blue SEAD and Helicopters. --- Red SHORAD systems will be switched on for 10 minutes to defend against --- HARMSs and AGMs. --- Red SAMs will try to evade HARMs fired at them. -------------------------------------------------------------------------- --- Date: 16 Feb 2021, Updated 25 Mar 2021 -------------------------------------------------------------------------- - -local SamSet = SET_GROUP:New():FilterPrefixes("Blue SAM"):FilterCoalitions("blue"):FilterStart() --- usage: SHORAD:New(name, prefix, samset, radius, time, coalition) -myshorad = SHORAD:New("BlueShorad", "Blue SHORAD", SamSet, 22000, 600, "blue") -myshorad:SwitchDebug(true) - --- optional - make SAMs evasive (that is, if they can move) -mysead = SEAD:New("Blue SAM") \ No newline at end of file diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/SRD-100 - SHORAD - Basic Demo.miz b/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/SRD-100 - SHORAD - Basic Demo.miz deleted file mode 100644 index 2250ec7..0000000 Binary files a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/SRD-100 - SHORAD - Basic Demo.miz and /dev/null differ diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/pack.ps1 b/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/unpack.ps1 b/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-100 - SHORAD - Basic Demo/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/SRD-110 - SHORAD - Integrate with Mantis.lua b/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/SRD-110 - SHORAD - Integrate with Mantis.lua deleted file mode 100644 index 9383508..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/SRD-110 - SHORAD - Integrate with Mantis.lua +++ /dev/null @@ -1,26 +0,0 @@ -------------------------------------------------------------------------- --- SRD-110 - SHORAD - Integrate with Mantis -------------------------------------------------------------------------- --- Documentation --- --- SHORAD: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/tbd --- --- Note: As of Feb/21, SHORAD is WIP. Needs a recent build of Moose.lua => 2.5.3 --- -------------------------------------------------------------------------- --- Observe a set of Blue SAM sites being attacked by Red SEAD and Helicopters. --- Red SHORAD systems will be switched on for 10 minutes to defend against --- HARMSs and AGMs. --- Blue SAMs will try to evade HARMs fired at them. -------------------------------------------------------------------------- --- Date: 16 Feb 2021, Updated 25 Mar 2021 -------------------------------------------------------------------------- - -local SamSet = SET_GROUP:New():FilterPrefixes("Blue SAM"):FilterCoalitions("blue"):FilterStart() --- usage: SHORAD:New(name, prefix, samset, radius, time, coalition) -myshorad = SHORAD:New("BlueShorad", "Blue SHORAD", SamSet, 22000, 600, "blue") -myshorad:SwitchDebug(true) - -mymantis = MANTIS:New("BlueMantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs") -mymantis:AddShorad(myshorad,720) -mymantis:Start() \ No newline at end of file diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/SRD-110 - SHORAD - Integrate with Mantis.miz b/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/SRD-110 - SHORAD - Integrate with Mantis.miz deleted file mode 100644 index 1d76614..0000000 Binary files a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/SRD-110 - SHORAD - Integrate with Mantis.miz and /dev/null differ diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/pack.ps1 b/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/unpack.ps1 b/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-110 - SHORAD - Integrate with Mantis/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/SRD-120 - SHORAD - Integrate with Detection.lua b/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/SRD-120 - SHORAD - Integrate with Detection.lua deleted file mode 100644 index 35654ee..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/SRD-120 - SHORAD - Integrate with Detection.lua +++ /dev/null @@ -1,36 +0,0 @@ -------------------------------------------------------------------------- --- SRD-120 - SHORAD - Integrate with Detection -------------------------------------------------------------------------- --- Documentation --- --- SHORAD: https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Shorad.html --- --- Note: As of Feb/21, SHORAD is WIP. Needs a recent build of Moose.lua => 2.5.3 --- -------------------------------------------------------------------------- --- Observe a set Red High-Value-Target (HVT) being attacked by Blue CAS. --- Red SHORAD systems will be switched on for 10 minutes to defend against --- HARMSs and AGMs. -------------------------------------------------------------------------- --- Date: 17 Feb 2021, Updated 25 Mar 2021 -------------------------------------------------------------------------- - -local SamSet = SET_GROUP:New():FilterPrefixes("Red HVT"):FilterCoalitions("red"):FilterStart() --- usage: SHORAD:New(name, prefix, samset, radius, time, coalition) -myshorad = SHORAD:New("RedShorad", "Red SHORAD", SamSet, 22000, 600, "red") -myshorad:SwitchDebug(true) - -local dectset = SET_GROUP:New():FilterPrefixes("Red EWR"):FilterCoalitions("red"):FilterStart() -local detection = DETECTION_AREAS:New(dectset,1000) -detection:SetRefreshTimeInterval(15) -detection:SetAcceptZones(ZONE:New("Red HVT Zone")) -- defense zone around our HVT -detection:Start() - --- wake up SHORAD when we detect an attacker -function detection:OnAfterDetected(From,Event,To,Units) - for _,_unit in pairs (Units) do - local text = string.format("Unit detected: %s",_unit:GetName()) - local m = MESSAGE:New(text,10,"Info"):ToAll() - end - myshorad:WakeUpShorad("Red SHORAD", 25000, 600) -end \ No newline at end of file diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/SRD-120 - SHORAD - Integrate with Detection.miz b/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/SRD-120 - SHORAD - Integrate with Detection.miz deleted file mode 100644 index 38f7ec7..0000000 Binary files a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/SRD-120 - SHORAD - Integrate with Detection.miz and /dev/null differ diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/pack.ps1 b/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/unpack.ps1 b/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/SRD - SHORAD Defense/SRD-120 - SHORAD - Integrate with Detection/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - A2A - AREAS detection test.lua b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - A2A - AREAS detection test.lua deleted file mode 100644 index 75bdd7f..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - A2A - AREAS detection test.lua +++ /dev/null @@ -1,73 +0,0 @@ ---- --- Name: TAD-A2A-001 - A2A - AREAS detection test --- Author: FlightControl --- Date Created: 17 May 2017 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Air operations. --- Intruders are flying towards the EWR units. --- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. --- --- # Test cases: --- --- 1. Observe the EWR's detecting targets and grouping them. --- 2. Check that the HQ provides menus to engage on a task set by the EWRs. --- -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -Scoring = SCORING:New( "A2A Dispatching demo" ) - -Mission = MISSION - :New( CommandCenter, "A2A Mission", "High", "Watch the air enemy units being detected.", coalition.side.RED ) - :AddScoring( Scoring ) - -EWRSet = SET_GROUP:New():FilterPrefixes( "EWR Red" ):FilterCoalitions("red"):FilterStart() - -EWRDetection = DETECTION_AREAS:New( EWRSet, 30000 ) -EWRDetection:SetFriendliesRange( 80000 ) -EWRDetection:SetRefreshTimeInterval( 30 ) - - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Defender" ):FilterStart() - -TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) -TaskDispatcher:SetRefreshTimeInterval( 10 ) - -AIDispatcher = AI_A2A_GCICAP:New( { "EWR Blue" } ) - -BlueTemplates = { - "Defender-1", - "Defender-2" - } - -AIDispatcher:SetSquadron( "001", AIRBASE.Caucasus.Batumi, BlueTemplates, 20 ) -AIDispatcher:SetSquadronGci( "001", 600, 800 ) - -AIDispatcher:SetSquadron( "002", AIRBASE.Caucasus.Senaki_Kolkhi, BlueTemplates, 20 ) -AIDispatcher:SetSquadronGci( "002", 600, 800 ) - -AIDispatcher:SetSquadron( "003", AIRBASE.Caucasus.Kobuleti, BlueTemplates,20 ) -AIDispatcher:SetSquadronGci( "003", 600, 800 ) - -AIDispatcher:SetSquadron( "004", AIRBASE.Caucasus.Kutaisi, BlueTemplates, 20 ) -AIDispatcher:SetSquadronGci( "004", 600, 800 ) - - - - ---- @param #TaskDispatcher self --- @param From --- @param Event --- @param To --- @param Tasking.Task_A2A#TASK_A2A Task --- @param Wrapper.Unit#UNIT TaskUnit --- @param #string PlayerName -function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) - Task:SetScoreOnProgress( PlayerName, 20, TaskUnit ) - Task:SetScoreOnSuccess( PlayerName, 200, TaskUnit ) - Task:SetScoreOnFail( PlayerName, -100, TaskUnit ) -end - diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.lua b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.lua deleted file mode 100644 index 75bdd7f..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.lua +++ /dev/null @@ -1,73 +0,0 @@ ---- --- Name: TAD-A2A-001 - A2A - AREAS detection test --- Author: FlightControl --- Date Created: 17 May 2017 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Air operations. --- Intruders are flying towards the EWR units. --- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. --- --- # Test cases: --- --- 1. Observe the EWR's detecting targets and grouping them. --- 2. Check that the HQ provides menus to engage on a task set by the EWRs. --- -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -Scoring = SCORING:New( "A2A Dispatching demo" ) - -Mission = MISSION - :New( CommandCenter, "A2A Mission", "High", "Watch the air enemy units being detected.", coalition.side.RED ) - :AddScoring( Scoring ) - -EWRSet = SET_GROUP:New():FilterPrefixes( "EWR Red" ):FilterCoalitions("red"):FilterStart() - -EWRDetection = DETECTION_AREAS:New( EWRSet, 30000 ) -EWRDetection:SetFriendliesRange( 80000 ) -EWRDetection:SetRefreshTimeInterval( 30 ) - - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Defender" ):FilterStart() - -TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) -TaskDispatcher:SetRefreshTimeInterval( 10 ) - -AIDispatcher = AI_A2A_GCICAP:New( { "EWR Blue" } ) - -BlueTemplates = { - "Defender-1", - "Defender-2" - } - -AIDispatcher:SetSquadron( "001", AIRBASE.Caucasus.Batumi, BlueTemplates, 20 ) -AIDispatcher:SetSquadronGci( "001", 600, 800 ) - -AIDispatcher:SetSquadron( "002", AIRBASE.Caucasus.Senaki_Kolkhi, BlueTemplates, 20 ) -AIDispatcher:SetSquadronGci( "002", 600, 800 ) - -AIDispatcher:SetSquadron( "003", AIRBASE.Caucasus.Kobuleti, BlueTemplates,20 ) -AIDispatcher:SetSquadronGci( "003", 600, 800 ) - -AIDispatcher:SetSquadron( "004", AIRBASE.Caucasus.Kutaisi, BlueTemplates, 20 ) -AIDispatcher:SetSquadronGci( "004", 600, 800 ) - - - - ---- @param #TaskDispatcher self --- @param From --- @param Event --- @param To --- @param Tasking.Task_A2A#TASK_A2A Task --- @param Wrapper.Unit#UNIT TaskUnit --- @param #string PlayerName -function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) - Task:SetScoreOnProgress( PlayerName, 20, TaskUnit ) - Task:SetScoreOnSuccess( PlayerName, 200, TaskUnit ) - Task:SetScoreOnFail( PlayerName, -100, TaskUnit ) -end - diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.miz b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.miz deleted file mode 100644 index af720d9..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/TAD-A2A-000 - AREAS - Detection test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-000 - AREAS - Detection test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.lua b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.lua deleted file mode 100644 index 3cdd368..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: TAD-A2A-010 - AREAS - Intercept Task --- Author: FlightControl --- Date Created: 13 Mar 2017 --- --- This mission demonstrates the dynamic task dispatching for Air to Air operations. --- Intruders are flying towards the EWR units. --- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. --- --- Observe the planes flying towards the EWR. --- Upon detection, an INTERCEPT task should be created. --- Join the task and destroy the intruders. --- Check if the task is successful after destroying the target. --- --- -local HQ = GROUP:FindByName( "HQ", "Bravo" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - -local Scoring = SCORING:New( "A2A Dispatching Demo" ) - -local Mission = MISSION - :New( CommandCenter, "A2A Intercept Mission", "Primary", "INTERCEPT Task Test. Observe the planes flying towards the EWR. Upon detection, an INTERCEPT task should be created. Join the task and destroy the intruders.Check if the task is successful after destroying the target.", coalition.side.RED ) - :AddScoring( Scoring ) - -local EWRSet = SET_GROUP:New():FilterPrefixes( "EWR" ):FilterCoalitions("red"):FilterStart() - -local EWRDetection = DETECTION_AREAS:New( EWRSet, 6000 ) -EWRDetection:SetFriendliesRange( 10000 ) -EWRDetection:SetRefreshTimeInterval( 10 ) - - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) -TaskDispatcher:SetRefreshTimeInterval( 10 ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.miz b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.miz deleted file mode 100644 index cd837b9..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/TAD-A2A-010 - AREAS - Intercept Task.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-010 - AREAS - Intercept Task/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.lua b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.lua deleted file mode 100644 index 1b626ac..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.lua +++ /dev/null @@ -1,47 +0,0 @@ ---- --- Name: TAD-A2A-020 - AREAS - Sweep Task --- Author: FlightControl --- Date Created: 17 May 2017 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Air operations. --- Intruders are flying towards the EWR units. --- The detection method used is the DETECTION_AREAS method, which groups detected targets per detected area. --- --- # Test cases: --- --- Observe the EWR's detecting targets and grouping them. --- Check that the HQ provides menus to engage on a task set by the EWRs. --- Once the intruder is detected, an INTERCEPT task is created. --- Observe that it goes back into the mountains. --- And the task should return to a SWEEP task. --- -local HQ = GROUP:FindByName( "HQ", "Bravo" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - -local Scoring = SCORING:New( "A2A Dispatching Demo" ) - -local Mission = MISSION - :New( CommandCenter, "A2A Sweep Mission", "Primary", - "SWEEP Task Test. " .. - "Observe the EWR's detecting targets and grouping them. " .. - "Check that the HQ provides menus to engage on a task set by the EWRs. " .. - "Once the intruder is detected, an INTERCEPT task is created. " .. - "Observe that it goes back into the mountains. " .. - "And the task should return to a SWEEP task.", - coalition.side.RED ) - :AddScoring( Scoring ) - -local EWRSet = SET_GROUP:New():FilterPrefixes( "EWR" ):FilterCoalitions("red"):FilterStart() - -local EWRDetection = DETECTION_AREAS:New( EWRSet, 6000 ) -EWRDetection:SetFriendliesRange( 10000 ) -EWRDetection:SetRefreshTimeInterval(30) - - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TaskDispatcher = TASK_A2A_DISPATCHER:New( Mission, AttackGroups, EWRDetection ) -TaskDispatcher:SetRefreshTimeInterval( 10 ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.miz b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.miz deleted file mode 100644 index 5d1566e..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/TAD-A2A-020 - AREAS - Sweep Task.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2A - Air 2 Air Task Dispatching/TAD-A2A-020 - AREAS - Sweep Task/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.lua deleted file mode 100644 index 0c1c246..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.lua +++ /dev/null @@ -1,51 +0,0 @@ - --- --- Name: TAD-A2G-000 - AREAS - Detection test --- Author: FlightControl --- Date Created: 15 Mar 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. --- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. --- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. --- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. --- Observe that A2G Tasks are being dispatched to the player. - - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.miz deleted file mode 100644 index 15ef4ac..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/TAD-A2G-000 - AREAS - Detection test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-000 - AREAS - Detection test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.lua deleted file mode 100644 index aea2306..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.lua +++ /dev/null @@ -1,52 +0,0 @@ - --- --- Name: TAD-A2G-001 - AREAS - Destroy Test --- Author: FlightControl --- Date Created: 15 Mar 2018 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. --- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. --- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. --- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. --- Observe that A2G Tasks are being dispatched to the player. --- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets. --- Join the A2G Task that was dispatched to you. --- Once the AI in your group destroys the target, you should see that the A2G task got success. - - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.miz deleted file mode 100644 index 790f538..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/TAD-A2G-001 - AREAS - Destroy Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-001 - AREAS - Destroy Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.lua deleted file mode 100644 index 9376e92..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.lua +++ /dev/null @@ -1,66 +0,0 @@ - --- --- Name: TAD-A2G-002 - AREAS - Task Success Test --- Author: FlightControl --- Date Created: 15 Mar 2018 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. --- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. --- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. --- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. --- Observe that A2G Tasks are being dispatched to the player. --- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets. --- Join the A2G Task that was dispatched to you. --- Once the AI in your group destroys the target, you should see that the A2G task got success. - - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - - - ---- Success Handler OnAfter for TaskDispatcher --- @function [parent=#TaskDispatcher] OnAfterSuccess --- @param #TaskDispatcher self --- @param #string From --- @param #string Event --- @param #string To --- @param Tasking.Task#TASK Task -function TaskDispatcher:OnAfterSuccess( From, Event, To, Task ) - self:E( "Task Success!!!" ) -end - - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.miz deleted file mode 100644 index bb47357..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/TAD-A2G-002 - AREAS - Task Success Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-002 - AREAS - Task Success Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.lua deleted file mode 100644 index bc1b696..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.lua +++ /dev/null @@ -1,50 +0,0 @@ --- Name: TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD --- Author: FlightControl --- Date Created: 05 Dec 2017 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. --- While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! --- This is only applicable for AREA detections. Other detection methods won't have this dynamic. - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", - "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. - "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. - "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. - "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", - coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.miz deleted file mode 100644 index b6a97a9..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-010 - AREAS - Split SEAD to BAI and SEAD/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.lua deleted file mode 100644 index 6917166..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.lua +++ /dev/null @@ -1,50 +0,0 @@ --- Name: TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD --- Author: FlightControl --- Date Created: 05 Dec 2017 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- This test is about a SEAD task, dispatched, that is split into a SEAD and CAS task, when units are moving away from the zone. --- While the units are moving away, monitor if the task is correctly split into a SEAD and CAS task! --- This is only applicable for AREA detections. Other detection methods won't have this dynamic. - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", - "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. - "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. - "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. - "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", - coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.miz deleted file mode 100644 index 3817f2e..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-011 - AREAS - Split SEAD to CAS and SEAD/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.lua deleted file mode 100644 index 1122cdc..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.lua +++ /dev/null @@ -1,52 +0,0 @@ --- Name: TAD-A2G-020 - AREAS - Remain BAI as a Player --- Author: FlightControl --- Date Created: 20 Dec 2017 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS! --- Jump into the helicopter. Fly to the blue targets. They won't fire at you. --- The su-34 will detect the blue targets, but will report a BAI task, even if you are in the helicopter are near to the targets. --- This is a very important aspect of BAI. --- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy. - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", - "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. - "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. - "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. - "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", - coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.miz deleted file mode 100644 index 29c6dc5..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/TAD-A2G-020 - AREAS - Remain BAI as Player.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-020 - AREAS - Remain BAI as Player/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.lua deleted file mode 100644 index cdc3c37..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.lua +++ /dev/null @@ -1,52 +0,0 @@ --- Name: TAD-A2G-021 - AREAS - Remain BAI as AI --- Author: FlightControl --- Date Created: 20 Dec 2017 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- This test is about checking that if a player in the air is approaching a BAI task zone, that the task is not converted to a CAS! --- Jump into the su-25T. The AI Helicopter Attack will fly to the detected blue targets. They won't fire at the helicopters. --- The su-34 will detect the blue targets, but will report a BAI task, even if the AI helicopters is near the targets. --- This is a very important aspect of BAI. --- Only ground units should be considered as friendlies and would convert a task in CAS if near the enemy. - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", - "This mission demonstrates the dynamic task dispatching for Air to Ground operations. " .. - "This test is about a SEAD task, dispatched, that is split into a SEAD and BAI task, when units are moving away from the zone. " .. - "While the units are moving away, monitor if the task is correctly split into a SEAD and BAI task! " .. - "This is only applicable for AREA detections. Other detection methods won't have this dynamic.", - coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_AREAS - :New( RecceSet, 3000 ) -- The RecceSet will detect the enemies, and group them into areas of a 3 km radius. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.miz deleted file mode 100644 index 5164016..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/TAD-A2G-021 - AREAS - Remain BAI as AI.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-021 - AREAS - Remain BAI as AI/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.lua deleted file mode 100644 index 11c30ee..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.lua +++ /dev/null @@ -1,34 +0,0 @@ --- Name: TAD-A2G-090 - AREAS - WWII - Reference Points --- Author: FlightControl --- Date Created: 17 Mar 2017 --- --- Test if the Command Center is working in WWII mode, and that it selects the closest Reference points for each target... --- Join both tasks sequentially (abort when done), and see if the reference points are selected correctly, following the closest ref point logic. --- --- 1. Join the Attack group of RED. --- 2. Wait until the blue tank is detected. --- 3. Three tasks will de defined, CAS and BAI tasks. --- 4. Join each task using the radio menus. --- 5. Observe that the correct WWII compatible reference points are shown. - -local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) -CommandCenter:SetModeWWII() -CommandCenter:SetReferenceZones( "Village" ) - -local Mission = MISSION - :New( CommandCenter, - "Overlord", - "Primary", - "Join each task as a result of the detected targets reported. " .. - "Observe that the correct Targets are reported from the correct reference points! " .. - "\n1. Target #001 -> Village#Dziguri" .. - "\n2. Target #002 -> Village#Horshi" .. - "\n3. Target #003 -> Village#Machkhvareti" - , coalition.side.RED ) - -local RecceSet = SET_GROUP:New():FilterPrefixes( "Recce" ):FilterCoalitions( "red" ):FilterStart() -local DetectionAreas = DETECTION_AREAS:New( RecceSet, 500 ) -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() -TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionAreas ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.miz deleted file mode 100644 index fe7bfd7..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/TAD-A2G-090 - AREAS - WWII - Reference Points.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-090 - AREAS - WWII - Reference Points/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.lua deleted file mode 100644 index b36cd3d..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.lua +++ /dev/null @@ -1,51 +0,0 @@ - --- --- Name: TAD-A2G-100 - TYPES - Detection Test --- Author: FlightControl --- Date Created: 15 Mar 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. --- The detection method used is the DETECTION_TYPES method, which groups detected targets into Unit Types that were detected. --- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. --- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. --- Observe that A2G Tasks are being dispatched to the player. - - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_TYPES - :New( RecceSet ) -- The RecceSet will detect the enemies, and group them into unit types that were detected. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.miz deleted file mode 100644 index 304ab47..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/TAD-A2G-100 - TYPES - Detection Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-100 - TYPES - Detection Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.lua deleted file mode 100644 index 87eb406..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.lua +++ /dev/null @@ -1,35 +0,0 @@ - --- --- Name: TAD-100 - A2G Task Dispatching DETECTION_AREAS --- Author: FlightControl --- Date Created: 06 Mar 2017 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- FACA's and FAC's are patrolling around the battle zone, while detecting targets. --- The detection method used is the DETECTION_AREAS method, which groups detected targets into zones. --- --- # Test cases: --- --- 1. Observe the FAC(A)'s detecting targets and grouping them. --- For test, each zone will have a circle of tyres, that are visible on the map too. --- 2. Check that the HQ provides menus to engage on a task set by the FACs. --- -local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -local Scoring = SCORING:New( "Detect Demo" ) - -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) - :AddScoring( Scoring ) - -local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() - -local FACAreas = DETECTION_TYPES:New( FACSet ) - - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() -TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) - diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.miz deleted file mode 100644 index 9fe18c9..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/TAD-A2G-110 - TYPES - Detection Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-110 - TYPES - Detection Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.lua deleted file mode 100644 index bf6e824..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.lua +++ /dev/null @@ -1,64 +0,0 @@ ---- --- Name: TAD-220 - A2G Task Dispatching per TYPE and SCORING --- Author: FlightControl --- Date Created: 20 Mar 2017 --- --- # Situation: --- --- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations. --- --- # Test cases: --- --- 1. Observe the FAC(A)'s detecting targets and grouping them. --- 2. Check that the HQ provides menus to engage on a task set by the FACs. --- 3. Engage on a task and destroy a target. Check if scoring is given for that target. --- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given. --- 5. Restart the mission, and crash into the ground, check if you can get penalties. --- -local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -local Scoring = SCORING:New( "Detect Demo" ) - -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) - :AddScoring( Scoring ) - -local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() - -local DetectionTypes = DETECTION_TYPES:New( FACSet ) - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, DetectionTypes ) - ---- @param #TaskDispatcher self --- @param From --- @param Event --- @param To --- @param Tasking.Task_A2G#TASK_A2G Task --- @param Wrapper.Unit#UNIT TaskUnit --- @param #string PlayerName -function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) - self:E( "I am in assigned ... " ) - Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 50, TaskUnit ) - Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit ) - Task:SetScoreOnFail( "The task has failed completion!", 100, TaskUnit ) -end - --- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. --- This is just an example, but many more examples can follow... - --- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. --- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion --- too early! - -function Mission:OnBeforeComplete( From, Event, To ) - local Group004 = GROUP:FindByName( "Target #004" ) - if Group004:IsAlive() == false then - Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) - return true - end - return false -end \ No newline at end of file diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.miz deleted file mode 100644 index 2400af9..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/TAD-A2G-120 - TYPES - Scoring.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-120 - TYPES - Scoring/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.lua deleted file mode 100644 index cb710ab..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.lua +++ /dev/null @@ -1,51 +0,0 @@ - --- --- Name: TAD-A2G-200 - UNITS - Detection Test --- Author: FlightControl --- Date Created: 15 Mar 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. --- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit. --- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. --- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. --- Observe that A2G Tasks are being dispatched to the player. - - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. - --- Define the RecceSet that will detect the enemy. -local RecceSet = SET_GROUP - :New() -- Create the RecceSet, which is the set of groups detecting the enemy locations. - :FilterPrefixes( "Recce" ) -- All Recce groups start with the name "Recce". - :FilterCoalitions("red") -- only the red coalition. - :FilterStart() -- Start the dynamic building of the set. - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionAreas = DETECTION_UNITS - :New( RecceSet ) -- The RecceSet will detect the enemies, and group them per detected unit. - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionAreas ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.miz deleted file mode 100644 index 57af3af..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/TAD-A2G-200 - UNITS - Detection Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-200 - UNITS - Detection Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.lua deleted file mode 100644 index 0583165..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.lua +++ /dev/null @@ -1,50 +0,0 @@ ---- --- Name: TAD-120 - A2G Task Dispatching DETECTION_UNITS --- Author: FlightControl --- Date Created: 13 Mar 2017 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- FACA's and FAC's are patrolling around the battle field, while detecting targets. --- The detection method used is the DETECTION_UNITS method, which groups detected targets per detected unit. --- --- # Test cases: --- --- 1. Observe the FAC(A)'s detecting targets and grouping them. --- 2. Check that the HQ provides menus to engage on a task set by the FACs. --- -local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -local Scoring = SCORING:New( "Detect Demo" ) - -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) - :AddScoring( Scoring ) - -local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() - -local FACAreas = DETECTION_UNITS:New( FACSet ) - - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) - --- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. --- This is just an example, but many more examples can follow... - --- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. --- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion --- too early! - -function Mission:OnBeforeComplete( From, Event, To ) - local Group004 = GROUP:FindByName( "Target #004" ) - if Group004:IsAlive() == false then - Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) - return true - end - return false -end \ No newline at end of file diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.miz deleted file mode 100644 index 7acb45b..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/TAD-A2G-210 - UNITS - Detection Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-210 - UNITS - Detection Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.lua deleted file mode 100644 index 157f8b6..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.lua +++ /dev/null @@ -1,64 +0,0 @@ ---- --- Name: TAD-200 - A2G Task Dispatching with SCORING --- Author: FlightControl --- Date Created: 19 Mar 2017 --- --- # Situation: --- --- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations. --- --- # Test cases: --- --- 1. Observe the FAC(A)'s detecting targets and grouping them. --- 2. Check that the HQ provides menus to engage on a task set by the FACs. --- 3. Engage on a task and destroy a target. Check if scoring is given for that target. --- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given. --- 5. Restart the mission, and crash into the ground, check if you can get penalties. --- -local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -local Scoring = SCORING:New( "Detect Demo" ) - -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) - :AddScoring( Scoring ) - -local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() - -local FACAreas = DETECTION_UNITS:New( FACSet ) - - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) - ---- @param #TaskDispatcher self --- @param From --- @param Event --- @param To --- @param Tasking.Task_A2G#TASK_A2G Task --- @param Wrapper.Unit#UNIT TaskUnit --- @param #string PlayerName -function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) - Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit ) - Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit ) - Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit ) -end - --- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. --- This is just an example, but many more examples can follow... - --- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. --- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion --- too early! - -function Mission:OnBeforeComplete( From, Event, To ) - local Group004 = GROUP:FindByName( "Target #004" ) - if Group004:IsAlive() == false then - Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) - return true - end - return false -end \ No newline at end of file diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.miz deleted file mode 100644 index 20d766f..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/TAD-A2G-220 - UNITS - Scoring.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-220 - UNITS - Scoring/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.lua deleted file mode 100644 index edd47b7..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.lua +++ /dev/null @@ -1,65 +0,0 @@ ---- --- Name: TAD-210 - A2G Task Dispatching for AREAS and SCORING --- Author: FlightControl --- Date Created: 19 Mar 2017 --- --- # Situation: --- --- This mission demonstrates the scoring of dynamic task dispatching for Air to Ground operations. --- --- # Test cases: --- --- 1. Observe the FAC(A)'s detecting targets and grouping them. --- 2. Check that the HQ provides menus to engage on a task set by the FACs. --- 3. Engage on a task and destroy a target. Check if scoring is given for that target. --- 4. Engage all targets in the task, and check if mission success is achieved and that a scoring is given. --- 5. Restart the mission, and crash into the ground, check if you can get penalties. --- -local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -local Scoring = SCORING:New( "Detect Demo" ) - -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) - :AddScoring( Scoring ) - -local FACSet = SET_GROUP:New():FilterPrefixes( "FAC" ):FilterCoalitions("red"):FilterStart() - -local FACAreas = DETECTION_AREAS:New( FACSet, 400 ) -FACAreas:BoundDetectedZones() - - -local AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TaskDispatcher = TASK_A2G_DISPATCHER:New( Mission, AttackGroups, FACAreas ) - ---- @param #TaskDispatcher self --- @param From --- @param Event --- @param To --- @param Tasking.Task_A2G#TASK_A2G Task --- @param Wrapper.Unit#UNIT TaskUnit --- @param #string PlayerName -function TaskDispatcher:OnAfterAssign( From, Event, To, Task, TaskUnit, PlayerName ) - Task:SetScoreOnProgress( "Player " .. PlayerName .. " destroyed a target", 20, TaskUnit ) - Task:SetScoreOnSuccess( "The task has been successfully completed!", 200, TaskUnit ) - Task:SetScoreOnFail( "The task has failed completion!", -100, TaskUnit ) -end - --- Now this is REALLY neat. I set the goal of the mission to be the destruction of Target #004. --- This is just an example, but many more examples can follow... - --- Every time a Task becomes Successful, it will trigger the Complete event in the Mission. --- The mission designer NEED TO OVERRIDE the OnBeforeComplete to prevent the mission from getting into completion --- too early! - -function Mission:OnBeforeComplete( From, Event, To ) - local Group004 = GROUP:FindByName( "Target #004" ) - if Group004:IsAlive() == false then - Mission:GetCommandCenter():MessageToCoalition( "Mission Complete!" ) - return true - end - return false -end \ No newline at end of file diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.miz deleted file mode 100644 index 75d2409..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/TAD-A2G-320 - AREAS - Scoring.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-320 - AREAS - Scoring/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/TAD-A2G-601 - ZONES - Destroy.lua b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/TAD-A2G-601 - ZONES - Destroy.lua deleted file mode 100644 index 789f16d..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/TAD-A2G-601 - ZONES - Destroy.lua +++ /dev/null @@ -1,47 +0,0 @@ - --- --- Name: TAD-A2G-001 - AREAS - Destroy Test --- Author: FlightControl --- Date Created: 15 Mar 2018 --- --- This mission demonstrates the dynamic task dispatching for Air to Ground operations. --- Reconnassance vehicles are placed at strategic locations, scanning for the enemy locations. --- The detection method used is the DETECTION_AREAS method, which groups detected targets into areas. --- The AttackSet will engage upon the enemy, which is a Set of Groups seated by Players. --- A2G Tasks are being dispatched to the Players as enemy locations are being detected by the Recce. --- Observe that A2G Tasks are being dispatched to the player. --- Get seated in the Attack Plane, there is also an AI with you, who will attack the ground targets. --- Join the A2G Task that was dispatched to you. --- Once the AI in your group destroys the target, you should see that the A2G task got success. - - --- Declare the Command Center -local HQ = GROUP - :FindByName( "HQ", "Bravo HQ" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) -- Create the CommandCenter. - --- Declare the Mission for the Command Center. -local Mission = MISSION - :New( CommandCenter, "Overlord", "High", "Attack Detect Mission Briefing", coalition.side.RED ) -- Create the Mission. - - --- Setup the detection. We use DETECTION_AREAS to detect and group the enemies. -local DetectionSetZones = SET_ZONE:New():FilterPrefixes( { "Detection Zone Blue" } ):FilterOnce() - -local DetectionZones = DETECTION_ZONES:New( DetectionSetZones, coalition.side.BLUE ) - --- Setup the AttackSet, which is a SET_GROUP. --- The SET_GROUP is a dynamic collection of GROUP objects. -local AttackSet = SET_GROUP - :New() -- Create the SET_GROUP object. - :FilterCoalitions( "red" ) -- Only incorporate the RED coalitions. - :FilterPrefixes( "Attack" ) -- Only incorporate groups that start with the name Attack. - :FilterStart() -- Start the dynamic building of the set. - --- Now we have everything to setup the main A2G TaskDispatcher. -TaskDispatcher = TASK_A2G_DISPATCHER - :New( Mission, AttackSet, DetectionZones ) -- We assign the TaskDispatcher under Mission. The AttackSet will engage the enemy and will recieve the dispatched Tasks. The DetectionAreas will report any detected enemies to the TaskDispatcher. - --- We use the MISSILETRAINER for demonstration purposes. -MissileTrainer = MISSILETRAINER:New( 100, "Missiles will be destroyed for training when they reach your plane." ) diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/TAD-A2G-601 - ZONES - Destroy.miz b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/TAD-A2G-601 - ZONES - Destroy.miz deleted file mode 100644 index 4a34228..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/TAD-A2G-601 - ZONES - Destroy.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/A2G - Air 2 Ground Task Dispatching/TAD-A2G-601 - ZONES - Destroy/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/TAD-CAP-000 - Capture Zone Test.lua b/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/TAD-CAP-000 - Capture Zone Test.lua deleted file mode 100644 index d4229af..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/TAD-CAP-000 - Capture Zone Test.lua +++ /dev/null @@ -1,117 +0,0 @@ - -do -- Setup the Command Centers - - US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" ) - RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "CCCP HQ" ) - -end - -do -- Missions - - US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary", - "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" .. - "There are five random capture zones located at the airbase.\n" .. - "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " .. - "and occupy each capture zone with a platoon.\n " .. - "Your orders are to hold position until all capture zones are taken.\n" .. - "Use the map (F10) for a clear indication of the location of each capture zone.\n" .. - "Note that heavy resistance can be expected at the airbase!\n" .. - "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!" - , coalition.side.RED) - - US_Score = SCORING:New( "CAZ-001 - Capture Zone" ) - - US_Mission_EchoBay:AddScoring( US_Score ) - - US_Mission_EchoBay:Start() - -end - - -Players = SET_GROUP:New():FilterPrefixes( "Player" ):FilterStart() - -TaskCaptureZoneDispatcher = TASK_CAPTURE_DISPATCHER:New( US_Mission_EchoBay, Players ) - - ---- define the capture zone - -CaptureZone = ZONE:New( "Alpha-001" ) - -ZoneCaptureCoalition = ZONE_CAPTURE_COALITION:New( CaptureZone, coalition.side.RED ) - - ---- @param Functional.ZoneCaptureCoalition#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterGuarded( From, Event, To ) - if From ~= To then - local Coalition = self:GetCoalition() - self:E( { Coalition = Coalition } ) - if Coalition == coalition.side.BLUE then - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red ) - RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterEmpty() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.Green ) - US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) -end - - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterAttacked() - ZoneCaptureCoalition:Smoke( SMOKECOLOR.White ) - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end -end - ---- @param Functional.Protect#ZONE_CAPTURE_COALITION self -function ZoneCaptureCoalition:OnEnterCaptured() - local Coalition = self:GetCoalition() - self:E({Coalition = Coalition}) - if Coalition == coalition.side.BLUE then - RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - else - US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information ) - end - - self:AddScore( "Captured", "Zone captured: Extra points granted.", 200 ) - - self:__Guard( 30 ) -end - -ZoneCaptureCoalition:MonitorDestroyedUnits() -ZoneCaptureCoalition:__Guard( 1 ) -ZoneCaptureCoalition:Start( 5, 15 ) - --- Create the tasks under the mission - -local ZoneCaptureGroupSet = SET_GROUP:New():FilterCoalitions("blue"):FilterStart() - - --- create the capture zone task. - -US_Task_Zone_Capture = TaskCaptureZoneDispatcher:AddCaptureZoneTask( "Capture Zone", ZoneCaptureCoalition, "Capture the zone" ) - -US_CC:SetAutoAssignTasks( true ) -US_CC:SetAutoAcceptTasks( true ) - - - - diff --git a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/TAD-CAP-000 - Capture Zone Test.miz b/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/TAD-CAP-000 - Capture Zone Test.miz deleted file mode 100644 index 074f57f..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/TAD-CAP-000 - Capture Zone Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CAP - Capture Task Dispatching/TAD-CAP-000 - Capture Zone Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.lua deleted file mode 100644 index 874d590..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: TAD-CGO-000 - CSAR Test --- Author: FlightControl --- Date Created: 31 Mar 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo CSAR operations. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED ) - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups ) - -TaskDispatcher:StartCSARTasks( - "CSAR", - { ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) }, - "One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" .. - "Use the radio menu to let the command center assist you with the CSAR tasking." -) - -function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) - - MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() - -end diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.miz deleted file mode 100644 index c923c48..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/TAD-CGO-000 - CSAR Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-000 - CSAR Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.lua deleted file mode 100644 index 2a72479..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.lua +++ /dev/null @@ -1,50 +0,0 @@ ---- --- Name: TAD-CGO-001 - Transport Test --- Author: FlightControl --- Date Created: 31 Mar 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations. - - -local HQ = GROUP:FindByName( "HQ", "Bravo" ) - -local CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -local Mission = MISSION - :New( CommandCenter, "Infantry Transportation", "Tactical", - "Board the engineers into your MIL-8MTV.", coalition.side.RED ) - --- Within the mission file, there is a helicopter defined with a player slot (client). --- It has the name "Transport Helicopter". --- The SET_GROUP filter will search for all groups that start with the name "Transport" and will add them to the set. --- The TransportGroups object of type SET_GROUP will be added to the TaskDispatcher as a parameter, to indicate the groups that will transport the cargo. -local TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() - --- This is the task dispatcher main object! --- It takes a role in the Mission, for the pilots seated in TransportGroups. -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - --- This zone indicates the location where the engineers can be transported towards. --- After boarding the engineers, the pilot can ask the HQ to provide routing assistance towards this zone. -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Stadium" ) ) - - --- Here we define the "cargo set", which is a collection of cargo objects. --- The cargo set will be the input for the cargo transportation task. --- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. -local EngineersSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - --- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. --- We name this group "Engineers", and is of type "SAM Engineers". --- The cargoset "EngineersSet" will embed all defined cargo of type Engineers (prefix) into its set. -local EngineerGroup1 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#001" ), "Engineers", "SAM Engineers 1", 500 ) -local EngineerGroup2 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#002" ), "Engineers", "SAM Engineers 2", 500 ) -local EngineerGroup3 = CARGO_GROUP:New( GROUP:FindByName( "Engineers#003" ), "Engineers", "SAM Engineers 3", 500 ) - --- -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport", EngineersSet, "Transport the SAM Engineers and its equipment to the Stadium." ) - - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.miz deleted file mode 100644 index 3f2e98d..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/TAD-CGO-001 - Transport Test.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-001 - Transport Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.lua deleted file mode 100644 index 6829b41..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.lua +++ /dev/null @@ -1,40 +0,0 @@ ---- --- Name: TAD-CGO-002 - Transport Test - Crate --- Author: FlightControl --- Date Created: 04 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Hangar" ) ) - - --- Here we define the "cargo set", which is a collection of cargo objects. --- The cargo set will be the input for the cargo transportation task. --- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. -local CargoSet = SET_CARGO:New():FilterTypes( "Crates" ):FilterStart() - --- Now we add cargo into the battle scene. -local CrateStatic = STATIC:FindByName( "Crate" ) - --- CARGO_CRATE can be used to setup cargo as a crate or any other static cargo object. --- We name this group "Important things", and is of type "Crates". --- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set. -local CrateCargo = CARGO_CRATE:New( CrateStatic, "Crates", "Important things", 1000, 25 ) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Crates", CargoSet, "Transport the Crates near the Hangar." ) - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.miz deleted file mode 100644 index ee90f83..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/TAD-CGO-002 - Transport Test - Crate.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-002 - Transport Test - Crate/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.lua deleted file mode 100644 index b5417a7..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.lua +++ /dev/null @@ -1,49 +0,0 @@ ---- --- Name: TAD-CGO-003 - Transport Test - Infantry and Crate --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate and infantry. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Hangar" ) ) - - --- Now we add cargo into the battle scene. -local CrateStatic = STATIC:FindByName( "Crate" ) - --- CARGO_CRATE can be used to setup cargo as a crate or any other static cargo object. --- We name this group "Important things", and is of type "Crates". --- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set. -local CrateCargo = CARGO_CRATE:New( CrateStatic, "Football", "Important things", 1000, 25 ) - --- Here we define the "cargo set", which is a collection of cargo objects. --- The cargo set will be the input for the cargo transportation task. --- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. -local FootballSet = SET_CARGO:New():FilterTypes( "Football" ):FilterStart() - --- Now we add cargo into the battle scene. -local FootballGroup = GROUP:FindByName( "Anderlecht#001" ) - --- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. --- We name this group "FC Anderlecht", and is of type "Football Players". --- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. -local FootballPlayerGroup = CARGO_GROUP:New( FootballGroup, "Football", "FC Anderlecht", 500 ) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", FootballSet, "Transport FC Anderlecht and the equipment near the Hangar." ) - - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.miz deleted file mode 100644 index d8a0a2d..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/TAD-CGO-003 - Transport Test - Infantry and Crate.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-003 - Transport Test - Infantry and Crate/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.lua deleted file mode 100644 index 3c9b373..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.lua +++ /dev/null @@ -1,50 +0,0 @@ ---- --- Name: TAD-CGO-004 - Transport Test - Infantry and Slingload --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of a crate and infantry. --- Slingload the concrete and board the infantry. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) ) - - --- Now we add cargo into the battle scene. -local CrateStatic = STATIC:FindByName( "Tetrapod" ) - --- CARGO_SLINGLOAD can be used to setup cargo as a crate or any other static cargo object. --- We name this group "Important Concrete", and is of type "Workmaterials". --- The cargoset "CargoSet" will embed all defined cargo of type Crates into its set. -local CrateCargo = CARGO_SLINGLOAD:New( CrateStatic, "Workmaterials", "Concrete", 1000, 25 ) - --- Here we define the "cargo set", which is a collection of cargo objects. --- The cargo set will be the input for the cargo transportation task. --- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. -local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() - --- Now we add cargo into the battle scene. -local WorkerGroup = GROUP:FindByName( "Workers" ) - --- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. --- We name this group "Workers", and is of type "Workmaterials". --- The cargoset "CargoSet" will embed all defined cargo of type Workmaterials (prefix) into its set. -local WorkerCargoGroup = CARGO_GROUP:New( WorkerGroup, "Workmaterials", "Workers", 500 ) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers and the equipment near the Workplace." ) - - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.miz deleted file mode 100644 index 39e8e6a..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/TAD-CGO-004 - Transport Test - Infantry and Slingload.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-004 - Transport Test - Infantry and Slingload/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.lua deleted file mode 100644 index f4bef79..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.lua +++ /dev/null @@ -1,51 +0,0 @@ ---- --- Name: TAD-CGO-005 - Transport Test - Various Cargo --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.BLUE ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) ) - - -local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() - -local WorkerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Workers" ), "Workmaterials", "Workers", 250 ) -WorkerCargoGroup:ReportSmoke( SMOKECOLOR.Green ) - -local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 100 ) -EngineerCargoGroup:ReportSmoke( SMOKECOLOR.Red ) - -local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 100, 25 ) -ConcreteCargo:ReportSmoke( SMOKECOLOR.White ) - -local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 50, 25 ) -CrateCargo:ReportSmoke( SMOKECOLOR.Orange ) - -local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 25 ) -EnginesCargo:ReportFlare( FLARECOLOR.Red ) - -local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Workmaterials", "Fuel", 200, 25 ) -FuelCargo:ReportFlare( FLARECOLOR.Green ) - -local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 500, 25 ) -MetalCargo:ReportFlare( FLARECOLOR.Yellow ) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers, engineers and the equipment near the Workplace." ) - - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.miz deleted file mode 100644 index f64e69d..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/TAD-CGO-005 - Transport Test - Various Cargo.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-005 - Transport Test - Various Cargo/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.lua deleted file mode 100644 index 8099bb2..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.lua +++ /dev/null @@ -1,38 +0,0 @@ ---- --- Name: TAD-CGO-006 - Transport Test - Multiple Clients --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation SandStorm", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - -TaskDispatcher:SetDefaultDeployZone( ZONE:New( "Workplace" ) ) - - -local CargoSet = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() - -local WorkerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Workers" ), "Workmaterials", "Workers", 250 ) -local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 100 ) -local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 100, 50 ) -local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ) -local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ) -local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Workmaterials", "Fuel", 150, 50 ) -local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport Team", CargoSet, "Transport the workers, engineers and the equipment near the Workplace." ) - - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.miz deleted file mode 100644 index f0ed211..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/TAD-CGO-006 - Transport Test - Multiple Clients.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-006 - Transport Test - Multiple Clients/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.lua deleted file mode 100644 index 430921d..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.lua +++ /dev/null @@ -1,53 +0,0 @@ ---- --- Name: TAD-CGO-007 - Transport Test - Cargo Fun --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - - - -local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() -local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ) -local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ) -local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ) -local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ) -local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Transport workmaterials", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) -TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) - -local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() -local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ) -local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ) -local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ) - -local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) -TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) - - -local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() -local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ) -local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ) -local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ) -local GoodCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 ) -local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 ) - -local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) -TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.miz deleted file mode 100644 index 40e4066..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/TAD-CGO-007 - Transport Test - Cargo Fun.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-007 - Transport Test - Cargo Fun/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.lua deleted file mode 100644 index d0c88b6..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.lua +++ /dev/null @@ -1,66 +0,0 @@ ---- --- Name: TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. --- --- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ... --- When cargo is deployed at the Factory, a SAM site is activated ... --- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ... --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - - -local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() -local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ) -local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ) -local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ) -local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ) -local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ) - - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) -TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) - - -local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() -local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ) -local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ) -local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ) - -local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) -TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) - - -local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() -local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ) -local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ) -local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ) -local FoodCargo = CARGO_CRATE:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 ) -local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 ) - -local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) -TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) - --- Here we tailor the CargoDeployed event of the TaskDispatcher. - -function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) - - MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() - -end - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.miz deleted file mode 100644 index 4962f44..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.lua deleted file mode 100644 index bf6c297..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.lua +++ /dev/null @@ -1,82 +0,0 @@ ---- --- Name: TAD-CGO-009 - Transport Test - Respawning Cargo --- Author: FlightControl --- Date Created: 05 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. --- --- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ... --- When cargo is deployed at the Factory, a SAM site is activated ... --- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ... --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - - -local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() -local EngineerCargoGroup = CARGO_GROUP:New( GROUP:FindByName( "Engineers" ), "Workmaterials", "Engineers", 250 ):RespawnOnDestroyed( true ) -local ConcreteCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Concrete" ), "Workmaterials", "Concrete", 150, 50 ):RespawnOnDestroyed( true ) -local CrateCargo = CARGO_CRATE:New( STATIC:FindByName( "Crate" ), "Workmaterials", "Crate", 150, 50 ):RespawnOnDestroyed( true ) -local EnginesCargo = CARGO_CRATE:New( STATIC:FindByName( "Engines" ), "Workmaterials", "Engines", 150, 50 ):RespawnOnDestroyed( true ) -local MetalCargo = CARGO_CRATE:New( STATIC:FindByName( "Metal" ), "Workmaterials", "Metal", 150, 50 ):RespawnOnDestroyed(true) - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) -TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) - -Helos = { SPAWN:New( "Helicopters 1" ), SPAWN:New( "Helicopters 2" ), SPAWN:New( "Helicopters 3" ), SPAWN:New( "Helicopters 4" ), SPAWN:New( "Helicopters 5" ) } - -EnemyHelos = { SPAWN:New( "Enemy Helicopters 1" ), SPAWN:New( "Enemy Helicopters 2" ), SPAWN:New( "Enemy Helicopters 3" ) } - -function WorkplaceTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - Helos[ math.random(1,#Helos) ]:Spawn() - EnemyHelos[ math.random(1,#EnemyHelos) ]:Spawn() - -end - - - -local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() -local FuelCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Fuel" ), "Liquids", "Fuel", 100, 35 ):RespawnOnDestroyed( true ) -local GasCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Gas" ), "Liquids", "Gas", 100, 35 ):RespawnOnDestroyed( true ) -local OilCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Oil" ), "Liquids", "Oil", 100, 35 ):RespawnOnDestroyed( true ) - -local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) -TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) - -SAMSites = { SPAWN:New( "SAM Site 1" ), SPAWN:New( "SAM Site 2" ), SPAWN:New( "SAM Site 3" ), SPAWN:New( "SAM Site 4" ), SPAWN:New( "SAM Site 5" ) } - -AirAttack = { SPAWN:New( "Russia Air Attack 1" ), SPAWN:New( "Russia Air Attack 2" ), SPAWN:New( "Russia Air Attack 3" ), SPAWN:New( "Russia Air Attack 4" ) } - -function FactoryTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - SAMSites[ math.random(1,#SAMSites) ]:Spawn() - AirAttack[ math.random(1,#AirAttack) ]:Spawn() -end - -local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() -local WorkerCargoGroupA = CARGO_GROUP:New( GROUP:FindByName( "Workers Team A" ), "Food", "Workers Team A", 250 ):RespawnOnDestroyed( true ) -local WorkerCargoGroupB = CARGO_GROUP:New( GROUP:FindByName( "Workers Team B" ), "Food", "Workers Team B", 250 ):RespawnOnDestroyed( true ) -local KitchenstuffCargo = CARGO_CRATE:New( STATIC:FindByName( "Kitchenstuff" ), "Food", "Kitchenstuff", 150, 50 ):RespawnOnDestroyed( true ) -local FoodCargo = CARGO_CRATE:New( STATIC:FindByName( "Food" ), "Food", "Food", 100, 35 ) -local MilkCargo = CARGO_SLINGLOAD:New( STATIC:FindByName( "Milk" ), "Food", "Milk", 100, 35 ) - -local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) -TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) - -Hungry = { SPAWN:New( "Hungry 1" ), SPAWN:New( "Hungry 2" ), SPAWN:New( "Hungry 3" ), SPAWN:New( "Hungry 4" ), SPAWN:New( "Hungry 5" ) } - -function FoodTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - Hungry[ math.random(1,#Hungry) ]:Spawn() -end - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.miz deleted file mode 100644 index 908c101..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/TAD-CGO-009 - Transport Test - Respawning Cargo.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-009 - Transport Test - Respawning Cargo/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.lua deleted file mode 100644 index 33165c1..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.lua +++ /dev/null @@ -1,84 +0,0 @@ ---- --- Name: TAD-CGO-010 - Transport Test - Register Cargos --- Author: FlightControl --- Date Created: 15 Apr 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo Transport operations of various cargo types. --- --- The cargo is defined within the mission editor. --- Each cargo is identified with a ~CARGO tag in the group name. --- --- When cargo is deployed at the Workplace, a large helicopter fleet will descend to the place ... --- When cargo is deployed at the Factory, a SAM site is activated ... --- When cargo is deployed at the Cantine, a some other army soldiers will arrive to join lunch ... --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - - --- This is the most important now. You setup a new SET_CARGO filtering the relevant type. --- The actual cargo objects are now created by MOOSE in the background. --- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name. --- This allows a truly dynamic setup. -local CargoSetWorkmaterials = SET_CARGO:New():FilterTypes( "Workmaterials" ):FilterStart() - -local WorkplaceTask = TaskDispatcher:AddTransportTask( "Build a Workplace", CargoSetWorkmaterials, "Transport the workers, engineers and the equipment near the Workplace." ) -TaskDispatcher:SetTransportDeployZone( WorkplaceTask, ZONE:New( "Workplace" ) ) - -Helos = { SPAWN:New( "Helicopters 1" ), SPAWN:New( "Helicopters 2" ), SPAWN:New( "Helicopters 3" ), SPAWN:New( "Helicopters 4" ), SPAWN:New( "Helicopters 5" ) } - -EnemyHelos = { SPAWN:New( "Enemy Helicopters 1" ), SPAWN:New( "Enemy Helicopters 2" ), SPAWN:New( "Enemy Helicopters 3" ) } - -function WorkplaceTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - Helos[ math.random(1,#Helos) ]:Spawn() - EnemyHelos[ math.random(1,#EnemyHelos) ]:Spawn() - -end - - - --- This is the most important now. You setup a new SET_CARGO filtering the relevant type. --- The actual cargo objects are now created by MOOSE in the background. --- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name. --- This allows a truly dynamic setup. -local CargoSetLiquids = SET_CARGO:New():FilterTypes( "Liquids" ):FilterStart() - -local FactoryTask = TaskDispatcher:AddTransportTask( "Transport liquids", CargoSetLiquids, "Transport the milk, gas, fuel, oil to the factory." ) -TaskDispatcher:SetTransportDeployZone( FactoryTask, ZONE:New( "Factory" ) ) - -SAMSites = { SPAWN:New( "SAM Site 1" ), SPAWN:New( "SAM Site 2" ), SPAWN:New( "SAM Site 3" ), SPAWN:New( "SAM Site 4" ), SPAWN:New( "SAM Site 5" ) } - -AirAttack = { SPAWN:New( "Russia Air Attack 1" ), SPAWN:New( "Russia Air Attack 2" ), SPAWN:New( "Russia Air Attack 3" ), SPAWN:New( "Russia Air Attack 4" ) } - -function FactoryTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - SAMSites[ math.random(1,#SAMSites) ]:Spawn() - AirAttack[ math.random(1,#AirAttack) ]:Spawn() -end - --- This is the most important now. You setup a new SET_CARGO filtering the relevant type. --- The actual cargo objects are now created by MOOSE in the background. --- Each cargo is setup in the Mission Editor using the ~CARGO tag in the group name. --- This allows a truly dynamic setup. -local CargoSetFood = SET_CARGO:New():FilterTypes( "Food" ):FilterStart() - -local FoodTask = TaskDispatcher:AddTransportTask( "Transport food", CargoSetFood, "Transport the workers and the food to the cantine." ) -TaskDispatcher:SetTransportDeployZone( FoodTask, ZONE:New( "Cantine" ) ) - -Hungry = { SPAWN:New( "Hungry 1" ), SPAWN:New( "Hungry 2" ), SPAWN:New( "Hungry 3" ), SPAWN:New( "Hungry 4" ), SPAWN:New( "Hungry 5" ) } - -function FoodTask:OnAfterCargoDeployed( From, Event, To, TaskUnit, Cargo, DeployZone ) - Hungry[ math.random(1,#Hungry) ]:Spawn() -end - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.miz deleted file mode 100644 index ae2bf24..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/TAD-CGO-010 - Transport Test - Register Cargos.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-010 - Transport Test - Register Cargos/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/TAD-CGO-011 - CSAR - Zone.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/TAD-CGO-011 - CSAR - Zone.lua deleted file mode 100644 index 71cc8da..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/TAD-CGO-011 - CSAR - Zone.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: TAD-CGO-011 - CSAR - Zone --- Author: FlightControl --- Date Created: 01 Oct 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo CSAR operations. --- It will only spawn pilots for rescue when the pilots eject in the zones indicated. - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED ) - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups ) - -TaskDispatcher:SetCSARZones( SET_ZONE:New():FilterPrefixes("CSAR"):FilterOnce() ) - -TaskDispatcher:StartCSARTasks( - "CSAR", - { ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) }, - "One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" .. - "Use the radio menu to let the command center assist you with the CSAR tasking." -) - -function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) - - MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() - -end diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/TAD-CGO-011 - CSAR - Zone.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/TAD-CGO-011 - CSAR - Zone.miz deleted file mode 100644 index 027af1f..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/TAD-CGO-011 - CSAR - Zone.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-011 - CSAR - Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/TAD-CGO-012 - CSAR - Maximum.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/TAD-CGO-012 - CSAR - Maximum.lua deleted file mode 100644 index 7560365..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/TAD-CGO-012 - CSAR - Maximum.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: TAD-CGO-012 - CSAR - Maximum --- Author: FlightControl --- Date Created: 01 Oct 2018 --- --- # Situation: --- --- This mission demonstrates the dynamic task dispatching for cargo CSAR operations. --- It will only spawn 5 pilots for rescue when the pilots eject. - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "CSAR Missions", "Tactical", "Rescue downed pilots.", coalition.side.RED ) - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Rescue" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, AttackGroups ) - -TaskDispatcher:SetMaxCSAR( 5 ) - -TaskDispatcher:StartCSARTasks( - "CSAR", - { ZONE_UNIT:New( "Hospital", STATIC:FindByName( "Hospital" ), 100 ) }, - "One of our pilots has ejected. Go out to Search and Rescue our pilot!\n" .. - "Use the radio menu to let the command center assist you with the CSAR tasking." -) - -function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) - - MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() - -end diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/TAD-CGO-012 - CSAR - Maximum.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/TAD-CGO-012 - CSAR - Maximum.miz deleted file mode 100644 index cd600c3..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/TAD-CGO-012 - CSAR - Maximum.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-012 - CSAR - Maximum/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/TAD-CGO-013 - Transport - Pickup and deploy from roof.lua b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/TAD-CGO-013 - Transport - Pickup and deploy from roof.lua deleted file mode 100644 index 04fb480..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/TAD-CGO-013 - Transport - Pickup and deploy from roof.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: TAD-CGO-008 - Transport Test - PickedUp and Deployed Handling --- Author: FlightControl --- Date Created: 12 Oct 2018 --- --- Test to pickup cargo from the roof of a building. --- - -HQ = GROUP:FindByName( "HQ", "Bravo" ) - -CommandCenter = COMMANDCENTER - :New( HQ, "Lima" ) - -Mission = MISSION - :New( CommandCenter, "Operation Cargo Fun", "Tactical", "Transport Cargo", coalition.side.RED ) - -TransportGroups = SET_GROUP:New():FilterCoalitions( "blue" ):FilterPrefixes( "Transport" ):FilterStart() - -CargoWorkers = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - -TaskDispatcher = TASK_CARGO_DISPATCHER:New( Mission, TransportGroups ) - -local WorkersTask = TaskDispatcher:AddTransportTask( "Transport Workers", CargoWorkers, "Transport the workers to the other building." ) -TaskDispatcher:SetTransportDeployZone( WorkersTask, ZONE:New( "Workplace" ) ) - - --- Here we tailor the CargoDeployed event of the TaskDispatcher. - -function TaskDispatcher:OnAfterCargoDeployed( From, Event, To, Task, TaskPrefix, TaskUnit, Cargo, DeployZone ) - - MESSAGE:NewType( "Unit " .. TaskUnit:GetName().. " has deployed cargo " .. Cargo:GetName() .. " at zone " .. DeployZone:GetName() .. " for task " .. Task:GetName() .. ".", MESSAGE.Type.Information ):ToAll() - -end - diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/TAD-CGO-013 - Transport - Pickup and deploy from roof.miz b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/TAD-CGO-013 - Transport - Pickup and deploy from roof.miz deleted file mode 100644 index db2a7cd..0000000 Binary files a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/TAD-CGO-013 - Transport - Pickup and deploy from roof.miz and /dev/null differ diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/pack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/unpack.ps1 b/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/TAD - Task Dispatching/CGO - Cargo Task Dispatching/TAD-CGO-013 - Transport - Pickup and deploy from roof/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.lua b/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.lua deleted file mode 100644 index a3740b1..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.lua +++ /dev/null @@ -1,31 +0,0 @@ ---- --- Name: TSK-300 - A2A - SWEEP --- Author: FlightControl --- Date Created: 28 May 2017 --- --- # Situation: --- --- This mission demonstrates the Sweeping of target areas. --- --- # Test cases: - - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Target Sweeping Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Sweeping", "Primary", "Wait until the detected targets get undetected. And see if a SWEEP task is allocated.", coalition.side.BLUE ) - :AddScoring( Scoring ) - - AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - - TargetSetUnit = SET_UNIT:New():FilterCoalitions( "blue" ):FilterPrefixes( "Target" ):FilterStart() - - TaskSWEEP = TASK_A2A_SWEEP:New( Mission, AttackGroups, "SWEEP", TargetSetUnit ) - -end - diff --git a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.miz b/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.miz deleted file mode 100644 index 742157b..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/TSK-300 - A2A - SWEEP.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/pack.ps1 b/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2A - Air to Air/TSK-300 - A2A - SWEEP/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.lua b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.lua deleted file mode 100644 index 42c56c1..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: TSK-010 - Task Modelling - SEAD.lua --- Author: FlightControl --- Date Created: 31 Mar 2017 --- --- # Situation: --- --- This mission demonstrates the Task_SEAD. --- --- # Test cases: --- - -HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Lima" ) - -Scoring = SCORING:New( "Detect Demo" ) - -Mission = MISSION - :New( CommandCenter, "Overlord", "High", "SEAD the area!", coalition.side.RED ) - :AddScoring( Scoring ) - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TargetSetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterPrefixes("Target"):FilterStart() - -TaskSEAD = TASK_A2G_SEAD:New(Mission,AttackGroups,"SEAD",TargetSetUnit) diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.miz b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.miz deleted file mode 100644 index f997228..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/TSK-A2A-100 - SEAD.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/pack.ps1 b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-100 - SEAD/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.lua b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.lua deleted file mode 100644 index cdec1d3..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.lua +++ /dev/null @@ -1,27 +0,0 @@ ---- --- Name: TSK-100 - A2G - BAI --- Author: FlightControl --- Date Created: 28 May 2017 --- --- # Situation: --- --- This mission demonstrates the Task_BAI. --- --- # Test cases: --- - -HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - -Scoring = SCORING:New( "BAI Demo" ) - -Mission = MISSION - :New( CommandCenter, "Overlord", "Primary", "Perform a Battlefield Air Interdiction in the area!", coalition.side.RED ) - :AddScoring( Scoring ) - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TargetSetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterPrefixes( "Target" ):FilterStart() - -TaskBAI = TASK_A2G_BAI:New( Mission, AttackGroups,"BAI", TargetSetUnit ) diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.miz b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.miz deleted file mode 100644 index 174aee0..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/TSK-A2A-200 - BAI.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/pack.ps1 b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2A-200 - BAI/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.lua b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.lua deleted file mode 100644 index 439800a..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.lua +++ /dev/null @@ -1,29 +0,0 @@ ---- --- Name: TSK-101 - A2G - BAI - WWII Mode --- Author: FlightControl --- Date Created: 28 May 2017 --- --- # Situation: --- --- This mission demonstrates the Task_BAI. --- --- # Test cases: --- - -HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - -CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) -CommandCenter:SetModeWWII() -CommandCenter:SetReferenceZones( "Airbase" ) - -Scoring = SCORING:New( "BAI Demo" ) - -Mission = MISSION - :New( CommandCenter, "Overlord", "Primary", "Perform a Battlefield Air Interdiction in the area!", coalition.side.RED ) - :AddScoring( Scoring ) - -AttackGroups = SET_GROUP:New():FilterCoalitions( "red" ):FilterPrefixes( "Attack" ):FilterStart() - -TargetSetUnit = SET_UNIT:New():FilterCoalitions("blue"):FilterPrefixes( "Target" ):FilterStart() - -TaskBAI = TASK_A2G_BAI:New( Mission, AttackGroups,"BAI", TargetSetUnit ) diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.miz b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.miz deleted file mode 100644 index 8e9e602..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/TSK-A2G-110 - BAI - WWII Mode.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/pack.ps1 b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/A2G - Air to Ground/TSK-A2G-110 - BAI - WWII Mode/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.lua deleted file mode 100644 index 3821de4..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.lua +++ /dev/null @@ -1,78 +0,0 @@ ---- --- Name: TSK-CGO-000 - Boarding Test --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- This mission demonstrates the transport of a cargo group using an APC. --- --- There is: --- - 1 APC. --- - 2 Transport Tasks - Transport Workers and Transport Engineers. --- - 2 Cargo - Workers and Engineers. --- - 2 Deployment Zones - Alpha and Beta. --- --- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. --- Task Workers: Transport the Workers to Deployment Zone Beta. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - - local WorkersGroup = GROUP:FindByName( "Workers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Workers". - -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. - local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ) - - - -- We setup the task to transport workers. - WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1. - WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.miz deleted file mode 100644 index 4688951..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/TSK-CGO-000 - Boarding Test.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-000 - Boarding Test/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.lua deleted file mode 100644 index 282ba4c..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.lua +++ /dev/null @@ -1,78 +0,0 @@ ---- --- Name: TSK-CGO-100 - Ground - APC Test --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- This mission demonstrates the transport of a cargo group using an APC. --- --- There is: --- - 1 APC. --- - 2 Transport Tasks - Transport Workers and Transport Engineers. --- - 2 Cargo - Workers and Engineers. --- - 2 Deployment Zones - Alpha and Beta. --- --- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. --- Task Workers: Transport the Workers to Deployment Zone Beta. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ):RespawnOnDestroyed( true ) - - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - - local WorkersGroup = GROUP:FindByName( "Workers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Workers". - -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. - local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ):RespawnOnDestroyed( true ) - - - -- We setup the task to transport workers. - WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1. - WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.miz deleted file mode 100644 index 289f0a9..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-010 - Ground - Respawn on CargoGroup Destroyed/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.lua deleted file mode 100644 index 48f81cb..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.lua +++ /dev/null @@ -1,78 +0,0 @@ ---- --- Name: TSK-CGO-100 - Ground - APC Test --- Author: FlightControl --- Date Created: 12 Apr 2017 --- --- This mission demonstrates the transport of a cargo group using an APC. --- --- There is: --- - 1 APC. --- - 2 Transport Tasks - Transport Workers and Transport Engineers. --- - 2 Cargo - Workers and Engineers. --- - 2 Deployment Zones - Alpha and Beta. --- --- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. --- Task Workers: Transport the Workers to Deployment Zone Beta. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - - local WorkersGroup = GROUP:FindByName( "Workers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Workers". - -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. - local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ) - - - -- We setup the task to transport workers. - WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1. - WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.miz deleted file mode 100644 index 7267f2e..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-100 - Ground - 1 APC - 2 Tasks - 2 Cargo - 2 Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.lua deleted file mode 100644 index f739d22..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.lua +++ /dev/null @@ -1,55 +0,0 @@ ---- --- Name: TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone --- Author: FlightControl --- Date Created: 12 Mar 2018 --- --- This mission demonstrates the transport of a cargo group using an Helicopter. --- --- There is: --- - 1 Helicopter. --- - 1 Transport Task - Transport Workers. --- - 1 Cargo - Workers. --- - 1 Deployment Zone - Alpha. --- --- Task Workers: Transport the Workers to Deployment Zone Alpha. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.miz deleted file mode 100644 index f87b4e4..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-500 - Helo - 1 Helo - 1 Task - 1 Cargo - 1 Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.lua deleted file mode 100644 index 01b08e9..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.lua +++ /dev/null @@ -1,56 +0,0 @@ ---- --- Name: TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone --- Author: FlightControl --- Date Created: 12 Mar 2018 --- --- This mission demonstrates the transport of a cargo group using an Helicopter. --- --- There is: --- - 1 Helicopter. --- - 1 Transport Task - Transport Workers. --- - 1 Cargo - Workers. --- - 1 Deployment Zone - Alpha. --- --- Task Workers: Transport the Workers to Deployment Zone Alpha. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.miz deleted file mode 100644 index d55bf2d..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-501 - Helo - 1 Helo - 1 Task - 1 Cargo - 2 Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.lua deleted file mode 100644 index d2bb0f8..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.lua +++ /dev/null @@ -1,64 +0,0 @@ ---- --- Name: TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone --- Author: FlightControl --- Date Created: 12 Mar 2018 --- --- This mission demonstrates the transport of a cargo group using an Helicopter. --- --- There is: --- - 1 Helicopter. --- - 1 Transport Task - Transport Workers. --- - 1 Cargo - Workers. --- - 1 Deployment Zone - Alpha. --- --- Task Workers: Transport the Workers to Deployment Zone Alpha. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - local WorkersGroup = GROUP:FindByName( "Workers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Workers". - -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. - local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Engineers", "Workers", 500 ) - - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.miz deleted file mode 100644 index 76ca1ff..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-502 - Helo - 1 Helo - 1 Task - 2 Cargo - 1 Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.lua deleted file mode 100644 index 04d4edf..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.lua +++ /dev/null @@ -1,66 +0,0 @@ ---- --- Name: TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones --- Author: FlightControl --- Date Created: 12 Mar 2018 --- --- This mission demonstrates the transport of a cargo group using an Helicopter. --- --- There is: --- - 1 Helicopter. --- - 1 Transport Task - Transport Workers. --- - 1 Cargo - Workers. --- - 1 Deployment Zone - Alpha. --- --- Task Workers: Transport the Workers to Deployment Zone Alpha. --- - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - - local WorkersGroup = GROUP:FindByName( "Workers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Workers". - -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. - local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Engineers", "Workers", 500 ) - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.miz deleted file mode 100644 index adc7d00..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-503 - Helo - 1 Helo - 1 Task - 2 Cargo - 2 Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.lua b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.lua deleted file mode 100644 index c9c142d..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.lua +++ /dev/null @@ -1,77 +0,0 @@ ---- --- Name: TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones --- Author: FlightControl --- Date Created: 12 Mar 2018 --- --- This mission demonstrates the transport of a cargo group using an Helicopter. --- --- There is: --- - 1 Helicopter. --- - 2 Transport Tasks - Transport Workers and Transport Engineers. --- - 2 Cargo - Workers and Engineers. --- - 2 Deployment Zones - Alpha and Beta. --- --- Task Engineers: Transport the Engineers to Deployment Zone Alpha or Zone Beta. --- Task Workers: Transport the Workers to Deployment Zone Beta. - -do - local HQ = GROUP:FindByName( "HQ", "Bravo HQ" ) - - local CommandCenter = COMMANDCENTER:New( HQ, "Bravo" ) - - local Scoring = SCORING:New( "Cargo Group Transport Demonstration" ) - - local Mission = MISSION - :New( CommandCenter, "Transport", "High", "Transport the team from Deploy Zone 1 to Deploy Zone 2", coalition.side.BLUE ) - :AddScoring( Scoring ) - - -- Allocate the Transport, which is an APC in the field. - local APC = SET_GROUP:New():FilterPrefixes( "Transport" ):FilterStart() - - -- We will setup the transportation for Engineers. - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local EngineersCargoSet = SET_CARGO:New():FilterTypes( "Engineers" ):FilterStart() - - -- Now we add cargo into the battle scene. - local EngineersGroup = GROUP:FindByName( "Engineers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Engineers". - -- The cargoset "EngineersCargoSet" will embed all defined cargo of type Engineers (prefix) into its set. - local EngineersCargoGroup = CARGO_GROUP:New( EngineersGroup, "Engineers", "Radar Team", 500 ) - - - -- We setup the task to transport engineers. - EngineersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Engineers", EngineersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1 and 2 (the player can choose). - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Alpha", GROUP:FindByName("DeployZone Alpha") ) ) - EngineersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - - - -- Here we define the "cargo set", which is a collection of cargo objects. - -- The cargo set will be the input for the cargo transportation task. - -- So a transportation object is handling a cargo set, which is automatically refreshed when new cargo is added/deleted. - local WorkersCargoSet = SET_CARGO:New():FilterTypes( "Workers" ):FilterStart() - - local WorkersGroup = GROUP:FindByName( "Workers" ) - - -- CARGO_GROUP can be used to setup cargo with a GROUP object underneath. - -- We name this group Engineers. - -- Note that the name of the cargo is "Workers". - -- The cargoset "WorkersCargoSet" will embed all defined cargo of type Workers (prefix) into its set. - local WorkersCargoGroup = CARGO_GROUP:New( WorkersGroup, "Workers", "Mechanics", 500 ) - - - -- We setup the task to transport workers. - WorkersCargoTransportTask = TASK_CARGO_TRANSPORT:New( Mission, APC, "Transport Workers", WorkersCargoSet ) - - -- We setup to deploy workers in the deploy zone 1. - WorkersCargoTransportTask:AddDeployZone( ZONE_POLYGON:New( "Deploy Zone Beta", GROUP:FindByName("DeployZone Beta") ) ) - -end - diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.miz b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.miz deleted file mode 100644 index a3ca2c6..0000000 Binary files a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones.miz and /dev/null differ diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/pack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/unpack.ps1 b/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/TSK - Task Modelling/CGO - Cargo Transportation/TSK-CGO-510 - Helo - 1 Helo - 2 Task - 2 Cargo - 2 Zones/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/WHS-010 - Self Request.lua b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/WHS-010 - Self Request.lua deleted file mode 100644 index 9c782b4..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/WHS-010 - Self Request.lua +++ /dev/null @@ -1,39 +0,0 @@ ------------------- --- Self Request -- ------------------- --- 1. Two groups of infantry are spawned in the Batumi spawn zone. --- 2. After ~10 seconds they are put back into the warehouse stock. --- 3. After some time they are spawned again. --- 4. And so on and so forth... - --- Create a WAREHOUSE object. -local warehouseBatumi=WAREHOUSE:New(STATIC:FindByName("Warehouse Batumi"), "Batumi") - --- Start warehouse Batumi. -warehouseBatumi:Start() - --- Add one infantry asset. -warehouseBatumi:AddAsset(GROUP:FindByName("Infantry Platoon Alpha"), 4) - --- Add self request for one infantry at Batumi. -warehouseBatumi:AddRequest(warehouseBatumi, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_INFANTRY, 2) - ---- Self request event. Triggered once the assets are spawned in the spawn zone or at the airbase. -function warehouseBatumi:OnAfterSelfRequest(From, Event, To, groupset, request) - local groupset=groupset --Core.Set#SET_GROUP - - -- Loop over all groups spawned from that request. - for _,group in pairs(groupset:GetSet()) do - local group=group --Wrapper.Group#GROUP - - -- Gree smoke on spawned group. - --group:SmokeGreen() - - -- Put asset back to stock after 10 seconds. - warehouseBatumi:__AddAsset(10, group) - end - - -- Add new self request after 20 seconds. - warehouseBatumi:__AddRequest(20, warehouseBatumi, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_INFANTRY, 2) - -end diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/WHS-010 - Self Request.miz b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/WHS-010 - Self Request.miz deleted file mode 100644 index b3f0555..0000000 Binary files a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/WHS-010 - Self Request.miz and /dev/null differ diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/pack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/unpack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-010 - Self Request/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/WHS-020 - Self Propelled Ground Troops.lua b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/WHS-020 - Self Propelled Ground Troops.lua deleted file mode 100644 index 95c44de..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/WHS-020 - Self Propelled Ground Troops.lua +++ /dev/null @@ -1,30 +0,0 @@ ----------------------------------- --- Self Propelled Ground Troops -- ----------------------------------- --- 1. Ground troops - APCs and infantry - are transferred from Batumi to FARP Berlin. --- 2. Warehouse Berlin is empty initially. But a request from Batumi is made for APCs. This cannot be processed and is held in the queue. --- 3. Once the assets arrive at Berlin, the request can be processed and some APCs are send back to Batumi. - --- Create WAREHOUSE objects. -local warehouseBatumi=WAREHOUSE:New(STATIC:FindByName("Warehouse Batumi"), "Batumi") -local warehouseBerlin=WAREHOUSE:New(STATIC:FindByName("Warehouse Berlin"), "Berlin") - --- Set spawn zone for warehouse Batumi. -warehouseBatumi:SetSpawnZone(ZONE:New("Warehouse Batumi Spawn Zone")) - --- Start Warehouse at Batumi. -warehouseBatumi:Start() - --- Add 20 infantry groups and 10 APCs as assets to Batumi warehouse stock. -warehouseBatumi:AddAsset("Infantry Platoon Alpha", 20) -warehouseBatumi:AddAsset("TPz Fuchs", 10) - --- Start Warehouse Berlin. -warehouseBerlin:Start() - --- Warehouse Berlin requests ten infantry groups and five APCs from warehouse Batumi -warehouseBatumi:AddRequest(warehouseBerlin, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_INFANTRY, 10) -warehouseBatumi:AddRequest(warehouseBerlin, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_APC, 5) - --- Request from Batumi for two APCs. Initially these are not in stock. When they become available, the request is executed. -warehouseBerlin:AddRequest(warehouseBatumi, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_APC, 2) diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/WHS-020 - Self Propelled Ground Troops.miz b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/WHS-020 - Self Propelled Ground Troops.miz deleted file mode 100644 index 3886842..0000000 Binary files a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/WHS-020 - Self Propelled Ground Troops.miz and /dev/null differ diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/pack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/unpack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-020 - Self Propelled Ground Troops/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/WHS-030 - Self Propelled Airborne.lua b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/WHS-030 - Self Propelled Airborne.lua deleted file mode 100644 index ce0a6a1..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/WHS-030 - Self Propelled Airborne.lua +++ /dev/null @@ -1,29 +0,0 @@ ------------------------------------- --- Self Propelled Airborne Assets -- ------------------------------------- --- 1. Kutaisi requests two Yak-52 with high (10) priority from Senaki. --- 2. Kobuleti requests half Yak-52 with low (70) priority and gets the remaining half of the rest. --- 3. FARP London requests 1/3 of all available Hueys from Senaki. - --- Create WAREHOUSE objects. -local warehouseSenaki = WAREHOUSE:New(STATIC:FindByName("Warehouse Senaki"), "Senaki") -local warehouseKutaisi = WAREHOUSE:New(STATIC:FindByName("Warehouse Kutaisi"), "Kutaisi") -local warehouseKobuleti = WAREHOUSE:New(STATIC:FindByName("Warehouse Kobuleti"), "Kobuleti") -local warehouseLondon = WAREHOUSE:New(STATIC:FindByName("Warehouse London"), "London") - --- Start warehouses -warehouseSenaki:Start() -warehouseKutaisi:Start() -warehouseKobuleti:Start() -warehouseLondon:Start() - --- Add assets to Senaki warehouse -warehouseSenaki:AddAsset("Yak-52", 10) -warehouseSenaki:AddAsset("Huey", 6) - --- Kusaisi requests 3 Yak-52 form Senaki while Kobuleti wants all the rest. -warehouseSenaki:AddRequest(warehouseKutaisi, WAREHOUSE.Descriptor.GROUPNAME, "Yak-52", 1, nil, nil, 10) -warehouseSenaki:AddRequest(warehouseKobuleti, WAREHOUSE.Descriptor.GROUPNAME, "Yak-52", WAREHOUSE.Quantity.HALF, nil, nil, 70) - --- FARP London wants 1/3 of the six available Hueys. -warehouseSenaki:AddRequest(warehouseLondon, WAREHOUSE.Descriptor.GROUPNAME, "Huey", WAREHOUSE.Quantity.THIRD) diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/WHS-030 - Self Propelled Airborne.miz b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/WHS-030 - Self Propelled Airborne.miz deleted file mode 100644 index c2c39ca..0000000 Binary files a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/WHS-030 - Self Propelled Airborne.miz and /dev/null differ diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/pack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/unpack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-030 - Self Propelled Airborne/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/WHS-016 - Resupply.lua b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/WHS-016 - Resupply.lua deleted file mode 100644 index eba0be3..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/WHS-016 - Resupply.lua +++ /dev/null @@ -1,104 +0,0 @@ ------------------------ --- Test 17: Resupply -- ------------------------ --- Warehouse at FARP Berlin is located at the front line and sends infantry groups to the battle zone. --- Whenever a group dies, a new group is send from the warehouse to the battle zone. --- Additionally, for each dead group, Berlin requests resupply from Batumi. - --- Display mission time every 30 seconds. -SCHEDULER:New(nil, UTILS.DisplayMissionTime, {5}, 30, 30) - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Define Warehouses. -local warehouse={} - --- Blue warehouses -warehouse.Senaki = WAREHOUSE:New(STATIC:FindByName("Warehouse Senaki"), "Senaki") --Functional.Warehouse#WAREHOUSE -warehouse.Batumi = WAREHOUSE:New(STATIC:FindByName("Warehouse Batumi"), "Batumi") --Functional.Warehouse#WAREHOUSE -warehouse.Kobuleti = WAREHOUSE:New(STATIC:FindByName("Warehouse Kobuleti"), "Kobuleti") --Functional.Warehouse#WAREHOUSE -warehouse.Kutaisi = WAREHOUSE:New(STATIC:FindByName("Warehouse Kutaisi"), "Kutaisi") --Functional.Warehouse#WAREHOUSE -warehouse.Berlin = WAREHOUSE:New(STATIC:FindByName("Warehouse Berlin"), "Berlin") --Functional.Warehouse#WAREHOUSE -warehouse.London = WAREHOUSE:New(STATIC:FindByName("Warehouse London"), "London") --Functional.Warehouse#WAREHOUSE -warehouse.Stennis = WAREHOUSE:New(STATIC:FindByName("Warehouse Stennis"), "Stennis") --Functional.Warehouse#WAREHOUSE -warehouse.Pampa = WAREHOUSE:New(STATIC:FindByName("Warehouse Pampa"), "Pampa") --Functional.Warehouse#WAREHOUSE -warehouse.Pearth = WAREHOUSE:New(STATIC:FindByName("Warehouse Pearth"), "Pearth") --Functional.Warehouse#WAREHOUSE --- Red warehouse -warehouse.Sukhumi = WAREHOUSE:New(STATIC:FindByName("Warehouse Sukhumi"), "Sukhumi") --Functional.Warehouse#WAREHOUSE -warehouse.Gudauta = WAREHOUSE:New(STATIC:FindByName("Warehouse Gudauta"), "Gudauta") --Functional.Warehouse#WAREHOUSE -warehouse.Sochi = WAREHOUSE:New(STATIC:FindByName("Warehouse Sochi"), "Sochi") --Functional.Warehouse#WAREHOUSE - --- Fine tune warehouses if necessary. -warehouse.Batumi:SetSpawnZone(ZONE:New("Warehouse Batumi Spawn Zone")) -warehouse.Senaki:SetSpawnZone(ZONE:New("Warehouse Senaki Spawn Zone")) -warehouse.Kobuleti:SetSpawnZone(ZONE_POLYGON:New("Warehouse Kobuleti Spawn Zone", GROUP:FindByName("Warehouse Kobuleti Spawn Zone"))) - - --- Creat explosion at an object. -local function Explosion(object, power) - power=power or 1000 - if object and object:IsAlive() then - object:GetCoordinate():Explosion(power) - end -end - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Start warehouses. -warehouse.Batumi:Start() -warehouse.Berlin:Start() - --- Front line warehouse. -warehouse.Berlin:AddAsset("Infantry Platoon Alpha", 6) - --- Resupply warehouse. -warehouse.Batumi:AddAsset("Infantry Platoon Alpha", 50) - --- Battle zone near FARP Berlin. This is where the action is! -local BattleZone=ZONE:New("Virtual Battle Zone") - --- Send infantry groups to the battle zone. Two groups every ~60 seconds. -for i=1,2 do - local time=(i-1)*60+10 - warehouse.Berlin:__AddRequest(time, warehouse.Berlin, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_INFANTRY, 2, nil, nil, nil, "To Battle Zone") -end - --- Take care of the spawned units. -function warehouse.Berlin:OnAfterSelfRequest(From,Event,To,groupset,request) - local groupset=groupset --Core.Set#SET_GROUP - local request=request --Functional.Warehouse#WAREHOUSE.Pendingitem - - -- Get assignment of this request. - local assignment=warehouse.Berlin:GetAssignment(request) - - if assignment=="To Battle Zone" then - - for _,group in pairs(groupset:GetSet()) do - local group=group --Wrapper.Group#GROUP - - -- Route group to Battle zone. - local ToCoord=BattleZone:GetRandomCoordinate() - group:RouteGroundOnRoad(ToCoord, group:GetSpeedMax()*0.8) - - -- After 3-5 minutes we create an explosion to destroy the group. - SCHEDULER:New(nil, Explosion, {group, 50}, math.random(180, 300)) - end - - end - -end - --- An asset has died ==> request resupply for it. -function warehouse.Berlin:OnAfterAssetDead(From, Event, To, asset, request) - local asset=asset --Functional.Warehouse#WAREHOUSE.Assetitem - local request=request --Functional.Warehouse#WAREHOUSE.Pendingitem - - -- Get assignment. - local assignment=warehouse.Berlin:GetAssignment(request) - - -- Request resupply for dead asset from Batumi. - warehouse.Batumi:AddRequest(warehouse.Berlin, WAREHOUSE.Descriptor.ATTRIBUTE, asset.attribute, 1, nil, nil, nil, "Resupply") - - -- Send asset to Battle zone either now or when they arrive. - warehouse.Berlin:AddRequest(warehouse.Berlin, WAREHOUSE.Descriptor.ATTRIBUTE, asset.attribute, 1, nil, nil, nil, assignment) -end diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/WHS-160 - Resupply.miz b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/WHS-160 - Resupply.miz deleted file mode 100644 index 78231c9..0000000 Binary files a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/WHS-160 - Resupply.miz and /dev/null differ diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/pack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/unpack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-160 - Resupply/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/WHS-170 - Resupply.lua b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/WHS-170 - Resupply.lua deleted file mode 100644 index eba0be3..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/WHS-170 - Resupply.lua +++ /dev/null @@ -1,104 +0,0 @@ ------------------------ --- Test 17: Resupply -- ------------------------ --- Warehouse at FARP Berlin is located at the front line and sends infantry groups to the battle zone. --- Whenever a group dies, a new group is send from the warehouse to the battle zone. --- Additionally, for each dead group, Berlin requests resupply from Batumi. - --- Display mission time every 30 seconds. -SCHEDULER:New(nil, UTILS.DisplayMissionTime, {5}, 30, 30) - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Define Warehouses. -local warehouse={} - --- Blue warehouses -warehouse.Senaki = WAREHOUSE:New(STATIC:FindByName("Warehouse Senaki"), "Senaki") --Functional.Warehouse#WAREHOUSE -warehouse.Batumi = WAREHOUSE:New(STATIC:FindByName("Warehouse Batumi"), "Batumi") --Functional.Warehouse#WAREHOUSE -warehouse.Kobuleti = WAREHOUSE:New(STATIC:FindByName("Warehouse Kobuleti"), "Kobuleti") --Functional.Warehouse#WAREHOUSE -warehouse.Kutaisi = WAREHOUSE:New(STATIC:FindByName("Warehouse Kutaisi"), "Kutaisi") --Functional.Warehouse#WAREHOUSE -warehouse.Berlin = WAREHOUSE:New(STATIC:FindByName("Warehouse Berlin"), "Berlin") --Functional.Warehouse#WAREHOUSE -warehouse.London = WAREHOUSE:New(STATIC:FindByName("Warehouse London"), "London") --Functional.Warehouse#WAREHOUSE -warehouse.Stennis = WAREHOUSE:New(STATIC:FindByName("Warehouse Stennis"), "Stennis") --Functional.Warehouse#WAREHOUSE -warehouse.Pampa = WAREHOUSE:New(STATIC:FindByName("Warehouse Pampa"), "Pampa") --Functional.Warehouse#WAREHOUSE -warehouse.Pearth = WAREHOUSE:New(STATIC:FindByName("Warehouse Pearth"), "Pearth") --Functional.Warehouse#WAREHOUSE --- Red warehouse -warehouse.Sukhumi = WAREHOUSE:New(STATIC:FindByName("Warehouse Sukhumi"), "Sukhumi") --Functional.Warehouse#WAREHOUSE -warehouse.Gudauta = WAREHOUSE:New(STATIC:FindByName("Warehouse Gudauta"), "Gudauta") --Functional.Warehouse#WAREHOUSE -warehouse.Sochi = WAREHOUSE:New(STATIC:FindByName("Warehouse Sochi"), "Sochi") --Functional.Warehouse#WAREHOUSE - --- Fine tune warehouses if necessary. -warehouse.Batumi:SetSpawnZone(ZONE:New("Warehouse Batumi Spawn Zone")) -warehouse.Senaki:SetSpawnZone(ZONE:New("Warehouse Senaki Spawn Zone")) -warehouse.Kobuleti:SetSpawnZone(ZONE_POLYGON:New("Warehouse Kobuleti Spawn Zone", GROUP:FindByName("Warehouse Kobuleti Spawn Zone"))) - - --- Creat explosion at an object. -local function Explosion(object, power) - power=power or 1000 - if object and object:IsAlive() then - object:GetCoordinate():Explosion(power) - end -end - -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - --- Start warehouses. -warehouse.Batumi:Start() -warehouse.Berlin:Start() - --- Front line warehouse. -warehouse.Berlin:AddAsset("Infantry Platoon Alpha", 6) - --- Resupply warehouse. -warehouse.Batumi:AddAsset("Infantry Platoon Alpha", 50) - --- Battle zone near FARP Berlin. This is where the action is! -local BattleZone=ZONE:New("Virtual Battle Zone") - --- Send infantry groups to the battle zone. Two groups every ~60 seconds. -for i=1,2 do - local time=(i-1)*60+10 - warehouse.Berlin:__AddRequest(time, warehouse.Berlin, WAREHOUSE.Descriptor.ATTRIBUTE, WAREHOUSE.Attribute.GROUND_INFANTRY, 2, nil, nil, nil, "To Battle Zone") -end - --- Take care of the spawned units. -function warehouse.Berlin:OnAfterSelfRequest(From,Event,To,groupset,request) - local groupset=groupset --Core.Set#SET_GROUP - local request=request --Functional.Warehouse#WAREHOUSE.Pendingitem - - -- Get assignment of this request. - local assignment=warehouse.Berlin:GetAssignment(request) - - if assignment=="To Battle Zone" then - - for _,group in pairs(groupset:GetSet()) do - local group=group --Wrapper.Group#GROUP - - -- Route group to Battle zone. - local ToCoord=BattleZone:GetRandomCoordinate() - group:RouteGroundOnRoad(ToCoord, group:GetSpeedMax()*0.8) - - -- After 3-5 minutes we create an explosion to destroy the group. - SCHEDULER:New(nil, Explosion, {group, 50}, math.random(180, 300)) - end - - end - -end - --- An asset has died ==> request resupply for it. -function warehouse.Berlin:OnAfterAssetDead(From, Event, To, asset, request) - local asset=asset --Functional.Warehouse#WAREHOUSE.Assetitem - local request=request --Functional.Warehouse#WAREHOUSE.Pendingitem - - -- Get assignment. - local assignment=warehouse.Berlin:GetAssignment(request) - - -- Request resupply for dead asset from Batumi. - warehouse.Batumi:AddRequest(warehouse.Berlin, WAREHOUSE.Descriptor.ATTRIBUTE, asset.attribute, 1, nil, nil, nil, "Resupply") - - -- Send asset to Battle zone either now or when they arrive. - warehouse.Berlin:AddRequest(warehouse.Berlin, WAREHOUSE.Descriptor.ATTRIBUTE, asset.attribute, 1, nil, nil, nil, assignment) -end diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/WHS-170 - Resupply.miz b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/WHS-170 - Resupply.miz deleted file mode 100644 index bde282b..0000000 Binary files a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/WHS-170 - Resupply.miz and /dev/null differ diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/pack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/unpack.ps1 b/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/WHS - Warehouse/Caucasus/WHS-170 - Resupply/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua b/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua deleted file mode 100644 index 82baa19..0000000 --- a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: ZON-100 - Normal Zone --- Author: FlightControl --- Date Created: 21 Feb 2017 --- --- # Situation: --- --- A ZONE has been defined, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the zone perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -ZoneA = ZONE:New( "Zone A" ) -ZoneA:SmokeZone( SMOKECOLOR.White, 90 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupInside:IsCompletelyInZone( ZoneA ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz b/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz deleted file mode 100644 index 547daf5..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/ZON-100 - Normal Zone.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-100 - Normal Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.lua b/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.lua deleted file mode 100644 index 60f255f..0000000 --- a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: ZON-101 - Normal Zone - Random Point --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- Three zones are defined. --- 15 points are smoked in each zone. --- The first 15 points are blue smoked using the GetRandomVec2() API. --- The second 15 points are orange smoked using the GetRandomPointVec2() API. --- The third 15 points are red smoked using the GetRandomPointVec3() API. --- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. --- Note: At each zone an vehicle is placed, so you can view the smoking in external view. --- --- # Test cases: --- --- 1. Observe smoking of Blue smoke in Zone 1. --- 2. Observe smoking of Orange smoke in Zone 2. --- 3. Observe smoking of Red smoke in Zone 3. - -Zone1 = ZONE:New( "Zone 1" ) -Zone2 = ZONE:New( "Zone 2" ) -Zone3 = ZONE:New( "Zone 3" ) - -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end diff --git a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz b/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz deleted file mode 100644 index 1980950..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/ZON-101 - Normal Zone - Random Point.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-101 - Normal Zone - Random Point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.lua b/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.lua deleted file mode 100644 index 361f2a7..0000000 --- a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: ZON-100 - Normal Zone --- Author: FlightControl --- Date Created: 21 Feb 2017 --- --- # Situation: --- --- A ZONE has been defined, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the zone perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -ZoneA = ZONE:New( "Zone A" ) -ZoneA:BoundZone( 90 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupInside:IsCompletelyInZone( ZoneA ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.miz b/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.miz deleted file mode 100644 index 23b0a47..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/ZON-102 - Normal Zone Boundary.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-102 - Normal Zone Boundary/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.lua b/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.lua deleted file mode 100644 index 1a89315..0000000 --- a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.lua +++ /dev/null @@ -1,24 +0,0 @@ ---- --- Name: ZON-103 - Test if GROUP object is in ZONE --- Author: FlightControl --- Date Created: 31 Mar 2017 --- --- # Situation: --- --- A ZONE has been defined, and it is checked if a GROUP object is within the zone. --- --- # Test cases: --- --- 1. Observe the zone perimeter, and place the GROUP object in or out of the zone. --- 2. Observe the results of the functions. - - -GroupObject = GROUP:FindByName( "Group Object" ) - -Zone = ZONE:New( "Zone" ) - - -Zone:E( { "Group is completely in Zone:", GroupObject:IsCompletelyInZone( Zone ) } ) -Zone:E( { "Group is partially in Zone:", GroupObject:IsPartlyInZone( Zone ) } ) -Zone:E( { "Group is not in Zone:", GroupObject:IsNotInZone( Zone ) } ) - diff --git a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.miz b/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.miz deleted file mode 100644 index d6096bc..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/ZON-103 - Test if GROUP object is in ZONE.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-103 - Test if GROUP object is in ZONE/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.lua b/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.lua deleted file mode 100644 index eabb547..0000000 --- a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.lua +++ /dev/null @@ -1,34 +0,0 @@ ---- --- Name: ZON-110 - ZONE declared in ME --- Author: FlightControl --- Date Created: 21 May 2018 --- --- # Situation: --- --- A ZONE has been defined using the Mission Editor, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the zone perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - - -GroupInside = GROUP:FindByName( "Test Inside" ) -GroupOutside = GROUP:FindByName( "Test Outside" ) - --- Now I can find the zone instead of doing ZONE:New, because the ZONE object is already in MOOSE. ---ZoneA = ZONE:New( "Zone A" ) -ZoneA = ZONE:FindByName( "Zone A" ) -ZoneA:SmokeZone( SMOKECOLOR.White, 30 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupInside:IsCompletelyInZone( ZoneA ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.miz b/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.miz deleted file mode 100644 index a93819b..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/ZON-110 - ZONE declared in ME.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-110 - ZONE declared in ME/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.lua b/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.lua deleted file mode 100644 index 3455efb..0000000 --- a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.lua +++ /dev/null @@ -1,22 +0,0 @@ ---- --- Name: ZON-190 - Return SCENERY objects in Zone --- Author: FlightControl --- Date Created: 08 Oct 2017 --- --- # Situation: --- --- # Test cases: --- - - -Zone = ZONE:New( "Zone" ) - - -Zone:Scan( Object.Category.SCENERY ) - -for SceneryTypeName, SceneryData in pairs( Zone:GetScannedScenery() ) do - for SceneryName, SceneryObject in pairs( SceneryData ) do - local SceneryObject = SceneryObject -- Wrapper.Scenery#SCENERY - MESSAGE:NewType( "Scenery: " .. SceneryObject:GetTypeName() .. ", Coord LL DMS: " .. SceneryObject:GetCoordinate():ToStringLLDMS(), MESSAGE.Type.Information ):ToAll() - end -end \ No newline at end of file diff --git a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.miz b/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.miz deleted file mode 100644 index 1c13254..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/ZON-190 - Return SCENERY objects in Zone.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-190 - Return SCENERY objects in Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua b/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua deleted file mode 100644 index c59865b..0000000 --- a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: ZON-200 - Group Zone --- Author: FlightControl --- Date Created: 21 Feb 2017 --- --- # Situation: --- --- A ZONE_GROUP has been defined, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the zone perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -Tank = GROUP:FindByName( "Tank" ) -ZoneA = ZONE_GROUP:New( "Zone A", Tank, 100 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupInside:IsCompletelyInZone( ZoneA ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - -TankZoneColoring = SCHEDULER:New( nil, - function() - ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) - end, - {}, 0, 5 ) \ No newline at end of file diff --git a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz b/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz deleted file mode 100644 index 4ad2003..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/ZON-200 - Group Zone.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-200 - Group Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.lua b/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.lua deleted file mode 100644 index 38d0736..0000000 --- a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: ZON-201 - Group Zone - Random Point --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- Three zones are defined. --- 15 points are smoked in each zone. --- The first 15 points are blue smoked using the GetRandomVec2() API. --- The second 15 points are orange smoked using the GetRandomPointVec2() API. --- The third 15 points are red smoked using the GetRandomPointVec3() API. --- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. --- Note: At each zone an vehicle is placed, so you can view the smoking in external view. --- --- # Test cases: --- --- 1. Observe smoking of Blue smoke in Zone 1. --- 2. Observe smoking of Orange smoke in Zone 2. --- 3. Observe smoking of Red smoke in Zone 3. - -Zone1 = ZONE_GROUP:New( "Zone 1", GROUP:FindByName( "Zone 1" ), 300 ) -Zone2 = ZONE_GROUP:New( "Zone 2", GROUP:FindByName( "Zone 2" ), 300 ) -Zone3 = ZONE_GROUP:New( "Zone 3", GROUP:FindByName( "Zone 3" ), 300 ) - -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end diff --git a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz b/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz deleted file mode 100644 index f9ef532..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/ZON-201 - Group Zone - Random Point.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-201 - Group Zone - Random Point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua b/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua deleted file mode 100644 index e27334e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.lua +++ /dev/null @@ -1,36 +0,0 @@ ---- --- Name: ZON-300 - Unit Zone --- Author: FlightControl --- Date Created: 21 Feb 2017 --- --- # Situation: --- --- A ZONE_UNIT has been defined, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the zone perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -Tank = UNIT:FindByName( "Tank" ) -ZoneA = ZONE_UNIT:New( "Zone A", Tank, 100 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupInside:IsCompletelyInZone( ZoneA ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - -TankZoneColoring = SCHEDULER:New( nil, - function() - ZoneA:FlareZone( FLARECOLOR.White, 90, 60 ) - end, - {}, 0, 5 ) \ No newline at end of file diff --git a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz b/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz deleted file mode 100644 index 0adcbfd..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/ZON-300 - Unit Zone.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-300 - Unit Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.lua b/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.lua deleted file mode 100644 index db53722..0000000 --- a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: ZON-301 - Unit Zone - Random Point --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- Three zones are defined. --- 15 points are smoked in each zone. --- The first 15 points are blue smoked using the GetRandomVec2() API. --- The second 15 points are orange smoked using the GetRandomPointVec2() API. --- The third 15 points are red smoked using the GetRandomPointVec3() API. --- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. --- Note: At each zone an vehicle is placed, so you can view the smoking in external view. --- --- # Test cases: --- --- 1. Observe smoking of Blue smoke in Zone 1. --- 2. Observe smoking of Orange smoke in Zone 2. --- 3. Observe smoking of Red smoke in Zone 3. - -Zone1 = ZONE_UNIT:New( "Zone 1", UNIT:FindByName( "Zone 1" ), 300 ) -Zone2 = ZONE_UNIT:New( "Zone 2", UNIT:FindByName( "Zone 2" ), 300 ) -Zone3 = ZONE_UNIT:New( "Zone 3", UNIT:FindByName( "Zone 3" ), 300 ) - -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end diff --git a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz b/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz deleted file mode 100644 index 37e853f..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/ZON-301 - Unit Zone - Random Point.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-301 - Unit Zone - Random Point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua b/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua deleted file mode 100644 index c73a636..0000000 --- a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: ZON-400 - Radius Zone --- Author: FlightControl --- Date Created: 21 Feb 2017 --- --- # Situation: --- --- A ZONE_RADIUS has been defined, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the polygon perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -House = STATIC:FindByName( "House" ) -ZoneA = ZONE_RADIUS:New( "Zone A", House:GetVec2(), 300 ) -ZoneA:SmokeZone( SMOKECOLOR.White, 90 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( ZoneA ) ) and "Inside Zone A" or "Outside Zone A", 1 ) - if GroupInside:IsCompletelyInZone( ZoneA ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz b/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz deleted file mode 100644 index ec443e5..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/ZON-400 - Radius Zone.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-400 - Radius Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.lua b/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.lua deleted file mode 100644 index b3d5112..0000000 --- a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.lua +++ /dev/null @@ -1,48 +0,0 @@ ---- --- Name: ZON-401 - Radius Zone - Random Point --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- Three zones are defined. --- 15 points are smoked in each zone. --- The first 15 points are blue smoked using the GetRandomVec2() API. --- The second 15 points are orange smoked using the GetRandomPointVec2() API. --- The third 15 points are red smoked using the GetRandomPointVec3() API. --- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. --- Note: At each zone an vehicle is placed, so you can view the smoking in external view. --- --- # Test cases: --- --- 1. Observe smoking of Blue smoke in Zone 1. --- 2. Observe smoking of Orange smoke in Zone 2. --- 3. Observe smoking of Red smoke in Zone 3. - -Unit1 = UNIT:FindByName( "Zone 1" ) -Unit2 = UNIT:FindByName( "Zone 2" ) -Unit3 = UNIT:FindByName( "Zone 3" ) - - -Zone1 = ZONE_RADIUS:New( "Zone 1", Unit1:GetVec2(), 300 ) -Zone2 = ZONE_RADIUS:New( "Zone 2", Unit2:GetVec2(), 300 ) -Zone3 = ZONE_RADIUS:New( "Zone 3", Unit3:GetVec2(), 300 ) - -Zone1:SmokeZone( SMOKECOLOR.White, 18 ) -Zone2:SmokeZone( SMOKECOLOR.White, 18 ) -Zone3:SmokeZone( SMOKECOLOR.White, 18 ) - -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end diff --git a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz b/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz deleted file mode 100644 index f84ccb3..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/ZON-401 - Radius Zone - Random Point.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-401 - Radius Zone - Random Point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua b/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua deleted file mode 100644 index b5201c1..0000000 --- a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- --- Name: ZON-500 - Polygon Zone --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- A ZONE_POLYGON has been defined, which boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the polygon perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -GroupPolygon = GROUP:FindByName( "Polygon A" ) - -PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) -PolygonZone:SmokeZone( SMOKECOLOR.White, 20 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) - if GroupInside:IsCompletelyInZone( PolygonZone ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz b/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz deleted file mode 100644 index 73dac85..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/ZON-500 - Polygon Zone.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-500 - Polygon Zone/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.lua b/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.lua deleted file mode 100644 index 545c7d9..0000000 --- a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.lua +++ /dev/null @@ -1,43 +0,0 @@ ---- --- Name: ZON-501 - Polygon Zone - Random Point --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- Three zones are defined. --- 15 points are smoked in each zone. --- The first 15 points are blue smoked using the GetRandomVec2() API. --- The second 15 points are orange smoked using the GetRandomPointVec2() API. --- The third 15 points are red smoked using the GetRandomPointVec3() API. --- Note: The zones perimeters are also smoked in white, so you can observe the random point placement. --- Note: At each zone an vehicle is placed, so you can view the smoking in external view. --- --- # Test cases: --- --- 1. Observe smoking of Blue smoke in Zone 1. --- 2. Observe smoking of Orange smoke in Zone 2. --- 3. Observe smoking of Red smoke in Zone 3. - -Zone1 = ZONE_POLYGON:New( "Zone 1", GROUP:FindByName( "Zone 1" ) ) -Zone2 = ZONE_POLYGON:New( "Zone 2", GROUP:FindByName( "Zone 2" ) ) -Zone3 = ZONE_POLYGON:New( "Zone 3", GROUP:FindByName( "Zone 3" ) ) - -Zone1:SmokeZone( SMOKECOLOR.White, 4 ) -Zone2:SmokeZone( SMOKECOLOR.White, 4 ) -Zone3:SmokeZone( SMOKECOLOR.White, 4 ) - -for i = 1, 15 do - -- Zone 1 - local Vec2 = Zone1:GetRandomVec2() - local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 ) - PointVec2:SmokeBlue() - - -- Zone 2 - local PointVec2 = Zone2:GetRandomPointVec2() - PointVec2:SmokeOrange() - - -- Zone 3 - local PointVec3 = Zone3:GetRandomPointVec3() - PointVec3:SmokeRed() -end diff --git a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz b/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz deleted file mode 100644 index 77789e5..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/ZON-501 - Polygon Zone - Random Point.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-501 - Polygon Zone - Random Point/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.lua b/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.lua deleted file mode 100644 index c307515..0000000 --- a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.lua +++ /dev/null @@ -1,33 +0,0 @@ ---- --- Name: ZON-502 - Polygon Zone Boundary --- Author: FlightControl --- Date Created: 18 Feb 2017 --- --- # Situation: --- --- A ZONE_POLYGON has been defined, which boundaries are tires. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the polygon perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -GroupPolygon = GROUP:FindByName( "Polygon A" ) - -PolygonZone = ZONE_POLYGON:New( "Polygon A", GroupPolygon ) -PolygonZone:BoundZone() - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) - if GroupInside:IsCompletelyInZone( PolygonZone ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.miz b/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.miz deleted file mode 100644 index a7d44a9..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/ZON-502 - Polygon Zone Boundary.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-502 - Polygon Zone Boundary/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.lua b/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.lua deleted file mode 100644 index f81020e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.lua +++ /dev/null @@ -1,32 +0,0 @@ ---- --- Name: ZON-510 - ZONE_POLYGON declared in ME --- Author: FlightControl --- Date Created: 21 May 2018 --- --- # Situation: --- --- A ZONE_POLYGON has been defined, within the mission editor using ~ZONE_POLYGON in the group name. --- Its boundaries are smoking. --- A vehicle is driving through the zone perimeters. --- When the vehicle is driving in the zone, a red smoke is fired from the vehicle location. --- --- # Test cases: --- --- 1. Observe the polygon perimeter smoke. --- 2. Observe the vehicle smoking a red smoke when driving through the zone. - -GroupInside = GROUP:FindByName( "Test Inside Polygon" ) -GroupOutside = GROUP:FindByName( "Test Outside Polygon" ) - -PolygonZone = ZONE_POLYGON:FindByName( "Polygon A" ) -PolygonZone:SmokeZone( SMOKECOLOR.White, 10 ) - -Messager = SCHEDULER:New( nil, - function() - GroupInside:MessageToAll( ( GroupInside:IsCompletelyInZone( PolygonZone ) ) and "Inside Polygon A" or "Outside Polygon A", 1 ) - if GroupInside:IsCompletelyInZone( PolygonZone ) then - GroupInside:GetUnit(1):SmokeRed() - end - end, - {}, 0, 1 ) - diff --git a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.miz b/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.miz deleted file mode 100644 index 8b9f848..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/ZON-510 - ZONE_POLYGON declared in ME.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/pack.ps1 deleted file mode 100644 index bbac66e..0000000 --- a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/pack.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf - -$dir -$file - -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/unpack.ps1 deleted file mode 100644 index c208a31..0000000 --- a/Moose_Missions/ZON - Zones/ZON-510 - ZONE_POLYGON declared in ME/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/ZON-520 - Draw Zones and Shapes.lua b/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/ZON-520 - Draw Zones and Shapes.lua deleted file mode 100644 index 5da1f24..0000000 --- a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/ZON-520 - Draw Zones and Shapes.lua +++ /dev/null @@ -1,58 +0,0 @@ ---- --- This demo mission illustrates how to draw zones (circular and polygon) defined in the Mission Editor on the F10 map. --- --- Furthermore, it shows how to create circles, rectangles, lines, arrows and text at arbitrary coordinates on the F10 map. ---- - --- Circular zone defined in the ME. -local circzone=ZONE:New("Circular Zone") - --- Draw the zone on the F10 map. Colors are taken from the ME settings. -circzone:DrawZone() - - --- Quad-point zone defined in the ME. -local quadzone=ZONE:New("Quad Zone") --Core.Zone#ZONE_POLYGON_BASE - --- Draw the zone on the F10 map. Colors are taken from the ME settings. -quadzone:DrawZone() - --- After 600 seconds, the drawing is removed. -quadzone:UndrawZone(500) - - --- Polygon zone defined by waypoints of the group "Rotary-1". This surrounds a lake near Poti. -local polyzone=ZONE_POLYGON:NewFromGroupName("Rotary-1") - --- Draw the zone. Line color is green, fill color is turquoise with 50% alpha. Line type is dashed. -polyzone:DrawZone(-1, {0,1,0}, 1.0, {0,1,1}, 0.5, 2) - - --- Get coordinates of some airbases of the map. -local coordBatumi=AIRBASE:FindByName("Batumi"):GetCoordinate() -local coordKobuleti=AIRBASE:FindByName("Kobuleti"):GetCoordinate() -local coordGudauta=AIRBASE:FindByName(AIRBASE.Caucasus.Gudauta):GetCoordinate() -local coordKrymsk=AIRBASE:FindByName(AIRBASE.Caucasus.Krymsk):GetCoordinate() -local coordBeslan=AIRBASE:FindByName(AIRBASE.Caucasus.Beslan):GetCoordinate() -local coordNalchik=AIRBASE:FindByName(AIRBASE.Caucasus.Nalchik):GetCoordinate() -local coordMinVody=AIRBASE:FindByName(AIRBASE.Caucasus.Mineralnye_Vody):GetCoordinate() -local coordMozdok=AIRBASE:FindByName(AIRBASE.Caucasus.Mozdok):GetCoordinate() - - --- Draw a circle with 15 km radius around Krymsk Airbase. -coordKrymsk:CircleToAll(15000) - --- Draw a rectancle. First corner is Gudauta. Opposite corner is 30000 meters in heading 135 degrees. -coordGudauta:RectToAll(coordGudauta:Translate(30000, 135)) - --- Draw a quad-point shape. Corners are defined by the airbases. -coordBeslan:QuadToAll(coordNalchik, coordMinVody, coordMozdok, nil, {1,0,1}, nil, {0,1,0}, 0.8, 4) - --- Draw a blue line from Mozdok to Krymsk. -coordMozdok:LineToAll(coordKrymsk, nil, {0,0,1}) - --- Draw a green arrow from Batumi to a ship group called "Naval-1". This arrow is only visible to the blue coalition. -coordBatumi:ArrowToAll(GROUP:FindByName("Naval-1"):GetCoordinate(), 2, {0,1,0}) - --- Write text "Target Warehouse" at position of a static warehouse. -STATIC:FindByName("Static Warehouse-1"):GetCoordinate():TextToAll("Target Warehouse") \ No newline at end of file diff --git a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/ZON-520 - Draw Zones and Shapes.miz b/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/ZON-520 - Draw Zones and Shapes.miz deleted file mode 100644 index 3a8ff67..0000000 Binary files a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/ZON-520 - Draw Zones and Shapes.miz and /dev/null differ diff --git a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/pack.ps1 b/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/pack.ps1 deleted file mode 100644 index caa79ef..0000000 --- a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/pack.ps1 +++ /dev/null @@ -1,6 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -cd "_unpacked" -. 7z a -r -y -tzip "..\$file.miz" * -cd .. diff --git a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/unpack.ps1 b/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/unpack.ps1 deleted file mode 100644 index 0206e08..0000000 --- a/Moose_Missions/ZON - Zones/ZON-520 - Draw Zones and Shapes/unpack.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$dir = split-path -parent $MyInvocation.MyCommand.Definition -cd $dir -$file = Split-Path $dir -leaf -Remove-Item .\_unpacked -Force -Recurse -md "_unpacked" -cd "_unpacked" -. 7z x -r -y "..\$file.miz" * diff --git a/Moose_TADC/Cargo_Delivered.ogg b/Moose_TADC/Cargo_Delivered.ogg deleted file mode 100644 index c223eef..0000000 Binary files a/Moose_TADC/Cargo_Delivered.ogg and /dev/null differ diff --git a/Moose_TADC/Moose_TADC_CargoDispatcher.lua b/Moose_TADC/Moose_TADC_CargoDispatcher.lua deleted file mode 100644 index 908c018..0000000 --- a/Moose_TADC/Moose_TADC_CargoDispatcher.lua +++ /dev/null @@ -1,871 +0,0 @@ ---[[ -═══════════════════════════════════════════════════════════════════════════════ - Moose_TDAC_CargoDispatcher.lua - Automated Logistics System for TADC Squadron Replenishment -═══════════════════════════════════════════════════════════════════════════════ - -DESCRIPTION: - This script monitors RED and BLUE squadrons for low aircraft counts and automatically dispatches CARGO aircraft from a list of supply airfields to replenish them. - It spawns cargo aircraft and routes them to destination airbases. Delivery detection and replenishment is handled by the main TADC system. - -CONFIGURATION: - - Update static templates and airfield lists as needed for your mission. - - Set thresholds and supply airfields in CARGO_SUPPLY_CONFIG. - - Replace static templates with actual group templates from the mission editor for realism. - -REQUIRES: - - MOOSE framework (for SPAWN, AIRBASE, etc.) - - Optional: MIST for deep copy of templates - -═══════════════════════════════════════════════════════════════════════════════ -]] - --- Single-run guard to prevent duplicate dispatcher loops if script is reloaded -if _G.__TDAC_DISPATCHER_RUNNING then - env.info("[TDAC] CargoDispatcher already running; aborting duplicate load") - return -end -_G.__TDAC_DISPATCHER_RUNNING = true - ---[[ - GLOBAL STATE AND CONFIGURATION - -------------------------------------------------------------------------- - Tracks all active cargo missions and dispatcher configuration. -]] -if not cargoMissions then - cargoMissions = { red = {}, blue = {} } -end - --- Dispatcher config (interval in seconds) -if not DISPATCHER_CONFIG then - -- default interval (seconds) and a slightly larger grace period to account for slow servers/networks - DISPATCHER_CONFIG = { interval = 60, gracePeriod = 25 } -end - --- Safety flag: when false, do NOT fall back to spawning from in-memory template tables. --- Set to true if you understand the tweaked-template warning and accept the risk. -if DISPATCHER_CONFIG.ALLOW_FALLBACK_TO_INMEM_TEMPLATE == nil then - DISPATCHER_CONFIG.ALLOW_FALLBACK_TO_INMEM_TEMPLATE = false -end - ---[[ - CARGO SUPPLY CONFIGURATION - -------------------------------------------------------------------------- - Set supply airfields, cargo template names, and resupply thresholds for each coalition. -]] -local CARGO_SUPPLY_CONFIG = { - red = { - supplyAirfields = { "Sochi-Adler", "Gudauta", "Sukhumi-Babushara", "Nalchik", "Beslan", "Maykop-Khanskaya" }, -- replace with your RED supply airbase names - cargoTemplate = "CARGO_RED_AN26", -- replace with your RED cargo aircraft template name - threshold = 0.90 -- ratio below which to trigger resupply (testing) - }, - blue = { - supplyAirfields = { "Batumi", "Kobuleti", "Senaki-Kolkhi", "Kutaisi", "Soganlug" }, -- replace with your BLUE supply airbase names - cargoTemplate = "CARGO_BLUE_C130", -- replace with your BLUE cargo aircraft template name - threshold = 0.90 -- ratio below which to trigger resupply (testing) - } -} - - - ---[[ - UTILITY STUBS - -------------------------------------------------------------------------- - selectRandomAirfield: Picks a random airfield from a list. - announceToCoalition: Stub for in-game coalition messaging. - Replace with your own logic as needed. -]] -if not selectRandomAirfield then - function selectRandomAirfield(airfieldList) - if type(airfieldList) == "table" and #airfieldList > 0 then - return airfieldList[math.random(1, #airfieldList)] - end - return nil - end -end - --- Stub for announceToCoalition (replace with your own logic if needed) -if not announceToCoalition then - function announceToCoalition(coalitionKey, message) - -- Replace with actual in-game message logic - env.info("[ANNOUNCE] [" .. tostring(coalitionKey) .. "]: " .. tostring(message)) - end -end - - ---[[ - LOGGING - -------------------------------------------------------------------------- - Advanced logging configuration and helper function for debug output. -]] -local ADVANCED_LOGGING = { - enableDetailedLogging = false, - logPrefix = "[TADC Cargo]" -} - --- Logging function (must be defined before any log() calls) -local function log(message, detailed) - if not detailed or ADVANCED_LOGGING.enableDetailedLogging then - env.info(ADVANCED_LOGGING.logPrefix .. " " .. message) - end -end - -log("═══════════════════════════════════════════════════════════════════════════════", true) -log("Moose_TDAC_CargoDispatcher.lua loaded.", true) -log("═══════════════════════════════════════════════════════════════════════════════", true) - - --- Provide a safe deepCopy if MIST is not available -local function deepCopy(obj) - if type(obj) ~= 'table' then return obj end - local res = {} - for k, v in pairs(obj) do - if type(v) == 'table' then - res[k] = deepCopy(v) - else - res[k] = v - end - end - return res -end - --- Dispatch cooldown per airbase (seconds) to avoid repeated immediate retries -local CARGO_DISPATCH_COOLDOWN = DISPATCHER_CONFIG and DISPATCHER_CONFIG.cooldown or 300 -- default 5 minutes -local lastDispatchAttempt = { red = {}, blue = {} } - -local function getCoalitionSide(coalitionKey) - if coalitionKey == 'blue' then return coalition.side.BLUE end - if coalitionKey == 'red' then return coalition.side.RED end - return nil -end - --- Forward-declare parking check helper so functions defined earlier can call it -local destinationHasSuitableParking - --- Validate dispatcher configuration: check that supply airfields exist and templates appear valid -local function validateDispatcherConfig() - local problems = {} - - -- Check supply airfields exist - for coalitionKey, cfg in pairs(CARGO_SUPPLY_CONFIG) do - if cfg and cfg.supplyAirfields and type(cfg.supplyAirfields) == 'table' then - for _, abName in ipairs(cfg.supplyAirfields) do - local ok, ab = pcall(function() return AIRBASE:FindByName(abName) end) - if not ok or not ab then - table.insert(problems, string.format("Missing airbase for %s supply list: '%s'", tostring(coalitionKey), tostring(abName))) - end - end - else - table.insert(problems, string.format("Missing or invalid supplyAirfields for coalition '%s'", tostring(coalitionKey))) - end - - -- Check cargo template presence (best-effort using SPAWN:New if available) - if cfg and cfg.cargoTemplate and type(cfg.cargoTemplate) == 'string' and cfg.cargoTemplate ~= '' then - local okSpawn, spawnObj = pcall(function() return SPAWN:New(cfg.cargoTemplate) end) - if not okSpawn or not spawnObj then - -- SPAWN:New may not be available at load time; warn but don't fail hard - table.insert(problems, string.format("Cargo template suspicious or missing: '%s' (coalition: %s)", tostring(cfg.cargoTemplate), tostring(coalitionKey))) - end - else - table.insert(problems, string.format("Missing cargoTemplate for coalition '%s'", tostring(coalitionKey))) - end - end - - if #problems == 0 then - log("TDAC Dispatcher config validation passed ✓", true) - MESSAGE:New("TDAC Dispatcher config validation passed ✓", 15):ToAll() - return true, {} - else - log("TDAC Dispatcher config validation found issues:", true) - MESSAGE:New("TDAC Dispatcher config validation found issues:" .. table.concat(problems, ", "), 15):ToAll() - for _, p in ipairs(problems) do - log(" ✗ " .. p, true) - end - return false, problems - end -end - --- Expose console helper to run the check manually -function _G.TDAC_RunConfigCheck() - local ok, problems = validateDispatcherConfig() - if ok then - return true, "OK" - else - return false, problems - end -end - - - ---[[ - getSquadronStatus(squadron, coalitionKey) - -------------------------------------------------------------------------- - Returns the current, max, and ratio of aircraft for a squadron. - If you track current aircraft in a table, update this logic accordingly. - Returns: currentCount, maxCount, ratio -]] -local function getSquadronStatus(squadron, coalitionKey) - local current = squadron.current or squadron.count or squadron.aircraft or 0 - local max = squadron.max or squadron.aircraft or 1 - if squadron.templateName and _G.squadronAircraftCounts and _G.squadronAircraftCounts[coalitionKey] then - current = _G.squadronAircraftCounts[coalitionKey][squadron.templateName] or current - end - local ratio = (max > 0) and (current / max) or 0 - return current, max, ratio -end - - - ---[[ - hasActiveCargoMission(coalitionKey, airbaseName) - -------------------------------------------------------------------------- - Returns true if there is an active (not completed/failed) cargo mission for the given airbase. - Failed missions are immediately removed from tracking to allow retries. -]] -local function hasActiveCargoMission(coalitionKey, airbaseName) - for i = #cargoMissions[coalitionKey], 1, -1 do - local mission = cargoMissions[coalitionKey][i] - if mission.destination == airbaseName then - -- Remove completed or failed missions immediately to allow retries - if mission.status == "completed" or mission.status == "failed" then - log("Removing " .. mission.status .. " cargo mission for " .. airbaseName .. " from tracking") - table.remove(cargoMissions[coalitionKey], i) - else - -- Consider mission active only if the group is alive OR we're still within the grace window - local stillActive = false - if mission.group and mission.group.IsAlive and mission.group:IsAlive() then - stillActive = true - else - local pending = mission._pendingStartTime - local grace = mission._gracePeriod or DISPATCHER_CONFIG.gracePeriod or 8 - if pending and (timer.getTime() - pending) <= grace then - stillActive = true - end - end - if stillActive then - log("Active cargo mission found for " .. airbaseName .. " (" .. coalitionKey .. ")") - return true - end - end - end - end - log("No active cargo mission for " .. airbaseName .. " (" .. coalitionKey .. ")") - return false -end - ---[[ - trackCargoMission(coalitionKey, mission) - -------------------------------------------------------------------------- - Adds a new cargo mission to the tracking table and logs it. -]] -local function trackCargoMission(coalitionKey, mission) - table.insert(cargoMissions[coalitionKey], mission) - log("Tracking new cargo mission: " .. (mission.group and mission.group:GetName() or "nil group") .. " from " .. mission.origin .. " to " .. mission.destination) -end - ---[[ - cleanupCargoMissions() - -------------------------------------------------------------------------- - Removes failed cargo missions from the tracking table if their group is no longer alive. -]] -local function cleanupCargoMissions() - for _, coalitionKey in ipairs({"red", "blue"}) do - for i = #cargoMissions[coalitionKey], 1, -1 do - local m = cargoMissions[coalitionKey][i] - if m.status == "failed" or m.status == "completed" then - if not (m.group and m.group:IsAlive()) then - log("Cleaning up " .. m.status .. " cargo mission: " .. (m.group and m.group:GetName() or "nil group")) - table.remove(cargoMissions[coalitionKey], i) - end - end - end - end -end - ---[[ - dispatchCargo(squadron, coalitionKey) - -------------------------------------------------------------------------- - Spawns a cargo aircraft from a supply airfield to the destination squadron airbase. - Uses static templates for each coalition, assigns a unique group name, and sets a custom route. - Tracks the mission and schedules route assignment with a delay to ensure group is alive. -]] -local function dispatchCargo(squadron, coalitionKey) - local config = CARGO_SUPPLY_CONFIG[coalitionKey] - local origin - local attempts = 0 - local maxAttempts = 10 - local coalitionSide = getCoalitionSide(coalitionKey) - - repeat - origin = selectRandomAirfield(config.supplyAirfields) - attempts = attempts + 1 - - -- Ensure origin is not the same as destination - if origin == squadron.airbaseName then - origin = nil - else - -- Validate that origin airbase exists and is controlled by correct coalition - local originAirbase = AIRBASE:FindByName(origin) - if not originAirbase then - log("WARNING: Origin airbase '" .. tostring(origin) .. "' does not exist. Trying another...") - origin = nil - elseif originAirbase:GetCoalition() ~= coalitionSide then - log("WARNING: Origin airbase '" .. tostring(origin) .. "' is not controlled by " .. coalitionKey .. " coalition. Trying another...") - origin = nil - end - end - until origin or attempts >= maxAttempts - - -- enforce cooldown per destination to avoid immediate retries - lastDispatchAttempt[coalitionKey] = lastDispatchAttempt[coalitionKey] or {} - local last = lastDispatchAttempt[coalitionKey][squadron.airbaseName] - if last and (timer.getTime() - last) < CARGO_DISPATCH_COOLDOWN then - log("Skipping dispatch to " .. squadron.airbaseName .. " (cooldown active)") - return - end - if not origin then - log("No valid origin airfield found for cargo dispatch to " .. squadron.airbaseName .. " (avoiding same origin/destination)") - return - end - local destination = squadron.airbaseName - local cargoTemplate = config.cargoTemplate - -- Safety: check if destination has suitable parking for larger transports. If not, warn in log. - local okParking = true - -- Only check for likely large transports (C-130 / An-26 are large-ish) — keep conservative - if cargoTemplate and (string.find(cargoTemplate:upper(), "C130") or string.find(cargoTemplate:upper(), "C-17") or string.find(cargoTemplate:upper(), "C17") or string.find(cargoTemplate:upper(), "AN26") ) then - okParking = destinationHasSuitableParking(destination) - if not okParking then - log("WARNING: Destination '" .. tostring(destination) .. "' may not have suitable parking for " .. tostring(cargoTemplate) .. ". Skipping dispatch to prevent despawn.") - return - end - end - local groupName = cargoTemplate .. "_to_" .. destination .. "_" .. math.random(1000,9999) - - log("Dispatching cargo: " .. groupName .. " from " .. origin .. " to " .. destination) - - -- Spawn cargo aircraft at origin using the template name ONLY for SPAWN - -- Note: cargoTemplate is a config string; script uses in-file Lua template tables (CARGO_AIRCRAFT_TEMPLATE_*) - log("DEBUG: Attempting spawn for group: '" .. groupName .. "' at airbase: '" .. origin .. "' (using in-file Lua template)", true) - local airbaseObj = AIRBASE:FindByName(origin) - if not airbaseObj then - log("ERROR: AIRBASE:FindByName failed for '" .. tostring(origin) .. "'. Airbase object is nil!") - else - log("DEBUG: AIRBASE object found for '" .. origin .. "'. Proceeding with spawn.", true) - end - -- Select the correct template based on coalition - local templateBase, uniqueGroupName - if coalitionKey == "blue" then - templateBase = CARGO_AIRCRAFT_TEMPLATE_BLUE - uniqueGroupName = "CARGO_C130_DYNAMIC_" .. math.random(1000,9999) - else - templateBase = CARGO_AIRCRAFT_TEMPLATE_RED - uniqueGroupName = "CARGO_AN26_DYNAMIC_" .. math.random(1000,9999) - end - -- Clone the template and set the group/unit name - -- Prepare a mission placeholder. We'll set the group and spawnPos after successful spawn. - local mission = { - group = nil, - origin = origin, - destination = destination, - squadron = squadron, - status = "pending", - -- Anchor a pending start time now to avoid the monitor loop expiring a mission - -- before MOOSE has a chance to finalize the OnSpawnGroup callback. - _pendingStartTime = timer.getTime(), - _spawnPos = nil, - _gracePeriod = DISPATCHER_CONFIG.gracePeriod or 8 - } - - -- Helper to finalize mission after successful spawn - local function finalizeMissionAfterSpawn(spawnedGroup, spawnPos) - mission.group = spawnedGroup - mission._spawnPos = spawnPos - trackCargoMission(coalitionKey, mission) - lastDispatchAttempt[coalitionKey][squadron.airbaseName] = timer.getTime() - end - - -- MOOSE-only spawn-by-name flow - if type(cargoTemplate) ~= 'string' or cargoTemplate == '' then - log("ERROR: cargoTemplate for coalition '" .. tostring(coalitionKey) .. "' must be a valid mission template name string. Aborting dispatch.") - announceToCoalition(coalitionKey, "Resupply mission to " .. destination .. " aborted (invalid cargo template)!") - return - end - - -- Use a per-dispatch RAT object to spawn and route cargo aircraft. - -- Create a unique alias to avoid naming collisions and let RAT handle routing/landing. - local alias = cargoTemplate .. "_TO_" .. destination .. "_" .. tostring(math.random(1000,9999)) - log("DEBUG: Attempting RAT spawn for template: '" .. cargoTemplate .. "' alias: '" .. alias .. "'", true) - - -- Validate destination airbase: RAT's "Airbase doesn't exist" error actually means - -- "Airbase not found OR not owned by the correct coalition" because RAT filters by coalition internally. - -- We perform the same validation here to fail fast with better error messages. - local destAirbase = AIRBASE:FindByName(destination) - local coalitionSide = getCoalitionSide(coalitionKey) - - if not destAirbase then - log("ERROR: Destination airbase '" .. destination .. "' does not exist in DCS (invalid name or not on this map). Skipping dispatch.") - announceToCoalition(coalitionKey, "Resupply mission to " .. destination .. " failed (airbase not found on map)!") - -- Mark mission as failed and cleanup immediately - mission.status = "failed" - return - end - - local destCoalition = destAirbase:GetCoalition() - if destCoalition ~= coalitionSide then - log("INFO: Destination airbase '" .. destination .. "' captured by enemy - cargo dispatch skipped (normal mission state).", true) - -- No announcement to coalition - this is expected behavior when base is captured - -- Mark mission as failed and cleanup immediately - mission.status = "failed" - return - end - - -- Validate origin airbase with same coalition filtering logic - local originAirbase = AIRBASE:FindByName(origin) - if not originAirbase then - log("ERROR: Origin airbase '" .. origin .. "' does not exist in DCS (invalid name or not on this map). Skipping dispatch.") - announceToCoalition(coalitionKey, "Resupply mission from " .. origin .. " failed (airbase not found on map)!") - -- Mark mission as failed and cleanup immediately - mission.status = "failed" - return - end - - local originCoalition = originAirbase:GetCoalition() - if originCoalition ~= coalitionSide then - log("INFO: Origin airbase '" .. origin .. "' captured by enemy - trying another supply source.", true) - -- Don't announce or mark as failed - the dispatcher will try another origin - return - end - - local okNew, rat = pcall(function() return RAT:New(cargoTemplate, alias) end) - if not okNew or not rat then - log("ERROR: RAT:New failed for template '" .. tostring(cargoTemplate) .. "'. Error: " .. tostring(rat)) - if debug and debug.traceback then - log("TRACEBACK: " .. tostring(debug.traceback(rat)), true) - end - announceToCoalition(coalitionKey, "Resupply mission to " .. destination .. " failed (spawn init error)!") - -- Mark mission as failed and cleanup immediately - do NOT track failed RAT spawns - mission.status = "failed" - return - end - - -- Configure RAT for a single, non-respawning dispatch - rat:SetDeparture(origin) - rat:SetDestination(destination) - rat:NoRespawn() - rat:InitUnControlled(false) -- force departing transports to spawn in a controllable state - rat:InitLateActivated(false) - rat:SetSpawnLimit(1) - rat:SetSpawnDelay(1) - - -- CRITICAL: Force takeoff from runway to prevent aircraft getting stuck at parking - -- SetTakeoffRunway() ensures aircraft spawn directly on runway and take off immediately - if rat.SetTakeoffRunway then - rat:SetTakeoffRunway() - log("DEBUG: Configured cargo to take off from runway at " .. origin, true) - else - log("WARNING: SetTakeoffRunway() not available - falling back to SetTakeoffHot()", true) - if rat.SetTakeoffHot then rat:SetTakeoffHot() end - end - - -- Ensure RAT will look for parking and not despawn the group immediately on landing. - -- This makes the group taxi to parking and come to a stop so other scripts (e.g. Load2nd) - -- that detect parked/stopped cargo aircraft can register the delivery. - if rat.SetParkingScanRadius then rat:SetParkingScanRadius(80) end - if rat.SetParkingSpotSafeON then rat:SetParkingSpotSafeON() end - if rat.SetDespawnAirOFF then rat:SetDespawnAirOFF() end - -- Check on runway to ensure proper landing behavior (distance in meters) - if rat.CheckOnRunway then rat:CheckOnRunway(true, 75) end - - rat:OnSpawnGroup(function(spawnedGroup) - -- Mark the canonical start time when MOOSE reports the group exists - mission._pendingStartTime = timer.getTime() - - local spawnPos = nil - local dcsGroup = spawnedGroup:GetDCSObject() - if dcsGroup then - local units = dcsGroup:getUnits() - if units and #units > 0 then - spawnPos = units[1]:getPoint() - end - end - - log("RAT spawned cargo aircraft group: " .. tostring(spawnedGroup:GetName())) - - -- Temporary debug: log group state every 10s for 10 minutes to trace landing/parking behavior - local debugChecks = 60 -- 60 * 10s = 10 minutes - local checkInterval = 10 - local function debugLogState(iter) - if iter > debugChecks then return end - local ok, err = pcall(function() - local name = spawnedGroup:GetName() - local dcs = spawnedGroup:GetDCSObject() - if dcs then - local units = dcs:getUnits() - if units and #units > 0 then - local u = units[1] - local pos = u:getPoint() - -- Use dot accessor to test for function existence; colon-call to invoke - local vel = (u.getVelocity and u:getVelocity()) or {x=0,y=0,z=0} - local speed = math.sqrt((vel.x or 0)^2 + (vel.y or 0)^2 + (vel.z or 0)^2) - local controller = dcs:getController() - local airbaseObj = AIRBASE:FindByName(destination) - local dist = nil - if airbaseObj then - local dest = airbaseObj:GetCoordinate():GetVec2() - local dx = pos.x - dest.x - local dz = pos.z - dest.y - dist = math.sqrt(dx*dx + dz*dz) - end - log(string.format("[TDAC DEBUG] %s state check %d: alive=%s pos=(%.1f,%.1f) speed=%.2f m/s distToDest=%s", name, iter, tostring(spawnedGroup:IsAlive()), pos.x or 0, pos.z or 0, speed, tostring(dist)), true) - else - log(string.format("[TDAC DEBUG] %s state check %d: DCS group has no units", tostring(spawnedGroup:GetName()), iter), true) - end - else - log(string.format("[TDAC DEBUG] %s state check %d: no DCS group object", tostring(spawnedGroup:GetName()), iter), true) - end - end) - if not ok then - log("[TDAC DEBUG] Error during debugLogState: " .. tostring(err), true) - end - timer.scheduleFunction(function() debugLogState(iter + 1) end, {}, timer.getTime() + checkInterval) - end - timer.scheduleFunction(function() debugLogState(1) end, {}, timer.getTime() + checkInterval) - - -- RAT should handle routing/taxi/parking. Finalize mission tracking now. - finalizeMissionAfterSpawn(spawnedGroup, spawnPos) - mission.status = "enroute" - mission._pendingStartTime = timer.getTime() - announceToCoalition(coalitionKey, "CARGO aircraft departing (airborne) for " .. destination .. ". Defend it!") - end) - - local okSpawn, errSpawn = pcall(function() rat:Spawn(1) end) - if not okSpawn then - log("ERROR: rat:Spawn() failed for template '" .. tostring(cargoTemplate) .. "'. Error: " .. tostring(errSpawn)) - if debug and debug.traceback then - log("TRACEBACK: " .. tostring(debug.traceback(errSpawn)), true) - end - announceToCoalition(coalitionKey, "Resupply mission to " .. destination .. " failed (spawn error)!") - -- Mark mission as failed and cleanup immediately - do NOT track failed spawns - mission.status = "failed" - return - end -end - - --- Parking diagnostics helper --- Call from DCS console: _G.TDAC_LogAirbaseParking("Luostari Pechenga") -function _G.TDAC_LogAirbaseParking(airbaseName) - if type(airbaseName) ~= 'string' then - log("TDAC Parking helper: airbaseName must be a string", true) - return false - end - local base = AIRBASE:FindByName(airbaseName) - if not base then - log("TDAC Parking helper: AIRBASE:FindByName returned nil for '" .. tostring(airbaseName) .. "'", true) - return false - end - local function spotsFor(term) - local ok, n = pcall(function() return base:GetParkingSpotsNumber(term) end) - if not ok then return nil end - return n - end - local openBig = spotsFor(AIRBASE.TerminalType.OpenBig) - local openMed = spotsFor(AIRBASE.TerminalType.OpenMed) - local openMedOrBig = spotsFor(AIRBASE.TerminalType.OpenMedOrBig) - local runway = spotsFor(AIRBASE.TerminalType.Runway) - log(string.format("TDAC Parking: %s -> OpenBig=%s OpenMed=%s OpenMedOrBig=%s Runway=%s", airbaseName, tostring(openBig), tostring(openMed), tostring(openMedOrBig), tostring(runway)), true) - return true -end - - --- Pre-dispatch safety check: ensure destination can accommodate larger transport types -destinationHasSuitableParking = function(destination, preferredTermTypes) - local base = AIRBASE:FindByName(destination) - if not base then return false end - preferredTermTypes = preferredTermTypes or { AIRBASE.TerminalType.OpenBig, AIRBASE.TerminalType.OpenMedOrBig, AIRBASE.TerminalType.OpenMed } - for _, term in ipairs(preferredTermTypes) do - local ok, n = pcall(function() return base:GetParkingSpotsNumber(term) end) - if ok and n and n > 0 then - return true - end - end - return false -end - - ---[[ - monitorSquadrons() - -------------------------------------------------------------------------- - Checks all squadrons for each coalition. If a squadron is below the resupply threshold and has no active cargo mission, - triggers a supply request and dispatches a cargo aircraft. - Skips squadrons that are captured or not operational. -]] -local function monitorSquadrons() - for _, coalitionKey in ipairs({"red", "blue"}) do - local config = CARGO_SUPPLY_CONFIG[coalitionKey] - local squadrons = (coalitionKey == "red") and RED_SQUADRON_CONFIG or BLUE_SQUADRON_CONFIG - for _, squadron in ipairs(squadrons) do - -- Skip non-operational squadrons (captured, destroyed, etc.) - if squadron.state and squadron.state ~= "operational" then - log("Squadron " .. squadron.displayName .. " (" .. coalitionKey .. ") is " .. squadron.state .. " - skipping cargo dispatch", true) - else - local current, max, ratio = getSquadronStatus(squadron, coalitionKey) - log("Squadron status: " .. squadron.displayName .. " (" .. coalitionKey .. ") " .. current .. "/" .. max .. " ratio: " .. string.format("%.2f", ratio)) - if ratio <= config.threshold and not hasActiveCargoMission(coalitionKey, squadron.airbaseName) then - log("Supply request triggered for " .. squadron.displayName .. " at " .. squadron.airbaseName) - announceToCoalition(coalitionKey, "Supply requested for " .. squadron.airbaseName .. "! Squadron: " .. squadron.displayName) - dispatchCargo(squadron, coalitionKey) - end - end - end - end -end - ---[[ - monitorCargoMissions() - -------------------------------------------------------------------------- - Monitors all cargo missions, updates their status, and cleans up failed ones. - Handles mission failure after a grace period. -]] -local function monitorCargoMissions() - for _, coalitionKey in ipairs({"red", "blue"}) do - for _, mission in ipairs(cargoMissions[coalitionKey]) do - if mission.group == nil then - log("[DEBUG] Mission group object is nil for mission to " .. tostring(mission.destination), true) - else - log("[DEBUG] Mission group: " .. tostring(mission.group:GetName()) .. ", IsAlive(): " .. tostring(mission.group:IsAlive()), true) - local dcsGroup = mission.group:GetDCSObject() - if dcsGroup then - local units = dcsGroup:getUnits() - if units and #units > 0 then - local pos = units[1]:getPoint() - log(string.format("[DEBUG] Group position: x=%.1f y=%.1f z=%.1f", pos.x, pos.y, pos.z), true) - else - log("[DEBUG] No units found in DCS group for mission to " .. tostring(mission.destination), true) - end - else - log("[DEBUG] DCS group object is nil for mission to " .. tostring(mission.destination), true) - end - end - - local graceElapsed = mission._pendingStartTime and (timer.getTime() - mission._pendingStartTime > (mission._gracePeriod or 8)) - - -- Only allow mission to be failed after grace period, and only if group is truly dead. - -- Some DCS/MOOSE group objects may momentarily report IsAlive() == false while units still exist, so - -- also check DCS object/unit presence before declaring failure. - if (mission.status == "pending" or mission.status == "enroute") and graceElapsed then - local isAlive = mission.group and mission.group:IsAlive() - local dcsGroup = mission.group and mission.group:GetDCSObject() - local unitsPresent = false - if dcsGroup then - local units = dcsGroup:getUnits() - unitsPresent = units and (#units > 0) - end - if not isAlive and not unitsPresent then - mission.status = "failed" - log("Cargo mission failed (after grace period): " .. (mission.group and mission.group:GetName() or "nil group") .. " to " .. mission.destination) - announceToCoalition(coalitionKey, "Resupply mission to " .. mission.destination .. " failed!") - else - log("DEBUG: Mission appears to still have DCS units despite IsAlive=false; skipping failure for " .. tostring(mission.destination), true) - end - end - end - end - cleanupCargoMissions() -end - ---[[ - MAIN DISPATCHER LOOP - -------------------------------------------------------------------------- - Runs the main dispatcher logic on a timer interval. -]] -local function cargoDispatcherMain() - log("═══════════════════════════════════════════════════════════════════════════════", true) - log("Cargo Dispatcher main loop running.", true) - monitorSquadrons() - monitorCargoMissions() - -- Schedule the next run inside a protected call to avoid unhandled errors - timer.scheduleFunction(function() - local ok, err = pcall(cargoDispatcherMain) - if not ok then - log("FATAL: cargoDispatcherMain crashed on scheduled run: " .. tostring(err)) - -- do not reschedule to avoid crash loops - end - end, {}, timer.getTime() + DISPATCHER_CONFIG.interval) -end - --- Start the dispatcher -local ok, err = pcall(cargoDispatcherMain) -if not ok then - log("FATAL: cargoDispatcherMain crashed on startup: " .. tostring(err)) -end - -log("═══════════════════════════════════════════════════════════════════════════════", true) --- End Moose_TDAC_CargoDispatcher.lua - - ---[[ - DIAGNOSTIC CONSOLE HELPERS - -------------------------------------------------------------------------- - Functions you can call from the DCS Lua console (F12) to debug issues. -]] - --- Check airbase coalition ownership for all configured supply airbases --- Usage: _G.TDAC_CheckAirbaseOwnership() -function _G.TDAC_CheckAirbaseOwnership() - env.info("[TDAC DIAGNOSTIC] ═══════════════════════════════════════") - env.info("[TDAC DIAGNOSTIC] Checking Coalition Ownership of All Supply Airbases") - env.info("[TDAC DIAGNOSTIC] ═══════════════════════════════════════") - - for _, coalitionKey in ipairs({"red", "blue"}) do - local config = CARGO_SUPPLY_CONFIG[coalitionKey] - local expectedCoalition = getCoalitionSide(coalitionKey) - - env.info(string.format("[TDAC DIAGNOSTIC] %s COALITION (expected coalition ID: %s)", coalitionKey:upper(), tostring(expectedCoalition))) - - if config and config.supplyAirfields then - for _, airbaseName in ipairs(config.supplyAirfields) do - local airbase = AIRBASE:FindByName(airbaseName) - if not airbase then - env.info(string.format("[TDAC DIAGNOSTIC] ✗ %-30s - NOT FOUND (invalid name or not on this map)", airbaseName)) - else - local actualCoalition = airbase:GetCoalition() - local coalitionName = "UNKNOWN" - local status = "✗" - - if actualCoalition == coalition.side.NEUTRAL then - coalitionName = "NEUTRAL" - elseif actualCoalition == coalition.side.RED then - coalitionName = "RED" - elseif actualCoalition == coalition.side.BLUE then - coalitionName = "BLUE" - end - - if actualCoalition == expectedCoalition then - status = "✓" - end - - env.info(string.format("[TDAC DIAGNOSTIC] %s %-30s - %s (coalition ID: %s)", status, airbaseName, coalitionName, tostring(actualCoalition))) - end - end - else - env.info("[TDAC DIAGNOSTIC] ERROR: No supply airfields configured!") - end - env.info("[TDAC DIAGNOSTIC] ───────────────────────────────────────") - end - - env.info("[TDAC DIAGNOSTIC] ═══════════════════════════════════════") - env.info("[TDAC DIAGNOSTIC] Check complete. ✓ = Owned by correct coalition, ✗ = Wrong coalition or not found") - return true -end - --- Check specific airbase coalition ownership --- Usage: _G.TDAC_CheckAirbase("Olenya") -function _G.TDAC_CheckAirbase(airbaseName) - if type(airbaseName) ~= 'string' then - env.info("[TDAC DIAGNOSTIC] ERROR: airbaseName must be a string") - return false - end - - local airbase = AIRBASE:FindByName(airbaseName) - if not airbase then - env.info(string.format("[TDAC DIAGNOSTIC] Airbase '%s' NOT FOUND (invalid name or not on this map)", airbaseName)) - return false, "not_found" - end - - local actualCoalition = airbase:GetCoalition() - local coalitionName = "UNKNOWN" - - if actualCoalition == coalition.side.NEUTRAL then - coalitionName = "NEUTRAL" - elseif actualCoalition == coalition.side.RED then - coalitionName = "RED" - elseif actualCoalition == coalition.side.BLUE then - coalitionName = "BLUE" - end - - env.info(string.format("[TDAC DIAGNOSTIC] Airbase '%s' - Coalition: %s (ID: %s)", airbaseName, coalitionName, tostring(actualCoalition))) - env.info(string.format("[TDAC DIAGNOSTIC] IsAlive: %s", tostring(airbase:IsAlive()))) - - -- Check parking spots - local function spotsFor(term, termName) - local ok, n = pcall(function() return airbase:GetParkingSpotsNumber(term) end) - if ok and n then - env.info(string.format("[TDAC DIAGNOSTIC] Parking %-15s: %d spots", termName, n)) - end - end - - spotsFor(AIRBASE.TerminalType.OpenBig, "OpenBig") - spotsFor(AIRBASE.TerminalType.OpenMed, "OpenMed") - spotsFor(AIRBASE.TerminalType.OpenMedOrBig, "OpenMedOrBig") - spotsFor(AIRBASE.TerminalType.Runway, "Runway") - - return true, coalitionName, actualCoalition -end - -env.info("[TDAC DIAGNOSTIC] Console helpers loaded:") -env.info("[TDAC DIAGNOSTIC] _G.TDAC_CheckAirbaseOwnership() - Check all supply airbases") -env.info("[TDAC DIAGNOSTIC] _G.TDAC_CheckAirbase('Olenya') - Check specific airbase") -env.info("[TDAC DIAGNOSTIC] _G.TDAC_RunConfigCheck() - Validate dispatcher config") -env.info("[TDAC DIAGNOSTIC] _G.TDAC_LogAirbaseParking('Olenya') - Check parking availability") - - --- Diagnostic helper: call from DCS console to test spawn-by-name and routing. --- Example (paste into DCS Lua console): --- _G.TDAC_CargoDispatcher_TestSpawn("CARGO_BLUE_C130_TEMPLATE", "Kittila", "Luostari Pechenga") -function _G.TDAC_CargoDispatcher_TestSpawn(templateName, originAirbase, destinationAirbase) - log("[TDAC TEST] Starting test spawn for template: " .. tostring(templateName), true) - local ok, err - if type(templateName) ~= 'string' then - env.info("[TDAC TEST] templateName must be a string") - return false, "invalid templateName" - end - local spawnByName = nil - ok, spawnByName = pcall(function() return SPAWN:New(templateName) end) - if not ok or not spawnByName then - log("[TDAC TEST] SPAWN:New failed for template " .. tostring(templateName) .. ". Error: " .. tostring(spawnByName), true) - if debug and debug.traceback then log("TRACEBACK: " .. tostring(debug.traceback(tostring(spawnByName))), true) end - return false, "spawn_new_failed" - end - - spawnByName:OnSpawnGroup(function(spawnedGroup) - log("[TDAC TEST] OnSpawnGroup called for: " .. tostring(spawnedGroup:GetName()), true) - local dcsGroup = spawnedGroup:GetDCSObject() - if dcsGroup then - local units = dcsGroup:getUnits() - if units and #units > 0 then - local pos = units[1]:getPoint() - log(string.format("[TDAC TEST] Spawned pos x=%.1f y=%.1f z=%.1f", pos.x, pos.y, pos.z), true) - end - end - if destinationAirbase then - local okAssign, errAssign = pcall(function() - local base = AIRBASE:FindByName(destinationAirbase) - if base and spawnedGroup and spawnedGroup.RouteToAirbase then - spawnedGroup:RouteToAirbase(base, AI_Task_Land.Runway) - log("[TDAC TEST] RouteToAirbase assigned to " .. tostring(destinationAirbase), true) - else - log("[TDAC TEST] RouteToAirbase not available or base not found", true) - end - end) - if not okAssign then - log("[TDAC TEST] RouteToAirbase pcall failed: " .. tostring(errAssign), true) - if debug and debug.traceback then log("TRACEBACK: " .. tostring(debug.traceback(tostring(errAssign))), true) end - end - end - end) - - ok, err = pcall(function() spawnByName:Spawn() end) - if not ok then - log("[TDAC TEST] spawnByName:Spawn() failed: " .. tostring(err), true) - if debug and debug.traceback then log("TRACEBACK: " .. tostring(debug.traceback(tostring(err))), true) end - return false, "spawn_failed" - end - log("[TDAC TEST] spawnByName:Spawn() returned successfully", true) - return true -end - - -log("═══════════════════════════════════════════════════════════════════════════════", true) --- End Moose_TDAC_CargoDispatcher.lua - diff --git a/Moose_TADC/Moose_TADC_Load2nd.lua b/Moose_TADC/Moose_TADC_Load2nd.lua deleted file mode 100644 index 7b06b50..0000000 --- a/Moose_TADC/Moose_TADC_Load2nd.lua +++ /dev/null @@ -1,2617 +0,0 @@ ---[[ -═══════════════════════════════════════════════════════════════════════════════ - UNIVERSAL TADC - Dual-Coalition Tactical Air Defense Controller - Advanced Zone-Based System -═══════════════════════════════════════════════════════════════════════════════ - -DESCRIPTION: -This script provides a sophisticated automated air defense system for BOTH RED and -BLUE coalitions operating independently. Features advanced zone-based area of -responsibility (AOR) management, allowing squadrons to respond differently based -on threat location and priority levels. Perfect for complex scenarios requiring -realistic air defense behavior and tactical depth. - -CORE FEATURES: -• Dual-coalition support with completely independent operation -• Advanced zone-based area of responsibility system (Primary/Secondary/Tertiary) -• Automatic threat detection with intelligent interceptor allocation -• Multi-squadron management with individual cooldowns and aircraft tracking -• Dynamic cargo aircraft replenishment system -• Configurable intercept ratios with zone-specific response modifiers -• Smart interceptor routing, engagement, and RTB (Return to Base) behavior -• Real-time airbase status monitoring (operational/captured/destroyed) -• Comprehensive configuration validation and error reporting -• Asymmetric warfare support with coalition-specific capabilities -• Emergency cleanup systems and safety nets for mission stability - -ADVANCED ZONE SYSTEM: -Each squadron can be configured with up to three zone types: -• PRIMARY ZONE: Main area of responsibility (full response ratio) -• SECONDARY ZONE: Support area (reduced response, optional low-priority filtering) -• TERTIARY ZONE: Emergency/fallback area (enhanced response when base threatened) -• Squadrons will respond based on threat location relative to their zones -• Zone-specific response modifiers can be configured for each squadron -• Zones may overlap between squadrons for layered defense. - -ADVANCED ZONE SETUP: -• Create zones in the mission editor (MOOSE polygons, circles, etc.) -• Assign zone names to squadrons in the configuration (exact match required) -• Leave zones as nil for global threat response (no zone restrictions) -• Each zone is defined by placing a helicopter group with waypoints outlining the area -• The script will create polygon zones from the helicopter waypoints automatically - -Zone response behaviors include: -• Distance-based engagement limits (max range from airbase) -• Priority thresholds for threat classification (major vs minor threats) -• Fallback conditions (auto-switch to tertiary when squadron weakened) -• Response ratio multipliers per zone type -• Low-priority threat filtering in secondary zones - -REPLENISHMENT SYSTEM: -• Automated cargo aircraft detection system that monitors for transport aircraft - flyovers to replenish squadron aircraft counts (fixed wing only): -• Detects cargo aircraft by name patterns (CARGO, TRANSPORT, C130, C-130, AN26, AN-26) -• Monitors flyover proximity to friendly airbases (no landing required) -• Replenishes squadron aircraft up to maximum capacity per airbase -• Prevents duplicate processing of the same cargo delivery -• Coalition-specific replenishment amounts configurable independently -• Supports sustained operations over extended mission duration - -*** This system does not spawn or manage cargo aircraft - it only detects when -your existing cargo aircraft complete deliveries via flyover. Create and route your own -transport missions to maintain squadron strength. Aircraft can deliver supplies by -flying within 3000m of any configured airbase without needing to land. *** - -INTERCEPT RATIO SYSTEM: -Sophisticated threat response calculation with zone-based modifiers: -• Base intercept ratio (e.g., 0.8 = 8 interceptors per 10 threats) -• Zone-specific multipliers (primary: 1.0, secondary: 0.6, tertiary: 1.4) -• Threat size considerations (larger formations get proportional response) -• Squadron selection based on zone priority and proximity -• Aircraft availability and cooldown status factored into decisions - -SETUP INSTRUCTIONS: -1. Load MOOSE framework in mission before this script -2. Configure Squadrons: Create fighter aircraft GROUP templates for both coalitions in mission editor -3. Configure RED squadrons in RED_SQUADRON_CONFIG section -4. Configure BLUE squadrons in BLUE_SQUADRON_CONFIG section -5. Optionally create zones in mission editor for area-of-responsibility using helicopter groups with waypoints. -6. Set coalition behavior parameters in TADC_SETTINGS -7. Configure cargo patterns in ADVANCED_SETTINGS if using replenishment -8. Add this script as "DO SCRIPT" trigger at mission start (after MOOSE loaded) -9. Create and manage cargo aircraft missions for replenishment (optional) - -CONFIGURATION VALIDATION: -Built-in validation system checks for: -• Template existence and proper naming -• Airbase name accuracy and coalition control -• Zone existence in mission editor -• Parameter ranges and logical consistency -• Coalition enablement and squadron availability -• Prevents common configuration errors before mission starts - -TACTICAL SCENARIOS SUPPORTED: -• Balanced air warfare with equal capabilities and symmetric response -• Asymmetric scenarios with different coalition strengths and capabilities -• Layered air defense with overlapping squadron zones -• Border/perimeter defense with primary and fallback positions -• Training missions for AI vs AI air combat observation -• Dynamic frontline battles with shifting territorial control -• Long-duration missions with cargo resupply operations -• Emergency response scenarios with threat priority management - -LOGGING AND MONITORING: -• Real-time threat detection and interceptor launch notifications -• Squadron status reports including aircraft counts and cooldown timers -• Airbase operational status with capture/destruction detection -• Cargo delivery tracking and replenishment confirmations -• Zone-based engagement decisions with detailed reasoning -• Configuration validation results and error reporting -• Performance monitoring with emergency cleanup notifications - -REQUIREMENTS: -• MOOSE framework (https://github.com/FlightControl-Master/MOOSE) -• Fighter aircraft GROUP templates (not UNIT templates) for each coalition -• Airbases must exist in mission and be under correct coalition control -• Zone objects in mission editor (if using zone-based features) -• Proper template naming matching squadron configuration - -AUTHOR: -• Based off MOOSE framework by FlightControl-Master -• Developed and customized by Mission Designer "F99th-TracerFacer" - -VERSION: 1.0 -═══════════════════════════════════════════════════════════════════════════════ -]] - ---[[ -═══════════════════════════════════════════════════════════════════════════════ - MAIN SETTINGS -═══════════════════════════════════════════════════════════════════════════════ -]] - --- Core TADC behavior settings - applies to BOTH coalitions unless overridden -local TADC_SETTINGS = { - -- Enable/Disable coalitions - enableRed = true, -- Set to false to disable RED TADC - enableBlue = true, -- Set to false to disable BLUE TADC - - -- Timing settings (applies to both coalitions) - checkInterval = 30, -- How often to scan for threats (seconds) - monitorInterval = 30, -- How often to check interceptor status (seconds) - statusReportInterval = 1805, -- How often to report airbase status (seconds) - squadronSummaryInterval = 1800, -- How often to broadcast squadron summary (seconds) - cargoCheckInterval = 15, -- How often to check for cargo deliveries (seconds) - - -- RED Coalition Settings - red = { - maxActiveCAP = 24, -- Maximum RED fighters airborne at once - squadronCooldown = 600, -- RED cooldown after squadron launch (seconds) - interceptRatio = 1.2, -- RED interceptors per threat aircraft - cargoReplenishmentAmount = 4, -- RED aircraft added per cargo delivery - emergencyCleanupTime = 7200, -- RED force cleanup time (seconds) - rtbFlightBuffer = 300, -- RED extra landing time before cleanup (seconds) - }, - - -- BLUE Coalition Settings - blue = { - maxActiveCAP = 24, -- Maximum BLUE fighters airborne at once - squadronCooldown = 600, -- BLUE cooldown after squadron launch (seconds) - interceptRatio = 1.2, -- BLUE interceptors per threat aircraft - cargoReplenishmentAmount = 4, -- BLUE aircraft added per cargo delivery - emergencyCleanupTime = 7200, -- BLUE force cleanup time (seconds) - rtbFlightBuffer = 300, -- BLUE extra landing time before cleanup (seconds) - }, -} - - ---[[ -INTERCEPT RATIO CHART - How many interceptors launch per threat aircraft: - -Threat Size: 1 2 4 8 12 16 (aircraft) -==================================================================== -interceptRatio 0.2: 1 1 1 2 3 4 (conservative) -interceptRatio 0.5: 1 1 2 4 6 8 (light response) -interceptRatio 0.8: 1 2 4 7 10 13 (balanced) <- DEFAULT -interceptRatio 1.0: 1 2 4 8 12 16 (1:1 parity) -interceptRatio 1.2: 2 3 5 10 15 20 (slight advantage) -interceptRatio 1.4: 2 3 6 12 17 23 (good advantage) -interceptRatio 1.6: 2 4 7 13 20 26 (strong response) -interceptRatio 1.8: 2 4 8 15 22 29 (overwhelming) -interceptRatio 2.0: 2 4 8 16 24 32 (overkill) - -TACTICAL EFFECTS: -• 0.2-0.5: Minimal response, may be overwhelmed by large formations -• 0.8-1.0: Realistic parity, creates balanced dogfights -• 1.2-1.4: Coalition advantage, challenging for enemy -• 1.6-1.8: Strong defense, difficult penetration missions -• 1.9-2.0: Nearly impenetrable, may exhaust squadrons quickly - -SQUADRON IMPACT: -• Low ratios (0.2-0.8): Squadrons last longer, sustained defense -• High ratios (1.6-2.0): Rapid squadron depletion, coverage gaps -• Sweet spot (1.0-1.4): Balanced response with good coverage duration - -ASYMMETRIC SCENARIOS: -• Set RED ratio 1.2, BLUE ratio 0.8 = RED advantage -• Set RED ratio 0.6, BLUE ratio 1.4 = BLUE advantage -• Different maxActiveCAP values create capacity imbalances -]] - - ---[[ -═══════════════════════════════════════════════════════════════════════════════ - ADVANCED SETTINGS -═══════════════════════════════════════════════════════════════════════════════ - -These settings control more detailed behavior. Most users won't need to change these. -]] - -local ADVANCED_SETTINGS = { - -- Cargo aircraft detection patterns (aircraft with these names will replenish squadrons (Currently only fixed wing aircraft supported)) - cargoPatterns = {"CARGO", "TRANSPORT", "C130", "C-130", "AN26", "AN-26"}, - - -- Distance from airbase to consider cargo "delivered" via flyover (meters) - -- Aircraft flying within this range will count as supply delivery (no landing required) - cargoLandingDistance = 3000, - -- Distance from airbase to consider a landing as delivered (wheel touchdown) - -- Use a slightly larger radius than 1000m to account for runway offsets from airbase center - cargoLandingEventRadius = 2000, - - -- Velocity below which aircraft is considered "landed" (km/h) - cargoLandedVelocity = 5, - - -- RTB settings - rtbAltitude = 6000, -- Return to base altitude (feet) - rtbSpeed = 430, -- Return to base speed (knots) - - -- Logging settings - enableDetailedLogging = false, -- Set to false to reduce log spam - logPrefix = "[Universal TADC]", -- Prefix for all log messages - -- Proxy/raw-fallback verbose logging (set true to debug proxy behavior) - verboseProxyLogging = false, -} - ---[[ -═══════════════════════════════════════════════════════════════════════════════ - SYSTEM CODE - (DO NOT MODIFY BELOW THIS LINE) -═══════════════════════════════════════════════════════════════════════════════ -]] - - - --- Internal tracking variables - separate for each coalition -local activeInterceptors = { - red = {}, - blue = {} -} -local lastLaunchTime = { - red = {}, - blue = {} -} -local assignedThreats = { - red = {}, - blue = {} -} -local squadronCooldowns = { - red = {}, - blue = {} -} -squadronAircraftCounts = { - red = {}, - blue = {} -} - --- Aircraft spawn tracking for stuck detection -local aircraftSpawnTracking = { - red = {}, -- groupName -> {spawnPos, spawnTime, squadron, airbase} - blue = {} -} - --- Airbase health status -local airbaseHealthStatus = { - red = {}, -- airbaseName -> "operational"|"stuck-aircraft"|"unusable" - blue = {} -} - -local function coalitionKeyFromSide(side) - if side == coalition.side.RED then return "red" end - if side == coalition.side.BLUE then return "blue" end - return nil -end - -local function cleanupInterceptorEntry(interceptorName, coalitionKey) - if not interceptorName or not coalitionKey then return end - if activeInterceptors[coalitionKey] then - activeInterceptors[coalitionKey][interceptorName] = nil - end - if aircraftSpawnTracking[coalitionKey] then - aircraftSpawnTracking[coalitionKey][interceptorName] = nil - end -end - -local function destroyInterceptorGroup(interceptor, coalitionKey, delaySeconds) - if not interceptor then return end - - local name = nil - if interceptor.GetName then - local ok, value = pcall(function() return interceptor:GetName() end) - if ok then name = value end - end - - local resolvedKey = coalitionKey - if not resolvedKey and interceptor.GetCoalition then - local ok, side = pcall(function() return interceptor:GetCoalition() end) - if ok then - resolvedKey = coalitionKeyFromSide(side) - end - end - - local function doDestroy() - if interceptor and interceptor.IsAlive and interceptor:IsAlive() then - pcall(function() interceptor:Destroy() end) - end - if name and resolvedKey then - cleanupInterceptorEntry(name, resolvedKey) - end - end - - if delaySeconds and delaySeconds > 0 then - timer.scheduleFunction(function() - doDestroy() - return - end, {}, timer.getTime() + delaySeconds) - else - doDestroy() - end -end - -local function finalizeCargoMission(cargoGroup, squadron, coalitionKey) - if not cargoMissions or not coalitionKey or not squadron or not squadron.airbaseName then - return - end - - local coalitionBucket = cargoMissions[coalitionKey] - if type(coalitionBucket) ~= "table" then - return - end - - local groupName = nil - if cargoGroup and cargoGroup.GetName then - local ok, value = pcall(function() return cargoGroup:GetName() end) - if ok then groupName = value end - end - - for idx = #coalitionBucket, 1, -1 do - local mission = coalitionBucket[idx] - if mission and mission.destination == squadron.airbaseName then - local missionGroupName = nil - if mission.group and mission.group.GetName then - local ok, value = pcall(function() return mission.group:GetName() end) - if ok then missionGroupName = value end - end - - if not groupName or missionGroupName == groupName then - mission.status = "completed" - mission.completedAt = timer.getTime() - - if mission.group and mission.group.Destroy then - local targetGroup = mission.group - timer.scheduleFunction(function() - pcall(function() - if targetGroup and targetGroup.IsAlive and targetGroup:IsAlive() then - targetGroup:Destroy() - end - end) - return - end, {}, timer.getTime() + 90) - end - - table.remove(coalitionBucket, idx) - end - end - end -end - --- Logging function -local function log(message, detailed) - if not detailed or ADVANCED_SETTINGS.enableDetailedLogging then - env.info(ADVANCED_SETTINGS.logPrefix .. " " .. message) - end -end - -local function safeCoordinate(object) - if not object or type(object) ~= "table" or not object.GetCoordinate then - return nil - end - local ok, coord = pcall(function() return object:GetCoordinate() end) - if ok and coord then - return coord - end - return nil -end - --- Performance optimization: Cache SET_GROUP objects to avoid repeated creation -local cachedSets = { - redCargo = nil, - blueCargo = nil, - redAircraft = nil, - blueAircraft = nil -} - -if type(RED_SQUADRON_CONFIG) ~= "table" then - local msg = "CONFIG ERROR: RED_SQUADRON_CONFIG is missing or not loaded. Make sure Moose_TADC_SquadronConfigs_Load1st.lua is loaded before this script." - log(msg, true) - MESSAGE:New(msg, 30):ToAll() -end -if type(BLUE_SQUADRON_CONFIG) ~= "table" then - local msg = "CONFIG ERROR: BLUE_SQUADRON_CONFIG is missing or not loaded. Make sure Moose_TADC_SquadronConfigs_Load1st.lua is loaded before this script." - log(msg, true) - MESSAGE:New(msg, 30):ToAll() -end - -for _, squadron in pairs(RED_SQUADRON_CONFIG) do - if squadron.aircraft and squadron.templateName then - squadronAircraftCounts.red[squadron.templateName] = squadron.aircraft - end -end - -for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - if squadron.aircraft and squadron.templateName then - squadronAircraftCounts.blue[squadron.templateName] = squadron.aircraft - end -end - --- Squadron resource summary generator - -local function getSquadronResourceSummary(coalitionSide) - local function getStatus(remaining, max, state) - if state == "captured" then return "[CAPTURED]" end - if state == "destroyed" then return "[DESTROYED]" end - if state ~= "operational" then return "[OFFLINE]" end - - local percent = (remaining / max) * 100 - if percent <= 10 then return "[CRITICAL]" end - if percent <= 25 then return "[LOW]" end - return "OK" - end - - local lines = {} - table.insert(lines, "-=[ Tactical Air Defense Controller ]=-\n") - table.insert(lines, "Squadron Resource Summary:\n") - table.insert(lines, "| Squadron | Aircraft Remaining | Status |") - table.insert(lines, "|--------------|--------------------|-------------|") - - if coalitionSide == coalition.side.RED then - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local remaining = squadronAircraftCounts.red[squadron.templateName] or 0 - local max = squadron.aircraft or 0 - local state = squadron.state or "operational" - local status = getStatus(remaining, max, state) - table.insert(lines, string.format("| %-13s | %2d / %-15d | %-11s |", squadron.displayName or squadron.templateName, remaining, max, status)) - end - elseif coalitionSide == coalition.side.BLUE then - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local remaining = squadronAircraftCounts.blue[squadron.templateName] or 0 - local max = squadron.aircraft or 0 - local state = squadron.state or "operational" - local status = getStatus(remaining, max, state) - table.insert(lines, string.format("| %-13s | %2d / %-15d | %-11s |", squadron.displayName or squadron.templateName, remaining, max, status)) - end - end - - table.insert(lines, "\n- [CAPTURED]: Airbase captured by enemy\n- [LOW]: Below 25%\n- [CRITICAL]: Below 10%\n- OK: Above 25%") - return table.concat(lines, "\n") -end - --- Broadcast squadron summary to all players -local function broadcastSquadronSummary() - if TADC_SETTINGS.enableRed then - local summaryRed = getSquadronResourceSummary(coalition.side.RED) - MESSAGE:New(summaryRed, 20):ToCoalition(coalition.side.RED) - end - if TADC_SETTINGS.enableBlue then - local summaryBlue = getSquadronResourceSummary(coalition.side.BLUE) - MESSAGE:New(summaryBlue, 20):ToCoalition(coalition.side.BLUE) - end -end - --- Coalition-specific settings helper -local function getCoalitionSettings(coalitionSide) - if coalitionSide == coalition.side.RED then - return TADC_SETTINGS.red, "RED" - elseif coalitionSide == coalition.side.BLUE then - return TADC_SETTINGS.blue, "BLUE" - else - return nil, "UNKNOWN" - end -end - --- Get squadron config for coalition -local function getSquadronConfig(coalitionSide) - if coalitionSide == coalition.side.RED then - return RED_SQUADRON_CONFIG - elseif coalitionSide == coalition.side.BLUE then - return BLUE_SQUADRON_CONFIG - else - return {} - end -end - --- Check if coordinate is within a zone -local function isInZone(coordinate, zoneName) - if not zoneName or zoneName == "" then - return false - end - - -- Try to find the zone - local zone = ZONE:FindByName(zoneName) - if zone then - return zone:IsCoordinateInZone(coordinate) - else - -- Try to create polygon zone from helicopter group waypoints if not found - local group = GROUP:FindByName(zoneName) - if group then - -- Create polygon zone using the group's waypoints as vertices - zone = ZONE_POLYGON:NewFromGroupName(zoneName, zoneName) - if zone then - log("Created polygon zone '" .. zoneName .. "' from helicopter waypoints") - return zone:IsCoordinateInZone(coordinate) - else - log("Warning: Could not create polygon zone from group '" .. zoneName .. "' - check waypoints") - end - else - log("Warning: No group named '" .. zoneName .. "' found for zone creation") - end - - log("Warning: Zone '" .. zoneName .. "' not found in mission and could not create from helicopter group", true) - return false - end -end - --- Get default zone configuration -local function getDefaultZoneConfig() - return { - primaryResponse = 1.0, - secondaryResponse = 0.6, - tertiaryResponse = 1.4, - maxRange = 200, - enableFallback = false, - priorityThreshold = 4, - ignoreLowPriority = false, - } -end - --- Check if squadron should respond to fallback conditions -local function checkFallbackConditions(squadron, coalitionSide) - local coalitionKey = (coalitionSide == coalition.side.RED) and "red" or "blue" - - -- Check if airbase is under attack (simplified - check if base has low aircraft) - local currentAircraft = squadronAircraftCounts[coalitionKey][squadron.templateName] or 0 - local maxAircraft = squadron.aircraft - local aircraftRatio = currentAircraft / maxAircraft - - -- Trigger fallback if squadron is below 50% strength or base is threatened - if aircraftRatio < 0.5 then - return true - end - - -- Could add more complex conditions here (base under attack, etc.) - return false -end - --- Get threat zone priority and response ratio for squadron -local function getThreatZonePriority(threatCoord, squadron, coalitionSide) - local zoneConfig = squadron.zoneConfig or getDefaultZoneConfig() - - -- Check distance from airbase first - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local airbaseCoord = airbase:GetCoordinate() - local distance = airbaseCoord:Get2DDistance(threatCoord) / 1852 -- Convert meters to nautical miles - - if distance > zoneConfig.maxRange then - return "none", 0, "out of range (" .. math.floor(distance) .. "nm > " .. zoneConfig.maxRange .. "nm)" - end - end - - -- Check tertiary zone first (highest priority if fallback enabled) - if squadron.tertiaryZone and zoneConfig.enableFallback then - if checkFallbackConditions(squadron, coalitionSide) then - if isInZone(threatCoord, squadron.tertiaryZone) then - return "tertiary", zoneConfig.tertiaryResponse, "fallback zone (enhanced response)" - end - end - end - - -- Check primary zone - if squadron.primaryZone and isInZone(threatCoord, squadron.primaryZone) then - return "primary", zoneConfig.primaryResponse, "primary AOR" - end - - -- Check secondary zone - if squadron.secondaryZone and isInZone(threatCoord, squadron.secondaryZone) then - return "secondary", zoneConfig.secondaryResponse, "secondary AOR" - end - - -- Check tertiary zone (normal priority) - if squadron.tertiaryZone and isInZone(threatCoord, squadron.tertiaryZone) then - return "tertiary", zoneConfig.tertiaryResponse, "tertiary zone" - end - - -- If no zones are defined, use global response - if not squadron.primaryZone and not squadron.secondaryZone and not squadron.tertiaryZone then - return "global", 1.0, "global response (no zones defined)" - end - - -- Outside all defined zones - return "none", 0, "outside defined zones" -end - --- Startup validation -local function validateConfiguration() - local errors = {} - - -- Check coalition enablement - if not TADC_SETTINGS.enableRed and not TADC_SETTINGS.enableBlue then - table.insert(errors, "Both coalitions disabled - enable at least one in TADC_SETTINGS") - end - - -- Validate RED squadrons if enabled - if TADC_SETTINGS.enableRed then - if #RED_SQUADRON_CONFIG == 0 then - table.insert(errors, "No RED squadrons configured but RED TADC is enabled") - else - for i, squadron in pairs(RED_SQUADRON_CONFIG) do - local prefix = "RED Squadron " .. i .. ": " - - if not squadron.templateName or squadron.templateName == "" or - squadron.templateName == "RED_CAP_SQUADRON_1" or - squadron.templateName == "RED_CAP_SQUADRON_2" then - table.insert(errors, prefix .. "templateName not configured or using default example") - end - - if not squadron.displayName or squadron.displayName == "" then - table.insert(errors, prefix .. "displayName not configured") - end - - if not squadron.airbaseName or squadron.airbaseName == "" or - squadron.airbaseName:find("YOUR_RED_AIRBASE") then - table.insert(errors, prefix .. "airbaseName not configured or using default example") - end - - if not squadron.aircraft or squadron.aircraft <= 0 then - table.insert(errors, prefix .. "aircraft count not configured or invalid") - end - - -- Validate zone configuration if zones are specified - if squadron.primaryZone or squadron.secondaryZone or squadron.tertiaryZone then - if squadron.zoneConfig then - local zc = squadron.zoneConfig - if zc.primaryResponse and (zc.primaryResponse < 0 or zc.primaryResponse > 5) then - table.insert(errors, prefix .. "primaryResponse ratio out of range (0-5)") - end - if zc.secondaryResponse and (zc.secondaryResponse < 0 or zc.secondaryResponse > 5) then - table.insert(errors, prefix .. "secondaryResponse ratio out of range (0-5)") - end - if zc.tertiaryResponse and (zc.tertiaryResponse < 0 or zc.tertiaryResponse > 5) then - table.insert(errors, prefix .. "tertiaryResponse ratio out of range (0-5)") - end - if zc.maxRange and (zc.maxRange < 10 or zc.maxRange > 1000) then - table.insert(errors, prefix .. "maxRange out of range (10-1000 nm)") - end - end - - -- Check if specified zones exist in mission - local zones = {} - if squadron.primaryZone then table.insert(zones, squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zones, squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zones, squadron.tertiaryZone) end - - for _, zoneName in ipairs(zones) do - local zoneObj = ZONE:FindByName(zoneName) - if not zoneObj then - -- Check if there's a helicopter unit/group with this name for zone creation - local unit = UNIT:FindByName(zoneName) - local group = GROUP:FindByName(zoneName) - if not unit and not group then - table.insert(errors, prefix .. "zone '" .. zoneName .. "' not found in mission (no zone or helicopter unit named '" .. zoneName .. "')") - end - end - end - end - end - end - end - - -- Validate BLUE squadrons if enabled - if TADC_SETTINGS.enableBlue then - if #BLUE_SQUADRON_CONFIG == 0 then - table.insert(errors, "No BLUE squadrons configured but BLUE TADC is enabled") - else - for i, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local prefix = "BLUE Squadron " .. i .. ": " - - if not squadron.templateName or squadron.templateName == "" or - squadron.templateName == "BLUE_CAP_SQUADRON_1" or - squadron.templateName == "BLUE_CAP_SQUADRON_2" then - table.insert(errors, prefix .. "templateName not configured or using default example") - end - - if not squadron.displayName or squadron.displayName == "" then - table.insert(errors, prefix .. "displayName not configured") - end - - if not squadron.airbaseName or squadron.airbaseName == "" or - squadron.airbaseName:find("YOUR_BLUE_AIRBASE") then - table.insert(errors, prefix .. "airbaseName not configured or using default example") - end - - if not squadron.aircraft or squadron.aircraft <= 0 then - table.insert(errors, prefix .. "aircraft count not configured or invalid") - end - - -- Validate zone configuration if zones are specified - if squadron.primaryZone or squadron.secondaryZone or squadron.tertiaryZone then - if squadron.zoneConfig then - local zc = squadron.zoneConfig - if zc.primaryResponse and (zc.primaryResponse < 0 or zc.primaryResponse > 5) then - table.insert(errors, prefix .. "primaryResponse ratio out of range (0-5)") - end - if zc.secondaryResponse and (zc.secondaryResponse < 0 or zc.secondaryResponse > 5) then - table.insert(errors, prefix .. "secondaryResponse ratio out of range (0-5)") - end - if zc.tertiaryResponse and (zc.tertiaryResponse < 0 or zc.tertiaryResponse > 5) then - table.insert(errors, prefix .. "tertiaryResponse ratio out of range (0-5)") - end - if zc.maxRange and (zc.maxRange < 10 or zc.maxRange > 1000) then - table.insert(errors, prefix .. "maxRange out of range (10-1000 nm)") - end - end - - -- Check if specified zones exist in mission - local zones = {} - if squadron.primaryZone then table.insert(zones, squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zones, squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zones, squadron.tertiaryZone) end - - for _, zoneName in ipairs(zones) do - local zoneObj = ZONE:FindByName(zoneName) - if not zoneObj then - -- Check if there's a helicopter unit/group with this name for zone creation - local unit = UNIT:FindByName(zoneName) - local group = GROUP:FindByName(zoneName) - if not unit and not group then - table.insert(errors, prefix .. "zone '" .. zoneName .. "' not found in mission (no zone or helicopter unit named '" .. zoneName .. "')") - end - end - end - end - end - end - end - - -- Report errors - if #errors > 0 then - log("CONFIGURATION ERRORS DETECTED:") - MESSAGE:New("CONFIGURATION ERRORS DETECTED:", 30):ToAll() - for _, error in pairs(errors) do - log(" ✗ " .. error) - MESSAGE:New("CONFIG ERROR: " .. error, 30):ToAll() - end - log("Please fix configuration before using Universal TADC!") - MESSAGE:New("Please fix configuration before using Universal TADC!", 30):ToAll() - return false - else - log("Configuration validation passed ✓") - MESSAGE:New("Universal TADC configuration passed ✓", 10):ToAll() - return true - end -end - --- Process cargo delivery for a squadron -local function processCargoDelivery(cargoGroup, squadron, coalitionSide, coalitionKey) - -- Simple delivery processor: dedupe by group ID and credit supplies directly. - if not _G.processedDeliveries then - _G.processedDeliveries = {} - end - - -- Use group ID + squadron airbase as dedupe key to avoid double crediting when the same group - -- triggers multiple events or moves between airbases rapidly. - local okId, grpId = pcall(function() return cargoGroup and cargoGroup.GetID and cargoGroup:GetID() end) - local groupIdStr = (okId and grpId) and tostring(grpId) or "" - local deliveryKey = groupIdStr .. "_" .. tostring(squadron.airbaseName) - - -- Diagnostic log: show group name, id, and delivery key when processor invoked - local okName, grpName = pcall(function() return cargoGroup and cargoGroup.GetName and cargoGroup:GetName() end) - local groupNameStr = (okName and grpName) and tostring(grpName) or "" - log("PROCESS CARGO: invoked for group=" .. groupNameStr .. " id=" .. groupIdStr .. " targetAirbase=" .. tostring(squadron.airbaseName) .. " deliveryKey=" .. deliveryKey, true) - - if _G.processedDeliveries[deliveryKey] then - -- Already processed recently, ignore - log("PROCESS CARGO: deliveryKey " .. deliveryKey .. " already processed at " .. tostring(_G.processedDeliveries[deliveryKey]), true) - return - end - - -- Mark processed immediately - _G.processedDeliveries[deliveryKey] = timer.getTime() - - -- Credit the squadron - local currentCount = squadronAircraftCounts[coalitionKey][squadron.templateName] or 0 - local maxCount = squadron.aircraft or 0 - local addAmount = TADC_SETTINGS[coalitionKey].cargoReplenishmentAmount or 0 - local newCount = math.min(currentCount + addAmount, maxCount) - local actualAdded = newCount - currentCount - - if actualAdded > 0 then - squadronAircraftCounts[coalitionKey][squadron.templateName] = newCount - local msg = coalitionKey:upper() .. " CARGO DELIVERY: " .. cargoGroup:GetName() .. " delivered " .. actualAdded .. - " aircraft to " .. (squadron.displayName or squadron.templateName) .. - " (" .. newCount .. "/" .. maxCount .. ")" - log(msg) - MESSAGE:New(msg, 20):ToCoalition(coalitionSide) - USERSOUND:New("Cargo_Delivered.ogg"):ToCoalition(coalitionSide) - else - local msg = coalitionKey:upper() .. " CARGO DELIVERY: " .. (squadron.displayName or squadron.templateName) .. " already at max capacity" - log(msg, true) - MESSAGE:New(msg, 10):ToCoalition(coalitionSide) - USERSOUND:New("Cargo_Delivered.ogg"):ToCoalition(coalitionSide) - end - - finalizeCargoMission(cargoGroup, squadron, coalitionKey) -end - --- Event handler for cargo aircraft landing (backup for actual landings) -local cargoEventHandler = {} -function cargoEventHandler:onEvent(event) - if event.id == world.event.S_EVENT_LAND then - local unit = event.initiator - - -- Safe unit name retrieval - local unitName = "unknown" - if unit and type(unit) == "table" then - local ok, name = pcall(function() return unit:GetName() end) - if ok and name then - unitName = name - end - end - - log("LANDING EVENT: Received S_EVENT_LAND for unit: " .. unitName, true) - - if unit and type(unit) == "table" and unit.IsAlive and unit:IsAlive() then - local group = unit:GetGroup() - if group and type(group) == "table" and group.IsAlive and group:IsAlive() then - -- Safe group name retrieval - local cargoName = "unknown" - local ok, name = pcall(function() return group:GetName():upper() end) - if ok and name then - cargoName = name - end - - log("LANDING EVENT: Processing group: " .. cargoName, true) - - local isCargoAircraft = false - - -- Check if aircraft name matches cargo patterns - for _, pattern in pairs(ADVANCED_SETTINGS.cargoPatterns) do - if string.find(cargoName, pattern) then - isCargoAircraft = true - log("LANDING EVENT: Matched cargo pattern '" .. pattern .. "' for " .. cargoName, true) - break - end - end - - if isCargoAircraft then - -- Safe coordinate and coalition retrieval - local cargoCoord = nil - local ok, coord = pcall(function() return unit:GetCoordinate() end) - if ok and coord then - cargoCoord = coord - end - - log("LANDING EVENT: Cargo aircraft " .. cargoName .. " at coord: " .. tostring(cargoCoord), true) - - if cargoCoord then - local closestAirbase = nil - local closestDistance = math.huge - local closestSquadron = nil - - -- Search RED squadron configs - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = cargoCoord:Get2DDistance(airbase:GetCoordinate()) - log("LANDING EVENT: Checking distance to " .. squadron.airbaseName .. ": " .. math.floor(distance) .. "m", true) - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - -- Search BLUE squadron configs - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = cargoCoord:Get2DDistance(airbase:GetCoordinate()) - log("LANDING EVENT: Checking distance to " .. squadron.airbaseName .. ": " .. math.floor(distance) .. "m", true) - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - if closestAirbase then - local abCoalition = closestAirbase:GetCoalition() - local coalitionKey = (abCoalition == coalition.side.RED) and "red" or "blue" - if closestDistance < ADVANCED_SETTINGS.cargoLandingEventRadius then - log("LANDING DELIVERY: " .. cargoName .. " landed and delivered at " .. closestSquadron.airbaseName .. " (distance: " .. math.floor(closestDistance) .. "m)") - processCargoDelivery(group, closestSquadron, abCoalition, coalitionKey) - else - log("LANDING DETECTED: " .. cargoName .. " landed but no valid airbase found within range (closest: " .. (closestDistance and math.floor(closestDistance) .. "m" or "none") .. ")") - end - else - log("LANDING DETECTED: " .. cargoName .. " landed but no configured squadron airbases available to check", true) - end - else - log("LANDING EVENT: Could not get coordinates for cargo aircraft " .. cargoName, true) - end - else - log("LANDING EVENT: " .. cargoName .. " is not a cargo aircraft", true) - end - else - log("LANDING EVENT: Group is nil or not alive", true) - end - else - -- Fallback: unit was nil or not alive (race/despawn). Try to retrieve group and name safely - log("LANDING EVENT: Unit is nil or not alive - attempting fallback group retrieval", true) - - local fallbackGroup = nil - local okGetGroup, grp = pcall(function() - if unit and type(unit) == "table" and unit.GetGroup then - return unit:GetGroup() - end - -- Try event.initiator (may be raw DCS object) - if event and event.initiator and type(event.initiator) == 'table' and event.initiator.GetGroup then - return event.initiator:GetGroup() - end - return nil - end) - - if okGetGroup and grp then - fallbackGroup = grp - end - - if fallbackGroup then - -- Try to get group name even if group:IsAlive() is false - local okName, gname = pcall(function() return fallbackGroup:GetName():upper() end) - local cargoName = "unknown" - if okName and gname then - cargoName = gname - end - - log("LANDING EVENT (fallback): Processing group: " .. cargoName, true) - - local isCargoAircraft = false - for _, pattern in pairs(ADVANCED_SETTINGS.cargoPatterns) do - if string.find(cargoName, pattern) then - isCargoAircraft = true - log("LANDING EVENT (fallback): Matched cargo pattern '" .. pattern .. "' for " .. cargoName, true) - break - end - end - - if isCargoAircraft then - -- Try to get coordinate and coalition via multiple safe methods - local cargoCoord = nil - local okCoord, coord = pcall(function() - if unit and unit.GetCoordinate then return unit:GetCoordinate() end - if fallbackGroup and fallbackGroup.GetCoordinate then return fallbackGroup:GetCoordinate() end - return nil - end) - if okCoord and coord then cargoCoord = coord end - - log("LANDING EVENT (fallback): Cargo aircraft " .. cargoName .. " at coord: " .. tostring(cargoCoord), true) - - if cargoCoord then - local closestAirbase = nil - local closestDistance = math.huge - local closestSquadron = nil - - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = cargoCoord:Get2DDistance(airbase:GetCoordinate()) - log("LANDING EVENT (fallback): Checking distance to " .. squadron.airbaseName .. ": " .. math.floor(distance) .. "m", true) - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = cargoCoord:Get2DDistance(airbase:GetCoordinate()) - log("LANDING EVENT (fallback): Checking distance to " .. squadron.airbaseName .. ": " .. math.floor(distance) .. "m", true) - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - if closestAirbase then - local abCoalition = closestAirbase:GetCoalition() - local coalitionKey = (abCoalition == coalition.side.RED) and "red" or "blue" - if closestDistance < ADVANCED_SETTINGS.cargoLandingEventRadius then - log("LANDING DELIVERY (fallback): " .. cargoName .. " landed and delivered at " .. closestSquadron.airbaseName .. " (distance: " .. math.floor(closestDistance) .. "m)") - processCargoDelivery(fallbackGroup, closestSquadron, abCoalition, coalitionKey) - else - log("LANDING DETECTED (fallback): " .. cargoName .. " landed but no valid airbase found within range (closest: " .. (closestDistance and math.floor(closestDistance) .. "m" or "none") .. ")") - end - else - log("LANDING EVENT (fallback): No configured squadron airbases available to check", true) - end - else - log("LANDING EVENT (fallback): Could not get coordinates for cargo aircraft " .. cargoName, true) - end - else - log("LANDING EVENT (fallback): " .. cargoName .. " is not a cargo aircraft", true) - end - else - log("LANDING EVENT: Fallback group retrieval failed", true) - -- Additional fallback: try raw DCS object methods (lowercase) and resolve by name - local okRaw, rawGroup = pcall(function() - if event and event.initiator and type(event.initiator) == 'table' and event.initiator.getGroup then - return event.initiator:getGroup() - end - return nil - end) - - if okRaw and rawGroup then - -- Try to get raw group name - local okRawName, rawName = pcall(function() - if rawGroup.getName then return rawGroup:getName() end - return nil - end) - - if okRawName and rawName then - local rawNameUp = tostring(rawName):upper() - log("LANDING EVENT: Resolved raw DCS group name: " .. rawNameUp, true) - - -- Try to find MOOSE GROUP by that name - local okFind, mooseGroup = pcall(function() return GROUP:FindByName(rawNameUp) end) - if okFind and mooseGroup and type(mooseGroup) == 'table' then - log("LANDING EVENT: Found MOOSE GROUP for raw name: " .. rawNameUp, true) - -- Reuse the fallback logic using mooseGroup - local cargoName = rawNameUp - local isCargoAircraft = false - for _, pattern in pairs(ADVANCED_SETTINGS.cargoPatterns) do - if string.find(cargoName, pattern) then - isCargoAircraft = true - break - end - end - if isCargoAircraft then - -- Try to get coordinate from raw group if possible - local cargoCoord = nil - local okPoint, point = pcall(function() - if rawGroup.getController then - -- Raw DCS unit list -> first unit point - local dcs = rawGroup - if dcs.getUnits then - local units = dcs:getUnits() - if units and #units > 0 and units[1].getPoint then - return units[1]:getPoint() - end - end - end - return nil - end) - if okPoint and point then cargoCoord = point end - - -- If we have a coordinate, find nearest squadron and process - if cargoCoord then - local closestAirbase = nil - local closestDistance = math.huge - local closestSquadron = nil - - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = math.huge - if type(cargoCoord) == 'table' and cargoCoord.Get2DDistance then - local okDist, d = pcall(function() return cargoCoord:Get2DDistance(airbase:GetCoordinate()) end) - if okDist and d then distance = d end - else - local okVec, aVec = pcall(function() return airbase:GetCoordinate():GetVec2() end) - if okVec and aVec and type(aVec) == 'table' then - local cx, cy - if cargoCoord.x and cargoCoord.z then - cx, cy = cargoCoord.x, cargoCoord.z - elseif cargoCoord.x and cargoCoord.y then - cx, cy = cargoCoord.x, cargoCoord.y - elseif cargoCoord[1] and cargoCoord[3] then - cx, cy = cargoCoord[1], cargoCoord[3] - elseif cargoCoord[1] and cargoCoord[2] then - cx, cy = cargoCoord[1], cargoCoord[2] - end - if cx and cy then - local dx = cx - aVec.x - local dy = cy - aVec.y - distance = math.sqrt(dx*dx + dy*dy) - end - end - end - - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = math.huge - if type(cargoCoord) == 'table' and cargoCoord.Get2DDistance then - local okDist, d = pcall(function() return cargoCoord:Get2DDistance(airbase:GetCoordinate()) end) - if okDist and d then distance = d end - else - local okVec, aVec = pcall(function() return airbase:GetCoordinate():GetVec2() end) - if okVec and aVec and type(aVec) == 'table' then - local cx, cy - if cargoCoord.x and cargoCoord.z then - cx, cy = cargoCoord.x, cargoCoord.z - elseif cargoCoord.x and cargoCoord.y then - cx, cy = cargoCoord.x, cargoCoord.y - elseif cargoCoord[1] and cargoCoord[3] then - cx, cy = cargoCoord[1], cargoCoord[3] - elseif cargoCoord[1] and cargoCoord[2] then - cx, cy = cargoCoord[1], cargoCoord[2] - end - if cx and cy then - local dx = cx - aVec.x - local dy = cy - aVec.y - distance = math.sqrt(dx*dx + dy*dy) - end - end - end - - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - if closestAirbase and closestDistance < ADVANCED_SETTINGS.cargoLandingEventRadius then - local abCoalition = closestAirbase:GetCoalition() - local coalitionKey = (abCoalition == coalition.side.RED) and "red" or "blue" - log("LANDING DELIVERY (raw-fallback): " .. rawNameUp .. " landed and delivered at " .. closestSquadron.airbaseName .. " (distance: " .. math.floor(closestDistance) .. "m)") - processCargoDelivery(mooseGroup, closestSquadron, abCoalition, coalitionKey) - else - log("LANDING DETECTED (raw-fallback): " .. rawNameUp .. " landed but no valid airbase found within range (closest: " .. (closestDistance and math.floor(closestDistance) .. "m" or "none") .. ")") - end - else - log("LANDING EVENT: Could not extract coordinate from raw DCS group: " .. tostring(rawName), true) - end - else - log("LANDING EVENT: Raw group " .. tostring(rawName) .. " is not a cargo aircraft", true) - end - else - log("LANDING EVENT: Could not find MOOSE GROUP for raw name: " .. tostring(rawName) .. " - attempting raw-group proxy processing", true) - - -- Even if we can't find a MOOSE GROUP, try to extract coordinates from the raw DCS group - local okPoint2, point2 = pcall(function() - if rawGroup and rawGroup.getUnits then - local units = rawGroup:getUnits() - if units and #units > 0 and units[1].getPoint then - return units[1]:getPoint() - end - end - return nil - end) - - if okPoint2 and point2 then - local cargoCoord = point2 - -- Find nearest configured squadron airbase (RED + BLUE) - local closestAirbase = nil - local closestDistance = math.huge - local closestSquadron = nil - - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = math.huge - local okVec, aVec = pcall(function() return airbase:GetCoordinate():GetVec2() end) - if okVec and aVec and type(aVec) == 'table' then - local cx, cy - if cargoCoord.x and cargoCoord.z then - cx, cy = cargoCoord.x, cargoCoord.z - elseif cargoCoord.x and cargoCoord.y then - cx, cy = cargoCoord.x, cargoCoord.y - elseif cargoCoord[1] and cargoCoord[3] then - cx, cy = cargoCoord[1], cargoCoord[3] - elseif cargoCoord[1] and cargoCoord[2] then - cx, cy = cargoCoord[1], cargoCoord[2] - end - if cx and cy then - local dx = cx - aVec.x - local dy = cy - aVec.y - distance = math.sqrt(dx*dx + dy*dy) - end - end - - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase then - local distance = math.huge - local okVec, aVec = pcall(function() return airbase:GetCoordinate():GetVec2() end) - if okVec and aVec and type(aVec) == 'table' then - local cx, cy - if cargoCoord.x and cargoCoord.z then - cx, cy = cargoCoord.x, cargoCoord.z - elseif cargoCoord.x and cargoCoord.y then - cx, cy = cargoCoord.x, cargoCoord.y - elseif cargoCoord[1] and cargoCoord[3] then - cx, cy = cargoCoord[1], cargoCoord[3] - elseif cargoCoord[1] and cargoCoord[2] then - cx, cy = cargoCoord[1], cargoCoord[2] - end - if cx and cy then - local dx = cx - aVec.x - local dy = cy - aVec.y - distance = math.sqrt(dx*dx + dy*dy) - end - end - - if distance < closestDistance then - closestDistance = distance - closestAirbase = airbase - closestSquadron = squadron - end - end - end - - if closestAirbase and closestDistance < ADVANCED_SETTINGS.cargoLandingEventRadius then - local abCoalition = closestAirbase:GetCoalition() - local coalitionKey = (abCoalition == coalition.side.RED) and "red" or "blue" - - -- Ensure the raw group name actually looks like a cargo aircraft before crediting - local rawNameUpCheck = tostring(rawName):upper() - local isCargoProxy = false - for _, pattern in pairs(ADVANCED_SETTINGS.cargoPatterns) do - if string.find(rawNameUpCheck, pattern) then - isCargoProxy = true - break - end - end - - if not isCargoProxy then - if ADVANCED_SETTINGS.verboseProxyLogging then - log("LANDING IGNORED (raw-proxy): " .. tostring(rawName) .. " is not a cargo-type name, skipping delivery proxy", true) - else - log("LANDING IGNORED (raw-proxy): " .. tostring(rawName) .. " is not a cargo-type name, skipping delivery proxy", true) - end - else - -- Build a small proxy object that exposes GetName and GetID so processCargoDelivery can use it - local cargoProxy = {} - function cargoProxy:GetName() - local okn, nm = pcall(function() - if rawGroup and rawGroup.getName then return rawGroup:getName() end - return tostring(rawName) - end) - return (okn and nm) and tostring(nm) or tostring(rawName) - end - function cargoProxy:GetID() - local okid, id = pcall(function() - if rawGroup and rawGroup.getID then return rawGroup:getID() end - if rawGroup and rawGroup.getID == nil and rawGroup.getController then - -- Try to hash name as fallback unique-ish id - return tostring(rawName) .. "_proxy" - end - return nil - end) - return (okid and id) and id or tostring(rawName) .. "_proxy" - end - - if ADVANCED_SETTINGS.verboseProxyLogging then - log("LANDING DELIVERY (raw-proxy): " .. tostring(rawName) .. " landed and delivered at " .. closestSquadron.airbaseName .. " (distance: " .. math.floor(closestDistance) .. "m) - using proxy object", true) - end - processCargoDelivery(cargoProxy, closestSquadron, abCoalition, coalitionKey) - end - else - if ADVANCED_SETTINGS.verboseProxyLogging then - log("LANDING DETECTED (raw-proxy): " .. tostring(rawName) .. " landed but no valid airbase found within range (closest: " .. (closestDistance and math.floor(closestDistance) .. "m" or "none") .. ")", true) - end - end - else - log("LANDING EVENT: Could not extract coordinate from raw DCS group for proxy processing: " .. tostring(rawName), true) - end - end - else - log("LANDING EVENT: rawGroup:getName() failed", true) - end - else - log("LANDING EVENT: raw DCS group retrieval failed", true) - end - end - end - end -end - --- Reassign squadron to an alternative airbase when primary airbase has issues -local function reassignSquadronToAlternativeAirbase(squadron, coalitionKey) - local coalitionSide = (coalitionKey == "red") and coalition.side.RED or coalition.side.BLUE - local coalitionName = (coalitionKey == "red") and "RED" or "BLUE" - local squadronConfig = getSquadronConfig(coalitionSide) - - -- Find alternative airbases (other squadrons' airbases that are operational) - local alternativeAirbases = {} - for _, altSquadron in pairs(squadronConfig) do - if altSquadron.airbaseName ~= squadron.airbaseName then - local usable, status = isAirbaseUsable(altSquadron.airbaseName, coalitionSide) - local healthStatus = airbaseHealthStatus[coalitionKey][altSquadron.airbaseName] or "operational" - - if usable and healthStatus == "operational" then - table.insert(alternativeAirbases, altSquadron.airbaseName) - end - end - end - - if #alternativeAirbases > 0 then - -- Select random alternative airbase - local newAirbase = alternativeAirbases[math.random(1, #alternativeAirbases)] - - -- Update squadron configuration (this is a runtime change) - squadron.airbaseName = newAirbase - airbaseHealthStatus[coalitionKey][squadron.airbaseName] = "operational" -- Reset health for new assignment - - log("REASSIGNED: " .. coalitionName .. " Squadron " .. squadron.displayName .. " moved from " .. squadron.airbaseName .. " to " .. newAirbase) - MESSAGE:New(coalitionName .. " Squadron " .. squadron.displayName .. " reassigned to " .. newAirbase .. " due to airbase issues", 20):ToCoalition(coalitionSide) - else - log("WARNING: No alternative airbases available for " .. coalitionName .. " Squadron " .. squadron.displayName) - MESSAGE:New("WARNING: No alternative airbases available for " .. squadron.displayName, 30):ToCoalition(coalitionSide) - end -end - --- Monitor for stuck aircraft at airbases -local function monitorStuckAircraft() - local currentTime = timer.getTime() - local stuckThreshold = 300 -- 5 minutes before considering aircraft stuck - local movementThreshold = 50 -- meters - aircraft must move at least this far to not be considered stuck - - for _, coalitionKey in ipairs({"red", "blue"}) do - local coalitionName = (coalitionKey == "red") and "RED" or "BLUE" - - for aircraftName, trackingData in pairs(aircraftSpawnTracking[coalitionKey]) do - if trackingData and trackingData.group and trackingData.group:IsAlive() then - local timeSinceSpawn = currentTime - trackingData.spawnTime - - -- Only check aircraft that have been spawned for at least the threshold time - if timeSinceSpawn >= stuckThreshold then - local currentPos = safeCoordinate(trackingData.group) - local spawnPos = trackingData.spawnPos - local distanceMoved = nil - - if currentPos and spawnPos and type(spawnPos) == "table" and spawnPos.Get2DDistance then - local okDist, dist = pcall(function() return spawnPos:Get2DDistance(currentPos) end) - if okDist and dist then - distanceMoved = dist - end - end - - if distanceMoved then - - -- Check if aircraft has moved less than threshold (stuck) - if distanceMoved < movementThreshold then - log("STUCK AIRCRAFT DETECTED: " .. aircraftName .. " at " .. trackingData.airbase .. - " has only moved " .. math.floor(distanceMoved) .. "m in " .. math.floor(timeSinceSpawn/60) .. " minutes") - - -- Mark airbase as having stuck aircraft - airbaseHealthStatus[coalitionKey][trackingData.airbase] = "stuck-aircraft" - - -- Remove the stuck aircraft and clear tracking - pcall(function() trackingData.group:Destroy() end) - cleanupInterceptorEntry(aircraftName, coalitionKey) - - -- Reassign squadron to alternative airbase - reassignSquadronToAlternativeAirbase(trackingData.squadron, coalitionKey) - - MESSAGE:New(coalitionName .. " aircraft stuck at " .. trackingData.airbase .. " - destroyed and squadron reassigned", 15):ToCoalition(coalitionKey == "red" and coalition.side.RED or coalition.side.BLUE) - else - -- Aircraft has moved sufficiently, remove from tracking (no longer needs monitoring) - log("Aircraft " .. aircraftName .. " has moved " .. math.floor(distanceMoved) .. "m - removing from stuck monitoring", true) - aircraftSpawnTracking[coalitionKey][aircraftName] = nil - end - else - log("Stuck monitor: no coordinate data for " .. aircraftName .. "; removing from tracking", true) - aircraftSpawnTracking[coalitionKey][aircraftName] = nil - end - end - else - -- Clean up dead aircraft from tracking - aircraftSpawnTracking[coalitionKey][aircraftName] = nil - end - end - end -end - --- Send interceptor back to base -local function sendInterceptorHome(interceptor, coalitionSide) - if not interceptor or not interceptor:IsAlive() then - return - end - - -- Find nearest friendly airbase - local interceptorCoord = safeCoordinate(interceptor) - if not interceptorCoord then - log("ERROR: Could not get interceptor coordinates for RTB", true) - return - end - local nearestAirbase = nil - local nearestAirbaseCoord = nil - local shortestDistance = math.huge - local squadronConfig = getSquadronConfig(coalitionSide) - - -- Check all squadron airbases to find the nearest one that's still friendly - for _, squadron in pairs(squadronConfig) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase and airbase:GetCoalition() == coalitionSide and airbase:IsAlive() then - local airbaseCoord = safeCoordinate(airbase) - if airbaseCoord then - local okDist, distance = pcall(function() return interceptorCoord:Get2DDistance(airbaseCoord) end) - if okDist and distance and distance < shortestDistance then - shortestDistance = distance - nearestAirbase = airbase - nearestAirbaseCoord = airbaseCoord - end - end - end - end - - if nearestAirbase and nearestAirbaseCoord then - local airbaseName = "airbase" - local okABName, fetchedABName = pcall(function() return nearestAirbase:GetName() end) - if okABName and fetchedABName then - airbaseName = fetchedABName - end - - local rtbAltitude = ADVANCED_SETTINGS.rtbAltitude * 0.3048 -- Convert feet to meters - local okRtb, rtbCoord = pcall(function() return nearestAirbaseCoord:SetAltitude(rtbAltitude) end) - if not okRtb or not rtbCoord then - log("ERROR: Failed to compute RTB coordinate for " .. airbaseName, true) - return - end - - -- Clear current tasks and route home - pcall(function() interceptor:ClearTasks() end) - local routeOk, routeErr = pcall(function() interceptor:RouteAirTo(rtbCoord, ADVANCED_SETTINGS.rtbSpeed * 0.5144, "BARO") end) - - local _, coalitionName = getCoalitionSettings(coalitionSide) - local interceptorName = "interceptor" - local okName, fetchedName = pcall(function() return interceptor:GetName() end) - if okName and fetchedName then - interceptorName = fetchedName - end - - if not routeOk and routeErr then - log("ERROR: Failed to assign RTB route for " .. interceptorName .. " -> " .. airbaseName .. ": " .. tostring(routeErr), true) - else - log("Sending " .. coalitionName .. " " .. interceptorName .. " back to " .. airbaseName, true) - end - - -- Schedule cleanup after they should have landed - local coalitionSettings = getCoalitionSettings(coalitionSide) - local flightTime = math.ceil(shortestDistance / (ADVANCED_SETTINGS.rtbSpeed * 0.5144)) + coalitionSettings.rtbFlightBuffer - - SCHEDULER:New(nil, function() - local coalitionKey = (coalitionSide == coalition.side.RED) and "red" or "blue" - local name = nil - if interceptor and interceptor.GetName then - local ok, value = pcall(function() return interceptor:GetName() end) - if ok then name = value end - end - if name and activeInterceptors[coalitionKey][name] then - destroyInterceptorGroup(interceptor, coalitionKey, 0) - log("Cleaned up " .. coalitionName .. " " .. name .. " after RTB", true) - end - end, {}, flightTime) - else - local _, coalitionName = getCoalitionSettings(coalitionSide) - log("No friendly airbase found for " .. coalitionName .. " " .. interceptor:GetName() .. ", will clean up normally") - end -end - --- Check if airbase is still usable -local function isAirbaseUsable(airbaseName, expectedCoalition) - local airbase = AIRBASE:FindByName(airbaseName) - if not airbase then - return false, "not found" - elseif airbase:GetCoalition() ~= expectedCoalition then - local capturedBy = "Unknown" - if airbase:GetCoalition() == coalition.side.RED then - capturedBy = "Red" - elseif airbase:GetCoalition() == coalition.side.BLUE then - capturedBy = "Blue" - else - capturedBy = "Neutral" - end - return false, "captured by " .. capturedBy - elseif not airbase:IsAlive() then - return false, "destroyed" - else - return true, "operational" - end -end - --- Count active fighters for coalition -local function countActiveFighters(coalitionSide) - local count = 0 - local coalitionKey = (coalitionSide == coalition.side.RED) and "red" or "blue" - - for _, interceptorData in pairs(activeInterceptors[coalitionKey]) do - if interceptorData and interceptorData.group and interceptorData.group:IsAlive() then - count = count + interceptorData.group:GetSize() - end - end - return count -end - --- Find best squadron to launch for coalition using zone-based priorities -local function findBestSquadron(threatCoord, threatSize, coalitionSide) - local bestSquadron = nil - local bestPriority = "none" - local bestResponseRatio = 0 - local shortestDistance = math.huge - local currentTime = timer.getTime() - local squadronConfig = getSquadronConfig(coalitionSide) - local coalitionSettings, coalitionName = getCoalitionSettings(coalitionSide) - local coalitionKey = (coalitionSide == coalition.side.RED) and "red" or "blue" - local zonePriorityOrder = {"tertiary", "primary", "secondary", "global"} - - -- First pass: find squadrons that can respond to this threat - local availableSquadrons = {} - - for _, squadron in pairs(squadronConfig) do - -- Check basic availability - local squadronAvailable = true - local unavailableReason = "" - - -- Check squadron state first - if squadron.state and squadron.state ~= "operational" then - squadronAvailable = false - if squadron.state == "captured" then - unavailableReason = "airbase captured by enemy" - elseif squadron.state == "destroyed" then - unavailableReason = "airbase destroyed" - else - unavailableReason = "squadron not operational (state: " .. tostring(squadron.state) .. ")" - end - end - - -- Check cooldown - if squadronAvailable and squadronCooldowns[coalitionKey][squadron.templateName] then - local cooldownEnd = squadronCooldowns[coalitionKey][squadron.templateName] - if currentTime < cooldownEnd then - local timeLeft = math.ceil((cooldownEnd - currentTime) / 60) - squadronAvailable = false - unavailableReason = "on cooldown for " .. timeLeft .. "m" - else - -- Cooldown expired, remove it - squadronCooldowns[coalitionKey][squadron.templateName] = nil - log(coalitionName .. " Squadron " .. squadron.displayName .. " cooldown expired, available for launch", true) - end - end - - -- Check aircraft availability - if squadronAvailable then - local availableAircraft = squadronAircraftCounts[coalitionKey][squadron.templateName] or 0 - if availableAircraft <= 0 then - squadronAvailable = false - unavailableReason = "no aircraft available (" .. availableAircraft .. "/" .. squadron.aircraft .. ")" - end - end - - -- Check airbase status - if squadronAvailable then - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if not airbase then - squadronAvailable = false - unavailableReason = "airbase not found" - elseif airbase:GetCoalition() ~= coalitionSide then - squadronAvailable = false - unavailableReason = "airbase no longer under " .. coalitionName .. " control" - elseif not airbase:IsAlive() then - squadronAvailable = false - unavailableReason = "airbase destroyed" - end - end - - -- Check template exists (Note: Templates are validated during SPAWN:New() call) - -- Template validation is handled by MOOSE SPAWN class during actual spawning - - if squadronAvailable then - -- Get zone priority and response ratio - local zonePriority, responseRatio, zoneDescription = getThreatZonePriority(threatCoord, squadron, coalitionSide) - - -- Check if threat meets priority threshold for secondary zones - local zoneConfig = squadron.zoneConfig or getDefaultZoneConfig() - if zonePriority == "secondary" and zoneConfig.ignoreLowPriority then - if threatSize < zoneConfig.priorityThreshold then - log(coalitionName .. " " .. squadron.displayName .. " ignoring low-priority threat in secondary zone (" .. - threatSize .. " < " .. zoneConfig.priorityThreshold .. ")", true) - responseRatio = 0 - zonePriority = "none" - end - end - - if responseRatio > 0 then - local airbase = AIRBASE:FindByName(squadron.airbaseName) - local airbaseCoord = airbase:GetCoordinate() - local distance = airbaseCoord:Get2DDistance(threatCoord) - - table.insert(availableSquadrons, { - squadron = squadron, - zonePriority = zonePriority, - responseRatio = responseRatio, - distance = distance, - zoneDescription = zoneDescription - }) - - log(coalitionName .. " " .. squadron.displayName .. " can respond: " .. zoneDescription .. - " (ratio: " .. responseRatio .. ", distance: " .. math.floor(distance/1852) .. "nm)", true) - else - log(coalitionName .. " " .. squadron.displayName .. " will not respond: " .. zoneDescription, true) - end - else - log(coalitionName .. " " .. squadron.displayName .. " unavailable: " .. unavailableReason, true) - end - end - - -- Second pass: select best squadron by priority and distance - if #availableSquadrons > 0 then - -- Sort by zone priority (higher priority first), then by distance (closer first) - table.sort(availableSquadrons, function(a, b) - -- Get priority indices - local aPriorityIndex = 5 - local bPriorityIndex = 5 - for i, priority in ipairs(zonePriorityOrder) do - if a.zonePriority == priority then aPriorityIndex = i end - if b.zonePriority == priority then bPriorityIndex = i end - end - - -- First sort by priority (lower index = higher priority) - if aPriorityIndex ~= bPriorityIndex then - return aPriorityIndex < bPriorityIndex - end - - -- Then sort by distance (closer is better) - return a.distance < b.distance - end) - - local selected = availableSquadrons[1] - log("Selected " .. coalitionName .. " " .. selected.squadron.displayName .. " for response: " .. - selected.zoneDescription .. " (distance: " .. math.floor(selected.distance/1852) .. "nm)") - - return selected.squadron, selected.responseRatio, selected.zoneDescription - end - - if ADVANCED_SETTINGS.enableDetailedLogging then - log("No " .. coalitionName .. " squadron available for threat at coordinates") - end - return nil, 0, "no available squadrons" -end - --- Launch interceptor for coalition -local function launchInterceptor(threatGroup, coalitionSide) - if not threatGroup or not threatGroup:IsAlive() then - return - end - - local threatCoord = threatGroup:GetCoordinate() - local threatName = threatGroup:GetName() - local threatSize = threatGroup:GetSize() - local coalitionSettings, coalitionName = getCoalitionSettings(coalitionSide) - local coalitionKey = (coalitionSide == coalition.side.RED) and "red" or "blue" - - -- Check if threat already has interceptors assigned - if assignedThreats[coalitionKey][threatName] then - local assignedInterceptors = assignedThreats[coalitionKey][threatName] - local aliveCount = 0 - - -- Check if assigned interceptors are still alive - if type(assignedInterceptors) == "table" then - for _, interceptor in pairs(assignedInterceptors) do - if interceptor and interceptor:IsAlive() then - aliveCount = aliveCount + 1 - end - end - else - -- Handle legacy single interceptor assignment - if assignedInterceptors and assignedInterceptors:IsAlive() then - aliveCount = 1 - end - end - - if aliveCount > 0 then - return -- Still being intercepted - else - -- All interceptors are dead, clear the assignment - assignedThreats[coalitionKey][threatName] = nil - end - end - - -- Find best squadron using zone-based priority system first - local squadron, zoneResponseRatio, zoneDescription = findBestSquadron(threatCoord, threatSize, coalitionSide) - - if not squadron then - if ADVANCED_SETTINGS.enableDetailedLogging then - log("No " .. coalitionName .. " squadron available") - end - return - end - - -- Calculate how many interceptors to launch using zone-modified ratio - local finalInterceptRatio = coalitionSettings.interceptRatio * zoneResponseRatio - local interceptorsNeeded = math.max(1, math.ceil(threatSize * finalInterceptRatio)) - - -- Check if we have capacity - if countActiveFighters(coalitionSide) + interceptorsNeeded > coalitionSettings.maxActiveCAP then - interceptorsNeeded = coalitionSettings.maxActiveCAP - countActiveFighters(coalitionSide) - if interceptorsNeeded <= 0 then - log(coalitionName .. " max fighters airborne, skipping launch") - return - end - end - if not squadron then - if ADVANCED_SETTINGS.enableDetailedLogging then - log("No " .. coalitionName .. " squadron available") - end - return - end - - -- Limit interceptors to available aircraft - local availableAircraft = squadronAircraftCounts[coalitionKey][squadron.templateName] or 0 - interceptorsNeeded = math.min(interceptorsNeeded, availableAircraft) - - if interceptorsNeeded <= 0 then - log(coalitionName .. " Squadron " .. squadron.displayName .. " has no aircraft to launch") - return - end - - -- Launch multiple interceptors to match threat - local spawn = SPAWN:New(squadron.templateName) - if not spawn then - log("ERROR: Failed to create SPAWN object for " .. coalitionName .. " " .. squadron.templateName) - return - end - spawn:InitCleanUp(900) - - local interceptors = {} - - for i = 1, interceptorsNeeded do - local interceptor = spawn:Spawn() - - if interceptor then - table.insert(interceptors, interceptor) - - -- Wait a moment for initialization - SCHEDULER:New(nil, function() - if interceptor and interceptor:IsAlive() then - -- Set aggressive AI - interceptor:OptionROEOpenFire() - interceptor:OptionROTVertical() - - -- Route to threat - local currentThreatCoord = safeCoordinate(threatGroup) - if currentThreatCoord then - local okIntercept, interceptCoord = pcall(function() - return currentThreatCoord:SetAltitude(squadron.altitude * 0.3048) - end) - if okIntercept and interceptCoord then - pcall(function() - interceptor:RouteAirTo(interceptCoord, squadron.speed * 0.5144, "BARO") - end) - end - - -- Attack the threat - local attackTask = { - id = 'AttackGroup', - params = { - groupId = threatGroup:GetID(), - weaponType = 'Auto', - attackQtyLimit = 0, - priority = 1 - } - } - interceptor:PushTask(attackTask, 1) - end - end - end, {}, 3) - - -- Track the interceptor with squadron info - local interceptorName = "interceptor" - local okName, fetchedName = pcall(function() return interceptor:GetName() end) - if okName and fetchedName then - interceptorName = fetchedName - end - - activeInterceptors[coalitionKey][interceptorName] = { - group = interceptor, - squadron = squadron.templateName, - displayName = squadron.displayName - } - - -- Track spawn position for stuck aircraft detection - local spawnPos = safeCoordinate(interceptor) - if spawnPos then - aircraftSpawnTracking[coalitionKey][interceptorName] = { - spawnPos = spawnPos, - spawnTime = timer.getTime(), - squadron = squadron, - airbase = squadron.airbaseName - } - log("Tracking spawn position for " .. interceptorName .. " at " .. squadron.airbaseName, true) - end - - -- Emergency cleanup (safety net) - SCHEDULER:New(nil, function() - local name = nil - if interceptor and interceptor.GetName then - local ok, value = pcall(function() return interceptor:GetName() end) - if ok then name = value end - end - if name and activeInterceptors[coalitionKey][name] then - log("Emergency cleanup of " .. coalitionName .. " " .. name .. " (should have RTB'd)") - destroyInterceptorGroup(interceptor, coalitionKey, 0) - end - end, {}, coalitionSettings.emergencyCleanupTime) - end - end - - -- Log the launch and track assignment - if #interceptors > 0 then - -- Decrement squadron aircraft count - local currentCount = squadronAircraftCounts[coalitionKey][squadron.templateName] or 0 - squadronAircraftCounts[coalitionKey][squadron.templateName] = math.max(0, currentCount - #interceptors) - local remainingCount = squadronAircraftCounts[coalitionKey][squadron.templateName] - - log("Launched " .. #interceptors .. " x " .. coalitionName .. " " .. squadron.displayName .. " to intercept " .. - threatSize .. " x " .. threatName .. " (" .. zoneDescription .. ", ratio: " .. string.format("%.1f", finalInterceptRatio) .. - ", remaining: " .. remainingCount .. "/" .. squadron.aircraft .. ")") - assignedThreats[coalitionKey][threatName] = interceptors - lastLaunchTime[coalitionKey][threatName] = timer.getTime() - - -- Apply cooldown immediately when squadron launches - local currentTime = timer.getTime() - squadronCooldowns[coalitionKey][squadron.templateName] = currentTime + coalitionSettings.squadronCooldown - local cooldownMinutes = coalitionSettings.squadronCooldown / 60 - log(coalitionName .. " Squadron " .. squadron.displayName .. " LAUNCHED! Applying " .. cooldownMinutes .. " minute cooldown") - end -end - --- Main threat detection loop for coalition -local function detectThreatsForCoalition(coalitionSide) - local coalitionSettings, coalitionName = getCoalitionSettings(coalitionSide) - local enemyCoalition = (coalitionSide == coalition.side.RED) and "blue" or "red" - local coalitionKey = (coalitionSide == coalition.side.RED) and "red" or "blue" - - log("Scanning for " .. coalitionName .. " threats...", true) - - -- Clean up dead threats from tracking - local currentThreats = {} - - -- Find all enemy aircraft using cached set for performance - local cacheKey = enemyCoalition .. "Aircraft" - if not cachedSets[cacheKey] then - cachedSets[cacheKey] = SET_GROUP:New():FilterCoalitions(enemyCoalition):FilterCategoryAirplane():FilterStart() - end - local enemyAircraft = cachedSets[cacheKey] - local threatCount = 0 - - enemyAircraft:ForEach(function(enemyGroup) - if enemyGroup and enemyGroup:IsAlive() then - threatCount = threatCount + 1 - currentThreats[enemyGroup:GetName()] = true - log("Found " .. coalitionName .. " threat: " .. enemyGroup:GetName() .. " (" .. enemyGroup:GetTypeName() .. ")", true) - - -- Launch interceptor for this threat - launchInterceptor(enemyGroup, coalitionSide) - end - end) - - -- Clean up assignments for threats that no longer exist and send interceptors home - for threatName, assignedInterceptors in pairs(assignedThreats[coalitionKey]) do - if not currentThreats[threatName] then - log("Threat " .. threatName .. " eliminated, sending " .. coalitionName .. " interceptors home...") - - -- Send assigned interceptors back to base - if type(assignedInterceptors) == "table" then - for _, interceptor in pairs(assignedInterceptors) do - if interceptor and interceptor:IsAlive() then - sendInterceptorHome(interceptor, coalitionSide) - end - end - else - -- Handle legacy single interceptor assignment - if assignedInterceptors and assignedInterceptors:IsAlive() then - sendInterceptorHome(assignedInterceptors, coalitionSide) - end - end - - assignedThreats[coalitionKey][threatName] = nil - end - end - - -- Count assigned threats - local assignedCount = 0 - for _ in pairs(assignedThreats[coalitionKey]) do assignedCount = assignedCount + 1 end - - log(coalitionName .. " scan complete: " .. threatCount .. " threats, " .. countActiveFighters(coalitionSide) .. " active fighters, " .. - assignedCount .. " assigned") -end - --- Main threat detection loop - calls both coalitions -local function detectThreats() - if TADC_SETTINGS.enableRed then - detectThreatsForCoalition(coalition.side.RED) - end - - if TADC_SETTINGS.enableBlue then - detectThreatsForCoalition(coalition.side.BLUE) - end -end - --- Monitor interceptor groups for cleanup when destroyed -local function monitorInterceptors() - -- Check RED interceptors - if TADC_SETTINGS.enableRed then - for interceptorName, interceptorData in pairs(activeInterceptors.red) do - if interceptorData and interceptorData.group then - if not interceptorData.group:IsAlive() then - -- Interceptor group is destroyed - just clean up tracking - local displayName = interceptorData.displayName - log("RED Interceptor from " .. displayName .. " destroyed: " .. interceptorName, true) - - -- Remove from active tracking - activeInterceptors.red[interceptorName] = nil - end - end - end - end - - -- Check BLUE interceptors - if TADC_SETTINGS.enableBlue then - for interceptorName, interceptorData in pairs(activeInterceptors.blue) do - if interceptorData and interceptorData.group then - if not interceptorData.group:IsAlive() then - -- Interceptor group is destroyed - just clean up tracking - local displayName = interceptorData.displayName - log("BLUE Interceptor from " .. displayName .. " destroyed: " .. interceptorName, true) - - -- Remove from active tracking - activeInterceptors.blue[interceptorName] = nil - end - end - end - end -end - --- Periodic airbase status check -local function checkAirbaseStatus() - log("=== AIRBASE STATUS REPORT ===") - - local redUsableCount = 0 - local blueUsableCount = 0 - local currentTime = timer.getTime() - - -- Check RED airbases - if TADC_SETTINGS.enableRed then - log("=== RED COALITION STATUS ===") - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - local aircraftCount = squadronAircraftCounts.red[squadron.templateName] or 0 - local maxAircraft = squadron.aircraft - - -- Determine status based on squadron state - local statusPrefix = "✗" - local statusText = "" - local usable = false - - if squadron.state == "operational" then - statusPrefix = "✓" - statusText = "Operational: " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - usable = true - elseif squadron.state == "captured" then - -- Determine who captured it - local capturedBy = "enemy" - if airbase and airbase:IsAlive() then - local airbaseCoalition = airbase:GetCoalition() - if airbaseCoalition == coalition.side.BLUE then - capturedBy = "Blue" - elseif airbaseCoalition == coalition.side.NEUTRAL then - capturedBy = "neutral forces" - end - end - statusText = "Captured by " .. capturedBy .. ": " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - elseif squadron.state == "destroyed" then - statusText = "Destroyed: " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - else - statusText = "Unknown state: " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - end - - -- Add zone information if configured - local zoneStatus = "" - if squadron.primaryZone or squadron.secondaryZone or squadron.tertiaryZone then - local zones = {} - if squadron.primaryZone then table.insert(zones, "P:" .. squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zones, "S:" .. squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zones, "T:" .. squadron.tertiaryZone) end - zoneStatus = " Zones: " .. table.concat(zones, " ") - end - - -- Check if squadron is on cooldown (only show for operational squadrons) - local cooldownStatus = "" - if squadron.state == "operational" and squadronCooldowns.red[squadron.templateName] then - local cooldownEnd = squadronCooldowns.red[squadron.templateName] - if currentTime < cooldownEnd then - local timeLeft = math.ceil((cooldownEnd - currentTime) / 60) - cooldownStatus = " (COOLDOWN: " .. timeLeft .. "m)" - end - end - - local fullStatus = statusText .. zoneStatus .. cooldownStatus - - if usable and cooldownStatus == "" and aircraftCount > 0 then - redUsableCount = redUsableCount + 1 - end - - log(statusPrefix .. " " .. squadron.displayName .. " (" .. squadron.airbaseName .. ") - " .. fullStatus) - end - log("RED Status: " .. redUsableCount .. "/" .. #RED_SQUADRON_CONFIG .. " airbases operational") - end - - -- Check BLUE airbases - if TADC_SETTINGS.enableBlue then - log("=== BLUE COALITION STATUS ===") - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - local aircraftCount = squadronAircraftCounts.blue[squadron.templateName] or 0 - local maxAircraft = squadron.aircraft - - -- Determine status based on squadron state - local statusPrefix = "✗" - local statusText = "" - local usable = false - - if squadron.state == "operational" then - statusPrefix = "✓" - statusText = "Operational: " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - usable = true - elseif squadron.state == "captured" then - -- Determine who captured it - local capturedBy = "enemy" - if airbase and airbase:IsAlive() then - local airbaseCoalition = airbase:GetCoalition() - if airbaseCoalition == coalition.side.RED then - capturedBy = "Red" - elseif airbaseCoalition == coalition.side.NEUTRAL then - capturedBy = "neutral forces" - end - end - statusText = "Captured by " .. capturedBy .. ": " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - elseif squadron.state == "destroyed" then - statusText = "Destroyed: " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - else - statusText = "Unknown state: " .. aircraftCount .. "/" .. maxAircraft .. " aircraft" - end - - -- Add zone information if configured - local zoneStatus = "" - if squadron.primaryZone or squadron.secondaryZone or squadron.tertiaryZone then - local zones = {} - if squadron.primaryZone then table.insert(zones, "P:" .. squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zones, "S:" .. squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zones, "T:" .. squadron.tertiaryZone) end - zoneStatus = " Zones: " .. table.concat(zones, " ") - end - - -- Check if squadron is on cooldown (only show for operational squadrons) - local cooldownStatus = "" - if squadron.state == "operational" and squadronCooldowns.blue[squadron.templateName] then - local cooldownEnd = squadronCooldowns.blue[squadron.templateName] - if currentTime < cooldownEnd then - local timeLeft = math.ceil((cooldownEnd - currentTime) / 60) - cooldownStatus = " (COOLDOWN: " .. timeLeft .. "m)" - end - end - - local fullStatus = statusText .. zoneStatus .. cooldownStatus - - if usable and cooldownStatus == "" and aircraftCount > 0 then - blueUsableCount = blueUsableCount + 1 - end - - log(statusPrefix .. " " .. squadron.displayName .. " (" .. squadron.airbaseName .. ") - " .. fullStatus) - end - log("BLUE Status: " .. blueUsableCount .. "/" .. #BLUE_SQUADRON_CONFIG .. " airbases operational") - end -end - --- Cleanup old delivery records to prevent memory buildup -local function cleanupOldDeliveries() - if _G.processedDeliveries then - local currentTime = timer.getTime() - local cleanupAge = 3600 -- Remove delivery records older than 1 hour - local removedCount = 0 - - for deliveryKey, timestamp in pairs(_G.processedDeliveries) do - if currentTime - timestamp > cleanupAge then - _G.processedDeliveries[deliveryKey] = nil - removedCount = removedCount + 1 - end - end - - if removedCount > 0 then - log("Cleaned up " .. removedCount .. " old cargo delivery records", true) - end - end -end - --- Update squadron states based on airbase coalition control -local function updateSquadronStates() - -- Update RED squadrons - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase and airbase:IsAlive() then - local airbaseCoalition = airbase:GetCoalition() - if airbaseCoalition == coalition.side.RED then - -- Only update to operational if not already operational (avoid spam) - if squadron.state ~= "operational" then - squadron.state = "operational" - log("RED Squadron " .. squadron.displayName .. " at " .. squadron.airbaseName .. " is now operational") - end - else - -- Airbase captured - if squadron.state ~= "captured" then - squadron.state = "captured" - log("RED Squadron " .. squadron.displayName .. " at " .. squadron.airbaseName .. " has been captured by enemy") - end - end - else - -- Airbase destroyed or not found - if squadron.state ~= "destroyed" then - squadron.state = "destroyed" - log("RED Squadron " .. squadron.displayName .. " at " .. squadron.airbaseName .. " airbase destroyed or not found") - end - end - end - - -- Update BLUE squadrons - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local airbase = AIRBASE:FindByName(squadron.airbaseName) - if airbase and airbase:IsAlive() then - local airbaseCoalition = airbase:GetCoalition() - if airbaseCoalition == coalition.side.BLUE then - -- Only update to operational if not already operational (avoid spam) - if squadron.state ~= "operational" then - squadron.state = "operational" - log("BLUE Squadron " .. squadron.displayName .. " at " .. squadron.airbaseName .. " is now operational") - end - else - -- Airbase captured - if squadron.state ~= "captured" then - squadron.state = "captured" - log("BLUE Squadron " .. squadron.displayName .. " at " .. squadron.airbaseName .. " has been captured by enemy") - end - end - else - -- Airbase destroyed or not found - if squadron.state ~= "destroyed" then - squadron.state = "destroyed" - log("BLUE Squadron " .. squadron.displayName .. " at " .. squadron.airbaseName .. " airbase destroyed or not found") - end - end - end -end - --- System initialization -local function initializeSystem() - log("Universal Dual-Coalition TADC starting...") - - -- Create zones from late-activated helicopter units (MOOSE method) - -- This allows using helicopters named "RED_BORDER", "BLUE_BORDER" etc. as zone markers - -- Uses the helicopter's waypoints as polygon vertices (standard MOOSE method) - local function createZoneFromUnit(unitName) - -- Try to find as a group first (this is the standard MOOSE way) - local group = GROUP:FindByName(unitName) - if group then - -- Create polygon zone using the group's waypoints as vertices - local zone = ZONE_POLYGON:NewFromGroupName(unitName, unitName) - if zone then - log("Created polygon zone '" .. unitName .. "' from helicopter waypoints") - return zone - else - log("Warning: Could not create polygon zone from group '" .. unitName .. "' - check waypoints") - end - else - log("Warning: No group named '" .. unitName .. "' found for zone creation") - end - return nil - end - - -- Try to create zones for all configured zone names - local zoneNames = {} - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - if squadron.primaryZone then table.insert(zoneNames, squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zoneNames, squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zoneNames, squadron.tertiaryZone) end - end - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - if squadron.primaryZone then table.insert(zoneNames, squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zoneNames, squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zoneNames, squadron.tertiaryZone) end - end - - -- Create zones from helicopters - for _, zoneName in ipairs(zoneNames) do - if not ZONE:FindByName(zoneName) then - createZoneFromUnit(zoneName) - end - end - - -- Validate configuration - if not validateConfiguration() then - log("System startup aborted due to configuration errors!") - return false - end - - -- Initialize squadron states - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - squadron.state = "operational" - end - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - squadron.state = "operational" - end - log("Squadron states initialized") - - -- Log enabled coalitions - local enabledCoalitions = {} - if TADC_SETTINGS.enableRed then - table.insert(enabledCoalitions, "RED (" .. #RED_SQUADRON_CONFIG .. " squadrons)") - end - if TADC_SETTINGS.enableBlue then - table.insert(enabledCoalitions, "BLUE (" .. #BLUE_SQUADRON_CONFIG .. " squadrons)") - end - log("Enabled coalitions: " .. table.concat(enabledCoalitions, ", ")) - - -- Log initial squadron aircraft counts - if TADC_SETTINGS.enableRed then - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local count = squadronAircraftCounts.red[squadron.templateName] - log("Initial RED: " .. squadron.displayName .. " has " .. count .. "/" .. squadron.aircraft .. " aircraft") - end - end - - if TADC_SETTINGS.enableBlue then - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local count = squadronAircraftCounts.blue[squadron.templateName] - log("Initial BLUE: " .. squadron.displayName .. " has " .. count .. "/" .. squadron.aircraft .. " aircraft") - end - end - - -- Start schedulers - -- Set up event handler for cargo landing detection (handled via MOOSE EVENTHANDLER wrapper below) - - -- Re-register world event handler for robust detection (handles raw DCS initiators and race cases) - world.addEventHandler(cargoEventHandler) - - -- MOOSE-style EVENTHANDLER wrapper for readability: logs EventData but does NOT delegate to avoid double-processing - if EVENTHANDLER then - local TADC_CARGO_LANDING_HANDLER = EVENTHANDLER:New() - function TADC_CARGO_LANDING_HANDLER:OnEventLand(EventData) - -- Convert MOOSE EventData to raw world.event format and reuse existing handler logic - if ADVANCED_SETTINGS.enableDetailedLogging then - -- Log presence and types of key fields - local function safeName(obj) - if not obj then return "" end - local ok, n = pcall(function() - if obj.GetName then return obj:GetName() end - if obj.getName then return obj:getName() end - return nil - end) - return (ok and n) and tostring(n) or "" - end - - local iniUnitPresent = EventData.IniUnit ~= nil - local iniGroupPresent = EventData.IniGroup ~= nil - local placePresent = EventData.Place ~= nil - local iniUnitName = safeName(EventData.IniUnit) - local iniGroupName = safeName(EventData.IniGroup) - local placeName = safeName(EventData.Place) - - log("MOOSE LAND EVENT: IniUnitPresent=" .. tostring(iniUnitPresent) .. ", IniUnitName=" .. tostring(iniUnitName) .. ", IniGroupPresent=" .. tostring(iniGroupPresent) .. ", IniGroupName=" .. tostring(iniGroupName) .. ", PlacePresent=" .. tostring(placePresent) .. ", PlaceName=" .. tostring(placeName), true) - end - - local rawEvent = { - id = world.event.S_EVENT_LAND, - initiator = EventData.IniUnit or EventData.IniGroup or nil, - place = EventData.Place or nil, - -- Provide the original EventData for potential fallback use - _moose_original = EventData - } - -- Log and return; the world event handler `cargoEventHandler` will handle the actual processing. - return - end - -- Register the MOOSE handler - TADC_CARGO_LANDING_HANDLER:HandleEvent(EVENTS.Land) - end - - SCHEDULER:New(nil, detectThreats, {}, 5, TADC_SETTINGS.checkInterval) - SCHEDULER:New(nil, monitorInterceptors, {}, 10, TADC_SETTINGS.monitorInterval) - SCHEDULER:New(nil, checkAirbaseStatus, {}, 30, TADC_SETTINGS.statusReportInterval) - SCHEDULER:New(nil, updateSquadronStates, {}, 60, 30) -- Update squadron states every 30 seconds (60 sec initial delay to allow DCS airbase coalition to stabilize) - SCHEDULER:New(nil, cleanupOldDeliveries, {}, 60, 3600) -- Cleanup old delivery records every hour - - -- Start periodic squadron summary broadcast - SCHEDULER:New(nil, broadcastSquadronSummary, {}, 10, TADC_SETTINGS.squadronSummaryInterval) - - log("Universal Dual-Coalition TADC operational!") - log("RED Replenishment: " .. TADC_SETTINGS.red.cargoReplenishmentAmount .. " aircraft per cargo delivery") - log("BLUE Replenishment: " .. TADC_SETTINGS.blue.cargoReplenishmentAmount .. " aircraft per cargo delivery") - - return true -end - - -initializeSystem() - --- Add F10 menu command for squadron summary --- Use MenuManager to create coalition-specific menus (not mission-wide) -local menuRootBlue, menuRootRed - -if MenuManager then - menuRootBlue = MenuManager.CreateCoalitionMenu(coalition.side.BLUE, "TADC Utilities") - menuRootRed = MenuManager.CreateCoalitionMenu(coalition.side.RED, "TADC Utilities") -else - menuRootBlue = MENU_COALITION:New(coalition.side.BLUE, "TADC Utilities") - menuRootRed = MENU_COALITION:New(coalition.side.RED, "TADC Utilities") -end - -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Squadron Resource Summary", menuRootRed, function() - local summary = getSquadronResourceSummary(coalition.side.RED) - MESSAGE:New(summary, 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Squadron Resource Summary", menuRootBlue, function() - local summary = getSquadronResourceSummary(coalition.side.BLUE) - MESSAGE:New(summary, 20):ToCoalition(coalition.side.BLUE) -end) - --- 1. Show Airbase Status Report -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Airbase Status Report", menuRootRed, function() - local report = "=== RED Airbase Status ===\n" - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local usable, status = isAirbaseUsable(squadron.airbaseName, coalition.side.RED) - local aircraftCount = squadronAircraftCounts.red[squadron.templateName] or 0 - local maxAircraft = squadron.aircraft - local cooldown = squadronCooldowns.red[squadron.templateName] - local cooldownStatus = "" - if cooldown then - local timeLeft = math.ceil((cooldown - timer.getTime()) / 60) - if timeLeft > 0 then cooldownStatus = " (COOLDOWN: " .. timeLeft .. "m)" end - end - report = report .. string.format("%s: %s | Aircraft: %d/%d%s\n", squadron.displayName, status, aircraftCount, maxAircraft, cooldownStatus) - end - MESSAGE:New(report, 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Airbase Status Report", menuRootBlue, function() - local report = "=== BLUE Airbase Status ===\n" - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local usable, status = isAirbaseUsable(squadron.airbaseName, coalition.side.BLUE) - local aircraftCount = squadronAircraftCounts.blue[squadron.templateName] or 0 - local maxAircraft = squadron.aircraft - local cooldown = squadronCooldowns.blue[squadron.templateName] - local cooldownStatus = "" - if cooldown then - local timeLeft = math.ceil((cooldown - timer.getTime()) / 60) - if timeLeft > 0 then cooldownStatus = " (COOLDOWN: " .. timeLeft .. "m)" end - end - report = report .. string.format("%s: %s | Aircraft: %d/%d%s\n", squadron.displayName, status, aircraftCount, maxAircraft, cooldownStatus) - end - MESSAGE:New(report, 20):ToCoalition(coalition.side.BLUE) -end) - --- 2. Show Active Interceptors -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Active Interceptors", menuRootRed, function() - local lines = {"Active RED Interceptors:"} - for name, data in pairs(activeInterceptors.red) do - if data and data.group and data.group:IsAlive() then - table.insert(lines, string.format("%s (Squadron: %s, Threat: %s)", name, data.displayName or data.squadron, assignedThreats.red[name] or "N/A")) - end - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Active Interceptors", menuRootBlue, function() - local lines = {"Active BLUE Interceptors:"} - for name, data in pairs(activeInterceptors.blue) do - if data and data.group and data.group:IsAlive() then - table.insert(lines, string.format("%s (Squadron: %s, Threat: %s)", name, data.displayName or data.squadron, assignedThreats.blue[name] or "N/A")) - end - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.BLUE) -end) - --- 3. Show Threat Summary -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Threat Summary", menuRootRed, function() - local lines = {"Detected BLUE Threats:"} - if cachedSets.blueAircraft then - cachedSets.blueAircraft:ForEach(function(group) - if group and group:IsAlive() then - table.insert(lines, string.format("%s (Size: %d)", group:GetName(), group:GetSize())) - end - end) - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Threat Summary", menuRootBlue, function() - local lines = {"Detected RED Threats:"} - if cachedSets.redAircraft then - cachedSets.redAircraft:ForEach(function(group) - if group and group:IsAlive() then - table.insert(lines, string.format("%s (Size: %d)", group:GetName(), group:GetSize())) - end - end) - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.BLUE) -end) - --- 4. Request Immediate Squadron Summary Broadcast -MENU_COALITION_COMMAND:New(coalition.side.RED, "Broadcast Squadron Summary Now", menuRootRed, function() - local summary = getSquadronResourceSummary(coalition.side.RED) - MESSAGE:New(summary, 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Broadcast Squadron Summary Now", menuRootBlue, function() - local summary = getSquadronResourceSummary(coalition.side.BLUE) - MESSAGE:New(summary, 20):ToCoalition(coalition.side.BLUE) -end) - --- 5. Show Cargo Delivery Log -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Cargo Delivery Log", menuRootRed, function() - local lines = {"Recent RED Cargo Deliveries:"} - if _G.processedDeliveries then - for key, timestamp in pairs(_G.processedDeliveries) do - if string.find(key, "RED") then - table.insert(lines, string.format("%s at %d", key, timestamp)) - end - end - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Cargo Delivery Log", menuRootBlue, function() - local lines = {"Recent BLUE Cargo Deliveries:"} - if _G.processedDeliveries then - for key, timestamp in pairs(_G.processedDeliveries) do - if string.find(key, "BLUE") then - table.insert(lines, string.format("%s at %d", key, timestamp)) - end - end - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.BLUE) -end) - --- 6. Show Zone Coverage Map -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Zone Coverage Map", menuRootRed, function() - local lines = {"RED Zone Coverage:"} - for _, squadron in pairs(RED_SQUADRON_CONFIG) do - local zones = {} - if squadron.primaryZone then table.insert(zones, "Primary: " .. squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zones, "Secondary: " .. squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zones, "Tertiary: " .. squadron.tertiaryZone) end - table.insert(lines, string.format("%s: %s", squadron.displayName, table.concat(zones, ", "))) - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.RED) -end) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Zone Coverage Map", menuRootBlue, function() - local lines = {"BLUE Zone Coverage:"} - for _, squadron in pairs(BLUE_SQUADRON_CONFIG) do - local zones = {} - if squadron.primaryZone then table.insert(zones, "Primary: " .. squadron.primaryZone) end - if squadron.secondaryZone then table.insert(zones, "Secondary: " .. squadron.secondaryZone) end - if squadron.tertiaryZone then table.insert(zones, "Tertiary: " .. squadron.tertiaryZone) end - table.insert(lines, string.format("%s: %s", squadron.displayName, table.concat(zones, ", "))) - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToCoalition(coalition.side.BLUE) -end) - --- 7. Admin/Debug Commands - Create submenus under each coalition's TADC Utilities -local menuAdminBlue = MENU_COALITION:New(coalition.side.BLUE, "Admin / Debug", menuRootBlue) -local menuAdminRed = MENU_COALITION:New(coalition.side.RED, "Admin / Debug", menuRootRed) - -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Emergency Cleanup Interceptors", menuAdminBlue, function() - local cleaned = 0 - for name, interceptors in pairs(activeInterceptors.red) do - if interceptors and interceptors.group and not interceptors.group:IsAlive() then - cleanupInterceptorEntry(name, "red") - cleaned = cleaned + 1 - end - end - for name, interceptors in pairs(activeInterceptors.blue) do - if interceptors and interceptors.group and not interceptors.group:IsAlive() then - cleanupInterceptorEntry(name, "blue") - cleaned = cleaned + 1 - end - end - MESSAGE:New("Cleaned up " .. cleaned .. " dead interceptor groups.", 20):ToBlue() -end) - -MENU_COALITION_COMMAND:New(coalition.side.RED, "Emergency Cleanup Interceptors", menuAdminRed, function() - local cleaned = 0 - for name, interceptors in pairs(activeInterceptors.red) do - if interceptors and interceptors.group and not interceptors.group:IsAlive() then - cleanupInterceptorEntry(name, "red") - cleaned = cleaned + 1 - end - end - for name, interceptors in pairs(activeInterceptors.blue) do - if interceptors and interceptors.group and not interceptors.group:IsAlive() then - cleanupInterceptorEntry(name, "blue") - cleaned = cleaned + 1 - end - end - MESSAGE:New("Cleaned up " .. cleaned .. " dead interceptor groups.", 20):ToRed() -end) - --- 9. Show System Uptime/Status -local systemStartTime = timer.getTime() -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show TADC System Status", menuAdminBlue, function() - local uptime = math.floor((timer.getTime() - systemStartTime) / 60) - local status = string.format("TADC System Uptime: %d minutes\nCheck Interval: %ds\nMonitor Interval: %ds\nStatus Report Interval: %ds\nSquadron Summary Interval: %ds\nCargo Check Interval: %ds", uptime, TADC_SETTINGS.checkInterval, TADC_SETTINGS.monitorInterval, TADC_SETTINGS.statusReportInterval, TADC_SETTINGS.squadronSummaryInterval, TADC_SETTINGS.cargoCheckInterval) - MESSAGE:New(status, 20):ToBlue() -end) - -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show TADC System Status", menuAdminRed, function() - local uptime = math.floor((timer.getTime() - systemStartTime) / 60) - local status = string.format("TADC System Uptime: %d minutes\nCheck Interval: %ds\nMonitor Interval: %ds\nStatus Report Interval: %ds\nSquadron Summary Interval: %ds\nCargo Check Interval: %ds", uptime, TADC_SETTINGS.checkInterval, TADC_SETTINGS.monitorInterval, TADC_SETTINGS.statusReportInterval, TADC_SETTINGS.squadronSummaryInterval, TADC_SETTINGS.cargoCheckInterval) - MESSAGE:New(status, 20):ToRed() -end) - --- 10. Check for Stuck Aircraft (manual trigger) -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Check for Stuck Aircraft", menuAdminBlue, function() - monitorStuckAircraft() - MESSAGE:New("Stuck aircraft check completed", 10):ToBlue() -end) - -MENU_COALITION_COMMAND:New(coalition.side.RED, "Check for Stuck Aircraft", menuAdminRed, function() - monitorStuckAircraft() - MESSAGE:New("Stuck aircraft check completed", 10):ToRed() -end) - --- 11. Show Airbase Health Status -MENU_COALITION_COMMAND:New(coalition.side.BLUE, "Show Airbase Health Status", menuAdminBlue, function() - local lines = {"Airbase Health Status:"} - for _, coalitionKey in ipairs({"red", "blue"}) do - local coalitionName = (coalitionKey == "red") and "RED" or "BLUE" - table.insert(lines, coalitionName .. " Coalition:") - for airbaseName, status in pairs(airbaseHealthStatus[coalitionKey]) do - table.insert(lines, " " .. airbaseName .. ": " .. status) - end - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToBlue() -end) - -MENU_COALITION_COMMAND:New(coalition.side.RED, "Show Airbase Health Status", menuAdminRed, function() - local lines = {"Airbase Health Status:"} - for _, coalitionKey in ipairs({"red", "blue"}) do - local coalitionName = (coalitionKey == "red") and "RED" or "BLUE" - table.insert(lines, coalitionName .. " Coalition:") - for airbaseName, status in pairs(airbaseHealthStatus[coalitionKey]) do - table.insert(lines, " " .. airbaseName .. ": " .. status) - end - end - MESSAGE:New(table.concat(lines, "\n"), 20):ToRed() -end) - --- Initialize airbase health status for all configured airbases -for _, coalitionKey in ipairs({"red", "blue"}) do - local squadronConfig = getSquadronConfig(coalitionKey == "red" and coalition.side.RED or coalition.side.BLUE) - for _, squadron in pairs(squadronConfig) do - if not airbaseHealthStatus[coalitionKey][squadron.airbaseName] then - airbaseHealthStatus[coalitionKey][squadron.airbaseName] = "operational" - end - end -end - --- Set up periodic stuck aircraft monitoring (every 2 minutes) -SCHEDULER:New(nil, monitorStuckAircraft, {}, 120, 120) - - - diff --git a/Moose_TADC/Moose_TADC_SquadronConfigs_Load1st.lua b/Moose_TADC/Moose_TADC_SquadronConfigs_Load1st.lua deleted file mode 100644 index 01f1335..0000000 --- a/Moose_TADC/Moose_TADC_SquadronConfigs_Load1st.lua +++ /dev/null @@ -1,244 +0,0 @@ - ---[[ THIS FILE MUST BE LOADED BEFORE THE MAIN Moose_TADC.lua SCRIPT -═══════════════════════════════════════════════════════════════════════════════ - SQUADRON CONFIGURATION -═══════════════════════════════════════════════════════════════════════════════ - -INSTRUCTIONS: -1. Create fighter aircraft templates for BOTH coalitions in the mission editor -2. Place them at or near the airbases you want them to operate from -3. Configure RED squadrons in RED_SQUADRON_CONFIG -4. Configure BLUE squadrons in BLUE_SQUADRON_CONFIG - -TEMPLATE NAMING SUGGESTIONS: -• RED: "RED_CAP_Batumi_F15", "RED_INTERCEPT_Senaki_MiG29" -• BLUE: "BLUE_CAP_Nellis_F16", "BLUE_INTERCEPT_Creech_F22" -• Include coalition and airbase name for easy identification - -AIRBASE NAMES: -• Use exact names as they appear in DCS (case sensitive) -• RED examples: "Batumi", "Senaki", "Gudauta" -• BLUE examples: "Nellis AFB", "McCarran International", "Tonopah Test Range" -• Find airbase names in the mission editor - -AIRCRAFT NUMBERS: -• Set realistic numbers based on mission requirements -• Consider aircraft consumption and cargo replenishment -• Balance between realism and gameplay performance - -ZONE-BASED AREAS OF RESPONSIBILITY: -• Create zones in mission editor (MOOSE polygons, circles, etc.) -• primaryZone: Squadron's main area (full response) -• secondaryZone: Backup/support area (reduced response) -• tertiaryZone: Emergency fallback area (enhanced response) -• Leave zones as nil for global threat response -• Multiple squadrons can share overlapping zones -• Use zone names exactly as they appear in mission editor - -ZONE BEHAVIOR EXAMPLES: -• Border Defense: primaryZone = "SECTOR_ALPHA", secondaryZone = "BUFFER_ZONE" -• Base Defense: tertiaryZone = "BASE_PERIMETER", enableFallback = true -• Layered Defense: Different zones per squadron with overlap -• Emergency Response: High tertiaryResponse ratio for critical areas -]] - --- ═══════════════════════════════════════════════════════════════════════════ --- RED COALITION SQUADRONS --- ═══════════════════════════════════════════════════════════════════════════ - -RED_SQUADRON_CONFIG = { - --[[ EXAMPLE RED SQUADRON - CUSTOMIZE FOR YOUR MISSION - { - templateName = "RED_CAP_Batumi_F15", -- Template name from mission editor - displayName = "Batumi F-15C CAP", -- Human-readable name for logs - airbaseName = "Batumi", -- Exact airbase name from DCS - aircraft = 12, -- Maximum aircraft in squadron - skill = AI.Skill.GOOD, -- AI skill level - altitude = 20000, -- Patrol altitude (feet) - speed = 350, -- Patrol speed (knots) - patrolTime = 25, -- Time on station (minutes) - type = "FIGHTER" - - -- Zone-based Areas of Responsibility (optional - leave nil for global response) - primaryZone = "RED_BORDER", -- Main responsibility area (zone name from mission editor) - secondaryZone = nil, -- Secondary coverage area (zone name) - tertiaryZone = nil, -- Emergency/fallback zone (zone name) - - -- Zone behavior settings (optional - uses defaults if not specified) - zoneConfig = { - primaryResponse = 1.0, -- Intercept ratio multiplier in primary zone - secondaryResponse = 0.6, -- Intercept ratio multiplier in secondary zone - tertiaryResponse = 1.4, -- Intercept ratio multiplier in tertiary zone - maxRange = 200, -- Maximum engagement range from airbase (nm) - enableFallback = false, -- Auto-switch to tertiary when base threatened - priorityThreshold = 4, -- Min aircraft count for "major threat" - ignoreLowPriority = false, -- Ignore threats below threshold in secondary zones - } - }, - ]] - - -- ADD YOUR RED SQUADRONS HERE - { - templateName = "Sukhumi CAP", -- Change to your RED template name - displayName = "Sukhumi CAP", -- Change to your preferred name - airbaseName = "Sukhumi-Babushara", -- Change to your RED airbase - aircraft = 12, -- Adjust aircraft count - skill = AI.Skill.ACE, -- AVERAGE, GOOD, HIGH, EXCELLENT, ACE - altitude = 20000, -- Patrol altitude (feet) - speed = 350, -- Patrol speed (knots) - patrolTime = 25, -- Time on station (minutes) - type = "FIGHTER", - - -- Zone-based Areas of Responsibility (optional - leave nil for global response) - primaryZone = "RED_BORDER", -- Main responsibility area (zone name from mission editor) - secondaryZone = nil, -- Secondary coverage area (zone name) - tertiaryZone = nil, -- Emergency/fallback zone (zone name) - - -- Zone behavior settings (optional - uses defaults if not specified) - zoneConfig = { - primaryResponse = 1.0, -- Intercept ratio multiplier in primary zone - secondaryResponse = 0.6, -- Intercept ratio multiplier in secondary zone - tertiaryResponse = 1.4, -- Intercept ratio multiplier in tertiary zone - maxRange = 200, -- Maximum engagement range from airbase (nm) - enableFallback = false, -- Auto-switch to tertiary when base threatened - priorityThreshold = 4, -- Min aircraft count for "major threat" - ignoreLowPriority = false, -- Ignore threats below threshold in secondary zones - } - }, - - { - templateName = "Gudauta CAP-MiG-21", -- Change to your RED template name - displayName = "Gudauta CAP-MiG-21", -- Change to your preferred name - airbaseName = "Gudauta", -- Change to your RED airbase - aircraft = 12, -- Adjust aircraft count - skill = AI.Skill.ACE, -- AVERAGE, GOOD, HIGH, EXCELLENT - altitude = 20000, -- Patrol altitude (feet) - speed = 350, -- Patrol speed (knots) - patrolTime = 25, -- Time on station (minutes) - type = "FIGHTER", - - -- Zone-based Areas of Responsibility (optional - leave nil for global response) - primaryZone = "GUDAUTA_BORDER", -- Main responsibility area (zone name from mission editor) - secondaryZone = nil, -- Secondary coverage area (zone name) - tertiaryZone = nil, -- Emergency/fallback zone (zone name) - - -- Zone behavior settings (optional - uses defaults if not specified) - zoneConfig = { - primaryResponse = 1.0, -- Intercept ratio multiplier in primary zone - secondaryResponse = 0.6, -- Intercept ratio multiplier in secondary zone - tertiaryResponse = 1.4, -- Intercept ratio multiplier in tertiary zone - maxRange = 200, -- Maximum engagement range from airbase (nm) - enableFallback = false, -- Auto-switch to tertiary when base threatened - priorityThreshold = 4, -- Min aircraft count for "major threat" - ignoreLowPriority = false, -- Ignore threats below threshold in secondary zones - } - }, - - { - templateName = "Gudauta CAP-MiG-23", -- Change to your RED template name - displayName = "Gudauta CAP-MiG-23", -- Change to your preferred name - airbaseName = "Gudauta", -- Change to your RED airbase - aircraft = 14, -- Adjust aircraft count - skill = AI.Skill.ACE, -- AVERAGE, GOOD, HIGH, EXCELLENT - altitude = 20000, -- Patrol altitude (feet) - speed = 350, -- Patrol speed (knots) - patrolTime = 25, -- Time on station (minutes) - type = "FIGHTER", - - -- Zone-based Areas of Responsibility (optional - leave nil for global response) - primaryZone = "GUDAUTA_BORDER", -- Main responsibility area (zone name from mission editor) - secondaryZone = "RED_BORDER", -- Secondary coverage area (zone name) - tertiaryZone = nil, -- Emergency/fallback zone (zone name) - - -- Zone behavior settings (optional - uses defaults if not specified) - zoneConfig = { - primaryResponse = 1.0, -- Intercept ratio multiplier in primary zone - secondaryResponse = 0.6, -- Intercept ratio multiplier in secondary zone - tertiaryResponse = 1.4, -- Intercept ratio multiplier in tertiary zone - maxRange = 200, -- Maximum engagement range from airbase (nm) - enableFallback = false, -- Auto-switch to tertiary when base threatened - priorityThreshold = 4, -- Min aircraft count for "major threat" - ignoreLowPriority = false, -- Ignore threats below threshold in secondary zones - } - }, -} - --- ═══════════════════════════════════════════════════════════════════════════ --- BLUE COALITION SQUADRONS --- ═══════════════════════════════════════════════════════════════════════════ - -BLUE_SQUADRON_CONFIG = { - --[[ EXAMPLE BLUE SQUADRON - CUSTOMIZE FOR YOUR MISSION - { - templateName = "BLUE_CAP_Nellis_F16", -- Template name from mission editor - displayName = "Nellis F-16C CAP", -- Human-readable name for logs - airbaseName = "Nellis AFB", -- Exact airbase name from DCS - aircraft = 14, -- Maximum aircraft in squadron - skill = AI.Skill.EXCELLENT, -- AI skill level - altitude = 22000, -- Patrol altitude (feet) - speed = 380, -- Patrol speed (knots) - patrolTime = 28, -- Time on station (minutes) - type = "FIGHTER" -- Aircraft type - }, - ]] - - -- ADD YOUR BLUE SQUADRONS HERE - - { - templateName = "Kutaisi CAP", -- Change to your BLUE template name - displayName = "Kutaisi CAP", -- Change to your preferred name - airbaseName = "Kutaisi", -- Change to your BLUE airbase - aircraft = 18, -- Adjust aircraft count - skill = AI.Skill.EXCELLENT, -- AVERAGE, GOOD, HIGH, EXCELLENT - altitude = 18000, -- Patrol altitude (feet) - speed = 320, -- Patrol speed (knots) - patrolTime = 22, -- Time on station (minutes) - type = "FIGHTER", - - -- Zone-based Areas of Responsibility (optional - leave nil for global response) - primaryZone = "BLUE_BORDER", -- Main responsibility area (zone name from mission editor) - secondaryZone = nil, -- Secondary coverage area (zone name) - tertiaryZone = nil, -- Emergency/fallback zone (zone name) - - -- Zone behavior settings (optional - uses defaults if not specified) - zoneConfig = { - primaryResponse = 1.0, -- Intercept ratio multiplier in primary zone - secondaryResponse = 0.6, -- Intercept ratio multiplier in secondary zone - tertiaryResponse = 1.4, -- Intercept ratio multiplier in tertiary zone - maxRange = 200, -- Maximum engagement range from airbase (nm) - enableFallback = true, -- Auto-switch to tertiary when base threatened - priorityThreshold = 4, -- Min aircraft count for "major threat" - ignoreLowPriority = false, -- Ignore threats below threshold in secondary zones - } - }, - - { - templateName = "Batumi CAP", -- Change to your BLUE template name - displayName = "Batumi CAP", -- Change to your preferred name - airbaseName = "Batumi", -- Change to your BLUE airbase - aircraft = 18, -- Adjust aircraft count - skill = AI.Skill.EXCELLENT, -- AVERAGE, GOOD, HIGH, EXCELLENT - altitude = 18000, -- Patrol altitude (feet) - speed = 320, -- Patrol speed (knots) - patrolTime = 22, -- Time on station (minutes) - type = "FIGHTER", - - -- Zone-based Areas of Responsibility (optional - leave nil for global response) - primaryZone = "BATUMI_BORDER", -- Main responsibility area (zone name from mission editor) - secondaryZone = "BLUE_BORDER", -- Secondary coverage area (zone name) - tertiaryZone = "BATUMI_BORDER", -- Emergency/fallback zone (zone name) - - -- Zone behavior settings (optional - uses defaults if not specified) - zoneConfig = { - primaryResponse = 1.0, -- Intercept ratio multiplier in primary zone - secondaryResponse = 0.6, -- Intercept ratio multiplier in secondary zone - tertiaryResponse = 1.4, -- Intercept ratio multiplier in tertiary zone - maxRange = 200, -- Maximum engagement range from airbase (nm) - enableFallback = true, -- Auto-switch to tertiary when base threatened - priorityThreshold = 4, -- Min aircraft count for "major threat" - ignoreLowPriority = false, -- Ignore threats below threshold in secondary zones - } - }, -} - - diff --git a/Moose_TADC/TADC_Example.miz b/Moose_TADC/TADC_Example.miz deleted file mode 100644 index bd22a9f..0000000 Binary files a/Moose_TADC/TADC_Example.miz and /dev/null differ diff --git a/Moose_TADC/TADC_Menu.lua b/Moose_TADC/TADC_Menu.lua deleted file mode 100644 index 5e92cd4..0000000 --- a/Moose_TADC/TADC_Menu.lua +++ /dev/null @@ -1,194 +0,0 @@ - --- ================================================================ --- UNIVERSAL MOOSE SPAWNER UTILITY MENU --- ================================================================ --- Allows spawning any group template (fighter, cargo, etc.) at any airbase --- for either coalition, with options for cold/hot/runway start. --- Includes cleanup and status commands. --- ================================================================ - --- List of available airbases (Caucasus map, add/remove as needed) -local AIRBASES = { - "Kutaisi", "Senaki-Kolkhi", "Sukhumi-Babushara", "Gudauta", "Sochi-Adler", - "Krymsk", "Anapa-Vityazevo", "Krasnodar-Pashkovsky", "Mineralnye Vody", - "Nalchik", "Mozdok", "Beslan" -} - --- List of example templates (add your own as needed) -local TEMPLATES = { - "CARGO", "CARGO_RU", "Kutaisi CAP", "Sukhumi CAP", "Batumi CAP", "Gudauta CAP" - -- Add more fighter/cargo templates here -} - --- Coalition options -local COALITIONS = { - {name = "Blue", side = coalition.side.BLUE}, - {name = "Red", side = coalition.side.RED} -} - --- Start types -local START_TYPES = { - {name = "Cold Start", value = SPAWN.Takeoff.Cold}, - {name = "Hot Start", value = SPAWN.Takeoff.Hot}, - {name = "Runway", value = SPAWN.Takeoff.Runway} -} - --- Track spawned groups for cleanup -local spawnedGroups = {} - --- Utility: Add group to cleanup tracking -local function TrackGroup(group) - if group and group:IsAlive() then - table.insert(spawnedGroups, group) - end -end - --- Utility: Cleanup all spawned groups -local function CleanupAll() - local cleaned = 0 - for _, group in ipairs(spawnedGroups) do - if group and group:IsAlive() then - group:Destroy() - cleaned = cleaned + 1 - end - end - spawnedGroups = {} - MESSAGE:New("Cleaned up " .. cleaned .. " spawned groups", 10):ToAll() -end - --- Utility: Show status of spawned groups -local function ShowStatus() - local alive = 0 - for _, group in ipairs(spawnedGroups) do - if group and group:IsAlive() then alive = alive + 1 end - end - MESSAGE:New("Spawner Status:\nAlive groups: " .. alive .. "\nTotal spawned: " .. #spawnedGroups, 15):ToAll() -end - --- Main menu -local MenuRoot = MENU_MISSION:New("Universal Spawner") - --- Submenus for coalition -local MenuBlue = MENU_MISSION:New("Spawn for BLUE", MenuRoot) -local MenuRed = MENU_MISSION:New("Spawn for RED", MenuRoot) - --- For each coalition, create template/airbase/start type menus -for _, coalitionData in ipairs(COALITIONS) do - local menuCoalition = (coalitionData.side == coalition.side.BLUE) and MenuBlue or MenuRed - - for _, templateName in ipairs(TEMPLATES) do - local menuTemplate = MENU_MISSION:New("Template: " .. templateName, menuCoalition) - - for _, airbaseName in ipairs(AIRBASES) do - local menuAirbase = MENU_MISSION:New("Airbase: " .. airbaseName, menuTemplate) - - for _, startType in ipairs(START_TYPES) do - local menuStartType = MENU_MISSION:New(startType.name, menuAirbase) - for numToSpawn = 1, 5 do - MENU_MISSION_COMMAND:New( - "Spawn " .. numToSpawn, - menuStartType, - function() - local airbase = AIRBASE:FindByName(airbaseName) - if not airbase then - MESSAGE:New("Airbase not found: " .. airbaseName, 10):ToAll() - return - end - local spawnObj = SPAWN:New(templateName) - spawnObj:InitLimit(10, 20) - local spawned = 0 - for i = 1, numToSpawn do - local group = spawnObj:SpawnAtAirbase(airbase, startType.value) - if group then - TrackGroup(group) - spawned = spawned + 1 - end - end - if spawned > 0 then - MESSAGE:New("Spawned " .. spawned .. " '" .. templateName .. "' at " .. airbaseName .. " (" .. startType.name .. ")", 10):ToAll() - else - MESSAGE:New("Failed to spawn '" .. templateName .. "' at " .. airbaseName, 10):ToAll() - end - end - ) - end - end - end - end -end - --- Quick spawn (first template, first airbase, cold start) -MENU_MISSION_COMMAND:New( - "Quick Spawn (" .. TEMPLATES[1] .. ")", - MenuRoot, - function() - local airbase = AIRBASE:FindByName(AIRBASES[1]) - local spawnObj = SPAWN:New(TEMPLATES[1]) - spawnObj:InitLimit(10, 20) - local spawned = 0 - for i = 1, 1 do - local group = spawnObj:SpawnAtAirbase(airbase, SPAWN.Takeoff.Cold) - if group then - TrackGroup(group) - spawned = spawned + 1 - end - end - if spawned > 0 then - MESSAGE:New("Quick spawned '" .. TEMPLATES[1] .. "' at " .. AIRBASES[1], 10):ToAll() - else - MESSAGE:New("Failed to quick spawn '" .. TEMPLATES[1] .. "' at " .. AIRBASES[1], 10):ToAll() - end - end -) - --- Status and cleanup commands -MENU_MISSION_COMMAND:New("Show Spawner Status", MenuRoot, ShowStatus) -MENU_MISSION_COMMAND:New("Cleanup All Spawned Groups", MenuRoot, CleanupAll) - --- ================================================================ --- CONFIGURATION --- ================================================================ - --- Menu configuration -local MENU_CONFIG = { - rootMenuText = "CARGO OPERATIONS", - coalitionSide = coalition.side.BLUE, -- Change to RED if needed - debugMode = true -} - --- Spawn configuration -local SPAWN_CONFIG = { - templateName = "CARGO", -- Template name in mission editor - maxActive = 3, -- Maximum active aircraft - maxSpawns = 10, -- Maximum total spawns - cleanupTime = 300, -- Cleanup time in seconds (5 minutes) - spawnAirbase = "Kutaisi", -- Default spawn airbase - takeoffType = SPAWN.Takeoff.Cold -- Cold start by default -} - --- Available airbases for spawning (Caucasus map) -local AVAILABLE_AIRBASES = { - "Kutaisi", - "Senaki-Kolkhi", - "Sukhumi-Babushara", - "Gudauta", - "Sochi-Adler", - "Krymsk", - "Anapa-Vityazevo", - "Krasnodar-Pashkovsky", - "Mineralnye Vody", - "Nalchik", - "Mozdok", - "Beslan" -} - --- ================================================================ --- GLOBAL VARIABLES --- ================================================================ - --- Spawn object -local CargoSpawn = nil - --- Menu objects -local MenuRoot = nil -local MenuSpawn = nil diff --git a/Moose_TADC/TADC_SYSTEM_GUIDE.html b/Moose_TADC/TADC_SYSTEM_GUIDE.html deleted file mode 100644 index 0fa7556..0000000 --- a/Moose_TADC/TADC_SYSTEM_GUIDE.html +++ /dev/null @@ -1,1353 +0,0 @@ - - - - - - Universal TADC System - Mission Maker's Guide - - - -
-

Universal TADC System - Mission Maker's Guide

-

Tactical Air Defense Controller with Automated Logistics

- - - -

What is TADC?

- -

TADC (Tactical Air Defense Controller) is an automated air defense system for DCS missions that creates realistic, dynamic fighter aircraft responses to airborne threats. Think of it as an AI commander that:

- -
    -
  • Detects enemy aircraft automatically
  • -
  • Launches fighters to intercept threats
  • -
  • Manages squadron resources (aircraft availability, cooldowns)
  • -
  • Replenishes squadrons through cargo aircraft deliveries
  • -
  • Operates independently for both RED and BLUE coalitions
  • -
- -

Why Use TADC?

- -
    -
  • Realistic Air Defense - Squadrons respond intelligently to threats
  • -
  • Dynamic Gameplay - Air battles happen organically without manual triggers
  • -
  • Balanced Competition - Both sides operate with equal capabilities
  • -
  • Sustainable Operations - Cargo system allows long missions with resupply
  • -
  • Easy Configuration - Simple tables instead of complex scripting
  • -
- -

System Overview

- -

The TADC system consists of three main scripts that work together:

- -

1. Squadron Configuration (Moose_TADC_SquadronConfigs_Load1st.lua)

-

Purpose: Define all fighter squadrons for RED and BLUE coalitions
- Contains: Aircraft templates, airbases, patrol parameters, zone assignments
- Load Order: FIRST (must load before main TADC script)

- -

2. Main TADC System (Moose_TADC_Load2nd.lua)

-

Purpose: Core threat detection and interceptor management
- Contains: Threat scanning, squadron selection, intercept logic, F10 menus
- Load Order: SECOND (after squadron config)

- -

3. Cargo Dispatcher (Moose_TADC_CargoDispatcher.lua)

-

Purpose: Automated squadron resupply through cargo aircraft
- Contains: Squadron monitoring, cargo spawning, delivery tracking
- Load Order: THIRD (optional, only if using resupply system)

- -

Quick Start Guide

- -

Prerequisites

- -

Before setting up TADC, you need:

- -
    -
  • MOOSE Framework loaded in your mission (download from MOOSE GitHub)
  • -
  • Fighter aircraft templates created in DCS mission editor (as GROUPS, not units)
  • -
  • Airbases under correct coalition control
  • -
  • (Optional) Cargo aircraft templates for resupply missions
  • -
- -

5-Minute Setup

- -

1 Create Fighter Templates

- -
    -
  1. Open your mission in DCS Mission Editor
  2. -
  3. Place fighter aircraft as LATE ACTIVATION GROUPS (not individual units)
  4. -
  5. Name them clearly (example: RED_CAP_Kilpyavr_MiG29)
  6. -
  7. Position them at or near the airbases they'll operate from
  8. -
  9. Set them to the correct coalition (RED or BLUE)
  10. -
- -
- Important: Use GROUP templates, not UNIT templates! -
- -

2 Load MOOSE Framework

- -
    -
  1. In mission editor, go to Triggers
  2. -
  3. Create a new trigger: MISSION START
  4. -
  5. Add action: DO SCRIPT FILE
  6. -
  7. Select your MOOSE.lua file
  8. -
  9. This must be the FIRST script loaded
  10. -
- -

3 Load Squadron Configuration

- -
    -
  1. Create another DO SCRIPT FILE action (after MOOSE)
  2. -
  3. Select Moose_TADC_SquadronConfigs_Load1st.lua
  4. -
  5. Edit the file to configure your squadrons (see below)
  6. -
- -

4 Load Main TADC System

- -
    -
  1. Create another DO SCRIPT FILE action
  2. -
  3. Select Moose_TADC_Load2nd.lua
  4. -
  5. (Optional) Adjust settings in the file if needed
  6. -
- -

5 (Optional) Load Cargo Dispatcher

- -
    -
  1. If using resupply system, create another DO SCRIPT FILE action
  2. -
  3. Select Moose_TADC_CargoDispatcher.lua
  4. -
- -
- Load Order in Mission Editor: -
1. MOOSE.lua
-2. Moose_TADC_SquadronConfigs_Load1st.lua
-3. Moose_TADC_Load2nd.lua
-4. Moose_TADC_CargoDispatcher.lua (optional)
-
- -

Detailed Configuration

- -

Squadron Configuration Explained

- -

Open Moose_TADC_SquadronConfigs_Load1st.lua and find the squadron configuration sections.

- -

Basic Squadron Example

- -
{
-    templateName = "RED_CAP_Kilpyavr_MiG29",     -- Must match mission editor template name
-    displayName = "Kilpyavr CAP MiG-29A",        -- Human-readable name for logs/messages
-    airbaseName = "Kilpyavr",                    -- Exact airbase name from DCS
-    aircraft = 12,                                -- Maximum aircraft in squadron
-    skill = AI.Skill.EXCELLENT,                   -- AI pilot skill level
-    altitude = 20000,                             -- Patrol altitude (feet)
-    speed = 350,                                  -- Patrol speed (knots)
-    patrolTime = 30,                              -- Time on station (minutes)
-    type = "FIGHTER"                              -- Aircraft role
-}
- -

Parameter Guide

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterDescriptionExample Values
templateNameGroup name from mission editor (EXACT match)"RED_CAP_Base_F15"
displayNameFriendly name shown in messages"Kilpyavr CAP Squadron"
airbaseNameDCS airbase name (case sensitive)"Kilpyavr", "Nellis AFB"
aircraftMax squadron size8, 12, 16
skillAI difficultyAI.Skill.AVERAGE, GOOD, HIGH, EXCELLENT, ACE
altitudeCAP patrol altitude15000 (feet)
speedCAP patrol speed300 (knots)
patrolTimeMinutes on station before RTB20, 30, 40
typeAircraft role"FIGHTER"
- -

Finding Airbase Names

- -

Method 1: Mission Editor

-
    -
  1. Open mission editor
  2. -
  3. Click on any airbase
  4. -
  5. The exact name appears in the properties panel
  6. -
  7. Copy this name EXACTLY (case sensitive!)
  8. -
- -

Method 2: Common Airbases

- -

Kola Peninsula (Example Map):

-
    -
  • RED: "Kilpyavr", "Severomorsk-1", "Severomorsk-3", "Murmansk International"
  • -
  • BLUE: "Luostari Pechenga", "Ivalo", "Alakurtti"
  • -
- -

Nevada:

-
    -
  • "Nellis AFB", "McCarran International", "Creech AFB", "Tonopah Test Range"
  • -
- -

Caucasus:

-
    -
  • "Batumi", "Gudauta", "Senaki-Kolkhi", "Kobuleti", "Kutaisi"
  • -
- -

Adding Multiple Squadrons

- -

You can add as many squadrons as you want. Just copy the squadron block and modify the values:

- -
RED_SQUADRON_CONFIG = {
-    -- First Squadron
-    {
-        templateName = "RED_CAP_Base1_MiG29",
-        displayName = "Base 1 CAP",
-        airbaseName = "Kilpyavr",
-        aircraft = 12,
-        skill = AI.Skill.EXCELLENT,
-        altitude = 20000,
-        speed = 350,
-        patrolTime = 30,
-        type = "FIGHTER"
-    },
-    
-    -- Second Squadron (different base)
-    {
-        templateName = "RED_CAP_Base2_SU27",
-        displayName = "Base 2 CAP",
-        airbaseName = "Severomorsk-1",
-        aircraft = 16,
-        skill = AI.Skill.ACE,
-        altitude = 25000,
-        speed = 380,
-        patrolTime = 25,
-        type = "FIGHTER"
-    },
-    
-    -- Add more squadrons here...
-}
- -
- Repeat the same process for BLUE squadrons in the BLUE_SQUADRON_CONFIG section. -
- -

Zone-Based Defense Setup

- -

Zones allow squadrons to have specific areas of responsibility, creating realistic layered defense.

- -

Why Use Zones?

- -
    -
  • Border Defense: Squadrons patrol specific sectors
  • -
  • Layered Defense: Multiple squadrons cover overlapping areas
  • -
  • Priority Response: Squadrons respond differently based on threat location
  • -
  • Realistic Behavior: Fighters don't fly across the entire map for minor threats
  • -
- -

Zone Types

- -

Each squadron can have up to 3 zone types:

- -
    -
  1. Primary Zone - Main area of responsibility (full response)
  2. -
  3. Secondary Zone - Support area (reduced response, 60% by default)
  4. -
  5. Tertiary Zone - Emergency fallback (enhanced response when squadron weakened)
  6. -
- -

Creating Zones in Mission Editor

- -

Method: Helicopter Waypoint Method

- -
    -
  1. Place a helicopter group (late activation, any type)
  2. -
  3. Name it clearly (example: "RED BORDER")
  4. -
  5. Add waypoints that outline your zone boundary
  6. -
  7. The script will automatically create a polygon zone from these waypoints
  8. -
  9. Repeat for each zone you want to create
  10. -
- -
- Example Zone Setup: -
Mission Editor:
-- Helicopter Group: "RED BORDER" with waypoints forming a polygon
-- Helicopter Group: "BLUE BORDER" with waypoints forming a polygon
-- Helicopter Group: "CONTESTED ZONE" with waypoints forming a polygon
-
- -

Configuring Zone Response

- -

Add zone configuration to your squadron:

- -
{
-    templateName = "RED_CAP_Kilpyavr_MiG29",
-    displayName = "Kilpyavr CAP",
-    airbaseName = "Kilpyavr",
-    aircraft = 12,
-    skill = AI.Skill.EXCELLENT,
-    altitude = 20000,
-    speed = 350,
-    patrolTime = 30,
-    type = "FIGHTER",
-    
-    -- Zone Configuration
-    primaryZone = "RED BORDER",                    -- Main responsibility area
-    secondaryZone = "CONTESTED ZONE",              -- Backup coverage
-    tertiaryZone = nil,                            -- No tertiary zone
-    
-    -- Optional: Customize zone behavior
-    zoneConfig = {
-        primaryResponse = 1.0,                     -- Full response in primary zone
-        secondaryResponse = 0.6,                   -- 60% response in secondary
-        tertiaryResponse = 1.4,                    -- 140% response in tertiary
-        enableFallback = false,                    -- Don't auto-switch to tertiary
-        fallbackThreshold = 0.3,                   -- Switch when <30% aircraft remain
-        secondaryLowPriorityFilter = true,         -- Ignore small threats in secondary
-        secondaryLowPriorityThreshold = 2          -- "Small threat" = 2 or fewer aircraft
-    }
-}
- -

Zone Behavior Examples

- -

Example 1: Border Defense Squadron

-
primaryZone = "RED BORDER",          -- Patrols the border
-secondaryZone = "INTERIOR",          -- Helps with interior threats if needed
-tertiaryZone = nil                   -- No fallback
- -

Example 2: Base Defense with Fallback

-
primaryZone = "NORTHERN SECTOR",     -- Main patrol area
-secondaryZone = nil,                 -- No secondary
-tertiaryZone = "BASE PERIMETER",     -- Falls back to defend base when weakened
-enableFallback = true,               -- Auto-switch to tertiary when low
-fallbackThreshold = 0.4              -- Switch at 40% strength
- -

Example 3: Layered Defense

-
-- Squadron A: Outer layer
-primaryZone = "OUTER PERIMETER"
-
--- Squadron B: Middle layer
-primaryZone = "MIDDLE PERIMETER"
-
--- Squadron C: Inner/base defense
-primaryZone = "BASE DEFENSE"
- -

Global Response (No Zones)

- -

If you DON'T want zone restrictions, simply leave all zones as nil:

- -
{
-    templateName = "RED_CAP_Base_MiG29",
-    displayName = "Global Response CAP",
-    airbaseName = "Kilpyavr",
-    aircraft = 12,
-    skill = AI.Skill.EXCELLENT,
-    altitude = 20000,
-    speed = 350,
-    patrolTime = 30,
-    type = "FIGHTER",
-    
-    -- No zones = responds to threats anywhere on the map
-    primaryZone = nil,
-    secondaryZone = nil,
-    tertiaryZone = nil
-}
- -

Cargo Replenishment System

- -

The cargo system automatically replenishes squadrons by spawning transport aircraft that fly supplies to airbases.

- -

How Cargo Works

- -
    -
  1. Monitoring: Script checks squadron aircraft counts every minute
  2. -
  3. Detection: When squadron drops below threshold (90% by default), cargo is dispatched
  4. -
  5. Spawning: Transport aircraft spawns at a supply airfield
  6. -
  7. Delivery: Flies to destination airbase and lands
  8. -
  9. Replenishment: Squadron aircraft count increases upon delivery
  10. -
  11. Cooldown: 5-minute cooldown before next delivery to same base
  12. -
- -

Cargo Aircraft Detection

- -

The system detects cargo by aircraft name patterns:

-
    -
  • CARGO
  • -
  • TRANSPORT
  • -
  • C130 or C-130
  • -
  • AN26 or AN-26
  • -
- -

Delivery Methods:

-
    -
  • Landing: Aircraft lands at destination airbase
  • -
- -

Configuring Cargo Templates

- -

Edit Moose_TADC_CargoDispatcher.lua and find CARGO_SUPPLY_CONFIG:

- -
local CARGO_SUPPLY_CONFIG = {
-    red = {
-        cargoTemplate = "CARGO_RED_AN26_TEMPLATE",         -- Template name from mission editor
-        supplyAirfields = {"Airbase1", "Airbase2"},        -- List of supply bases
-        replenishAmount = 4,                               -- Aircraft added per delivery
-        threshold = 0.90                                   -- Trigger at 90% capacity
-    },
-    blue = {
-        cargoTemplate = "CARGO_BLUE_C130_TEMPLATE",
-        supplyAirfields = {"Airbase3", "Airbase4"},
-        replenishAmount = 4,
-        threshold = 0.90
-    }
-}
- -

Creating Cargo Templates

- -

1. In Mission Editor:

-
    -
  • Place transport aircraft group (C-130, An-26, etc.)
  • -
  • Name it: CARGO_RED_AN26_TEMPLATE or CARGO_BLUE_C130_TEMPLATE
  • -
  • Set LATE ACTIVATION
  • -
  • Position at any friendly airbase (starting position doesn't matter)
  • -
- -

2. In Configuration:

-
    -
  • Use the EXACT template name in cargoTemplate field
  • -
  • List supply airbases in supplyAirfields array
  • -
  • Set how many aircraft each delivery adds (replenishAmount)
  • -
- -

Supply Airfield Strategy

- -

Choose rear/safe airbases for supplies:

- -
red = {
-    cargoTemplate = "CARGO_RED_AN26_TEMPLATE",
-    supplyAirfields = {
-        "Rear_Base_1",              -- Far from frontline, safe
-        "Rear_Base_2",              -- Alternate supply source
-        "Central_Logistics_Hub"     -- Main supply depot
-    },
-    replenishAmount = 4,
-    threshold = 0.90
-}
- -

Tips:

-
    -
  • Use 3-5 supply airbases for redundancy
  • -
  • Choose bases far from combat zones
  • -
  • Ensure supply bases are well-defended
  • -
  • Balance geographic coverage
  • -
- -

Disabling Cargo System

- -

If you don't want automated resupply:

-
    -
  1. Don't load Moose_TADC_CargoDispatcher.lua
  2. -
  3. Squadrons will operate with their initial aircraft count only
  4. -
  5. System still works perfectly for shorter missions
  6. -
- -

Testing & Troubleshooting

- -

Validation Tools

- -

The system includes built-in validation. Check the DCS log file after mission start for:

- -
-
[Universal TADC] ═══════════════════════════════════════
-[Universal TADC] Configuration Validation Results:
-[Universal TADC] ✓ All templates exist
-[Universal TADC] ✓ All airbases valid
-[Universal TADC] ✓ All zones found
-[Universal TADC] Configuration is VALID
-[Universal TADC] ═══════════════════════════════════════
-
- -

In-Game F10 Menu Commands

- -

Press F10 in-game to access TADC utilities:

- -

Available to Each Coalition:

-
    -
  • Show Squadron Resource Summary - Current aircraft counts
  • -
  • Show Airbase Status Report - Operational status of all bases
  • -
  • Show Active Interceptors - Currently airborne fighters
  • -
  • Show Threat Summary - Detected enemy aircraft
  • -
  • Broadcast Squadron Summary Now - Force immediate status update
  • -
  • Show Cargo Delivery Log - Recent supply missions
  • -
  • Show Zone Coverage Map - Squadron zone assignments
  • -
- -

Available to All (Mission Commands):

-
    -
  • Emergency Cleanup Interceptors - Remove stuck/dead groups
  • -
  • Show TADC System Status - Uptime and system health
  • -
  • Check for Stuck Aircraft - Manual stuck aircraft check
  • -
  • Show Airbase Health Status - Parking/spawn issues
  • -
- -

Common Issues & Solutions

- -

Issue: "Template not found in mission"

-
-

Cause: Template name in config doesn't match mission editor

-

Solution:

-
    -
  1. Check exact spelling and case
  2. -
  3. Ensure template is in mission editor
  4. -
  5. Verify template is a GROUP (not a unit)
  6. -
  7. Check template name in mission editor properties
  8. -
-
- -

Issue: "Airbase not found or wrong coalition"

-
-

Cause: Airbase name wrong or captured by enemy

-

Solution:

-
    -
  1. Check exact airbase spelling (case sensitive)
  2. -
  3. Verify airbase is owned by correct coalition in mission editor
  4. -
  5. Use _G.TDAC_CheckAirbase("AirbaseName") in DCS console
  6. -
-
- -

Issue: "No interceptors launching"

-
-

Check:

-
    -
  1. Are enemy aircraft detected? (F10 → Show Threat Summary)
  2. -
  3. Are squadrons operational? (F10 → Show Squadron Resource Summary)
  4. -
  5. Is airbase captured/destroyed? (F10 → Show Airbase Status Report)
  6. -
  7. Are squadrons on cooldown? (F10 → Show Squadron Resource Summary)
  8. -
  9. Check intercept ratio settings (might be too low)
  10. -
-
- -

Issue: "Cargo not delivering"

-
-

Check:

-
    -
  1. Is cargo template name correct?
  2. -
  3. Are supply airbases valid and friendly?
  4. -
  5. Is destination airbase captured/operational?
  6. -
  7. Check parking availability (F10 → Show Airbase Health Status)
  8. -
  9. Look for "Cargo delivery detected" messages in log
  10. -
-
- -

Issue: "Aircraft spawning stuck at parking"

-
-

Cause: Parking spots occupied or insufficient space

-

Solution:

-
    -
  1. Use F10 → Check for Stuck Aircraft
  2. -
  3. Use F10 → Emergency Cleanup Interceptors
  4. -
  5. Check airbase parking capacity (larger aircraft need more space)
  6. -
  7. Reduce squadron sizes if parking is limited
  8. -
-
- -

DCS Console Diagnostics

- -

Open DCS Lua console (F12 or scripting console) and run:

- -
-- Check all supply airbase ownership
-_G.TDAC_CheckAirbaseOwnership()
-
--- Check specific airbase
-_G.TDAC_CheckAirbase("Kilpyavr")
-
--- Validate dispatcher configuration
-_G.TDAC_RunConfigCheck()
-
--- Check airbase parking availability
-_G.TDAC_LogAirbaseParking("Kilpyavr")
-
--- Test cargo spawn (debugging)
-_G.TDAC_CargoDispatcher_TestSpawn("CARGO_RED_AN26_TEMPLATE", "SupplyBase", "DestinationBase")
- -

Advanced Features

- -

Intercept Ratio System

- -

The interceptRatio setting controls how many fighters launch per enemy aircraft.

- -

In Moose_TADC_Load2nd.lua:

- -
local TADC_SETTINGS = {
-    red = {
-        interceptRatio = 0.8,          -- RED launches 0.8 fighters per threat
-        maxActiveCAP = 8,              -- Max 8 groups in air simultaneously
-        defaultCooldown = 300,         -- 5-minute cooldown after engagement
-    },
-    blue = {
-        interceptRatio = 1.2,          -- BLUE launches 1.2 fighters per threat
-        maxActiveCAP = 10,             -- Max 10 groups in air simultaneously
-        defaultCooldown = 300,
-    }
-}
- -

Intercept Ratio Chart

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ratio1 Enemy4 Enemies8 EnemiesEffect
0.51 fighter2 fighters4 fightersConservative response
0.81 fighter4 fighters7 fightersBalanced (default)
1.01 fighter4 fighters8 fighters1:1 parity
1.42 fighters6 fighters12 fightersStrong response
2.02 fighters8 fighters16 fightersOverwhelming force
- -

Tactical Effects:

-
    -
  • Low (0.5-0.8): Sustainable defense, squadrons last longer
  • -
  • Medium (0.8-1.2): Balanced dogfights, realistic attrition
  • -
  • High (1.4-2.0): Strong defense, rapid squadron depletion
  • -
- -

Asymmetric Scenarios:

-
-- RED advantage
-red = { interceptRatio = 1.4 },
-blue = { interceptRatio = 0.8 }
-
--- BLUE advantage
-red = { interceptRatio = 0.8 },
-blue = { interceptRatio = 1.4 }
- -

Distance-Based Engagement

- -

Control how far squadrons will chase threats:

- -
{
-    templateName = "RED_CAP_Base_MiG29",
-    displayName = "Base Defense",
-    airbaseName = "Kilpyavr",
-    aircraft = 12,
-    -- ... other settings ...
-    
-    zoneConfig = {
-        maxEngagementRange = 50000,      -- Won't engage threats >50km from base
-        primaryResponse = 1.0,
-        secondaryResponse = 0.6
-    }
-}
- -

Cooldown System

- -

After launching interceptors, squadrons go on cooldown to prevent spam:

- -
local TADC_SETTINGS = {
-    red = {
-        defaultCooldown = 300,           -- 5 minutes between launches
-        -- ... other settings ...
-    }
-}
- -

Per-Squadron Cooldown (optional):

-
{
-    templateName = "RED_CAP_Base_MiG29",
-    cooldownOverride = 600,              -- This squadron: 10-minute cooldown
-    -- ... other settings ...
-}
- -

Aircraft Skill Levels

- -

Adjust AI difficulty per squadron:

- -
skill = AI.Skill.AVERAGE      -- Easiest, good for training
-skill = AI.Skill.GOOD         -- Below average
-skill = AI.Skill.HIGH         -- Average pilots
-skill = AI.Skill.EXCELLENT    -- Above average (recommended)
-skill = AI.Skill.ACE          -- Hardest, expert pilots
- -

Mixed Difficulty Example:

-
RED_SQUADRON_CONFIG = {
-    {
-        displayName = "Elite Squadron",
-        skill = AI.Skill.ACE,             -- Best pilots
-        aircraft = 8,
-        -- ...
-    },
-    {
-        displayName = "Regular Squadron",
-        skill = AI.Skill.GOOD,            -- Average pilots
-        aircraft = 12,
-        -- ...
-    }
-}
- -

Common Scenarios

- -

Scenario 1: Simple Border Defense

- -

Goal: RED defends northern border, BLUE defends southern border

- -
-- RED Configuration
-RED_SQUADRON_CONFIG = {
-    {
-        templateName = "RED_CAP_North_MiG29",
-        displayName = "Northern Border CAP",
-        airbaseName = "Northern_Base",
-        aircraft = 12,
-        skill = AI.Skill.EXCELLENT,
-        altitude = 20000,
-        speed = 350,
-        patrolTime = 30,
-        type = "FIGHTER",
-        primaryZone = "RED BORDER"
-    }
-}
-
--- BLUE Configuration
-BLUE_SQUADRON_CONFIG = {
-    {
-        templateName = "BLUE_CAP_South_F16",
-        displayName = "Southern Border CAP",
-        airbaseName = "Southern_Base",
-        aircraft = 12,
-        skill = AI.Skill.EXCELLENT,
-        altitude = 20000,
-        speed = 350,
-        patrolTime = 30,
-        type = "FIGHTER",
-        primaryZone = "BLUE BORDER"
-    }
-}
- -
- In Mission Editor: -
    -
  • Create zone "RED BORDER" (helicopter waypoints on northern border)
  • -
  • Create zone "BLUE BORDER" (helicopter waypoints on southern border)
  • -
-
- -

Scenario 2: Layered Defense Network

- -

Goal: Multiple squadrons covering overlapping zones with different priorities

- -
RED_SQUADRON_CONFIG = {
-    -- Outer Layer: Long-range interceptors
-    {
-        templateName = "RED_LONG_RANGE_MiG31",
-        displayName = "Long Range Interceptors",
-        airbaseName = "Forward_Base",
-        aircraft = 8,
-        skill = AI.Skill.EXCELLENT,
-        altitude = 35000,
-        speed = 450,
-        patrolTime = 20,
-        type = "FIGHTER",
-        primaryZone = "OUTER PERIMETER"
-    },
-    
-    -- Middle Layer: General defense
-    {
-        templateName = "RED_CAP_MiG29",
-        displayName = "Middle Defense CAP",
-        airbaseName = "Central_Base",
-        aircraft = 12,
-        skill = AI.Skill.EXCELLENT,
-        altitude = 25000,
-        speed = 350,
-        patrolTime = 30,
-        type = "FIGHTER",
-        primaryZone = "MIDDLE PERIMETER",
-        secondaryZone = "OUTER PERIMETER"
-    },
-    
-    -- Inner Layer: Point defense
-    {
-        templateName = "RED_BASE_DEFENSE_SU27",
-        displayName = "Base Defense",
-        airbaseName = "Main_Base",
-        aircraft = 16,
-        skill = AI.Skill.ACE,
-        altitude = 20000,
-        speed = 320,
-        patrolTime = 40,
-        type = "FIGHTER",
-        primaryZone = "BASE PERIMETER",
-        tertiaryZone = "BASE PERIMETER",
-        zoneConfig = {
-            enableFallback = true,
-            fallbackThreshold = 0.3
-        }
-    }
-}
- -

Scenario 3: Sustained Operations with Resupply

- -

Goal: Long mission with automated squadron replenishment

- -

Squadron Config:

-
RED_SQUADRON_CONFIG = {
-    {
-        templateName = "RED_CAP_Frontline_MiG29",
-        displayName = "Frontline CAP",
-        airbaseName = "Frontline_Base",
-        aircraft = 12,                    -- Will be resupplied
-        skill = AI.Skill.EXCELLENT,
-        altitude = 20000,
-        speed = 350,
-        patrolTime = 30,
-        type = "FIGHTER",
-        primaryZone = "COMBAT ZONE"
-    }
-}
- -

Cargo Config (in Moose_TADC_CargoDispatcher.lua):

-
local CARGO_SUPPLY_CONFIG = {
-    red = {
-        cargoTemplate = "CARGO_RED_AN26",
-        supplyAirfields = {
-            "Rear_Base_1",                -- Safe logistics hub
-            "Rear_Base_2",                -- Backup supply source
-            "Central_Depot"               -- Main supply depot
-        },
-        replenishAmount = 4,              -- +4 aircraft per delivery
-        threshold = 0.75                  -- Trigger at 75% (9/12 aircraft)
-    }
-}
- -

Mission Flow:

-
    -
  1. Frontline squadron intercepts threats
  2. -
  3. Squadron drops to 9 aircraft (75%)
  4. -
  5. Cargo automatically dispatched from rear base
  6. -
  7. Transport flies to frontline base
  8. -
  9. Cargo delivers, squadron back to 12 aircraft
  10. -
  11. Cycle repeats throughout mission
  12. -
- -

Scenario 4: Asymmetric Warfare

- -

Goal: RED has numerical superiority, BLUE has quality advantage

- -
-- RED: More squadrons, lower skill
-local TADC_SETTINGS = {
-    red = {
-        interceptRatio = 0.8,            -- Conservative response
-        maxActiveCAP = 12,               -- More groups allowed
-    }
-}
-
-RED_SQUADRON_CONFIG = {
-    {
-        templateName = "RED_CAP_1",
-        airbaseName = "Base_1",
-        aircraft = 16,                    -- Large squadron
-        skill = AI.Skill.GOOD,            -- Average skill
-        -- ...
-    },
-    {
-        templateName = "RED_CAP_2",
-        airbaseName = "Base_2",
-        aircraft = 16,
-        skill = AI.Skill.GOOD,
-        -- ...
-    },
-    {
-        templateName = "RED_CAP_3",
-        airbaseName = "Base_3",
-        aircraft = 16,
-        skill = AI.Skill.GOOD,
-        -- ...
-    }
-}
-
--- BLUE: Fewer squadrons, higher skill
-local TADC_SETTINGS = {
-    blue = {
-        interceptRatio = 1.2,            -- Aggressive response
-        maxActiveCAP = 8,                -- Fewer groups
-    }
-}
-
-BLUE_SQUADRON_CONFIG = {
-    {
-        templateName = "BLUE_CAP_1",
-        airbaseName = "Base_1",
-        aircraft = 10,                    -- Smaller squadron
-        skill = AI.Skill.ACE,             -- Elite pilots
-        -- ...
-    },
-    {
-        templateName = "BLUE_CAP_2",
-        airbaseName = "Base_2",
-        aircraft = 10,
-        skill = AI.Skill.ACE,
-        -- ...
-    }
-}
- -

Tips for New Mission Makers

- -

Start Simple

- -
    -
  1. First Mission: Use 1-2 squadrons per side with no zones
  2. -
  3. Second Mission: Add zone-based defense
  4. -
  5. Third Mission: Add cargo resupply system
  6. -
  7. Advanced: Multi-squadron layered defense with fallback
  8. -
- -

Realistic Aircraft Numbers

- -

Small Airbase: 6-8 aircraft per squadron
- Medium Airbase: 10-12 aircraft per squadron
- Large Airbase: 14-18 aircraft per squadron

- -

Balance across map: If RED has 40 total aircraft, BLUE should have similar unless asymmetric

- -

Performance Considerations

- -
    -
  • Limit active groups: Use maxActiveCAP to prevent FPS drops
  • -
  • Zone sizes matter: Smaller zones = less scanning overhead
  • -
  • Cargo cooldowns: Prevent cargo spam with reasonable cooldowns
  • -
  • Squadron counts: 3-5 squadrons per side is a good starting point
  • -
- -

Testing Workflow

- -
    -
  1. Create minimal setup (1 squadron each side)
  2. -
  3. Test in mission editor using "Fly Now"
  4. -
  5. Check F10 menus for squadron status
  6. -
  7. Spawn enemy aircraft to test intercepts
  8. -
  9. Review DCS.log for validation messages
  10. -
  11. Expand gradually once basic system works
  12. -
- -

Common Mistakes to Avoid

- -
    -
  • Using UNIT templates instead of GROUP templates
  • -
  • Misspelling airbase names
  • -
  • Loading scripts in wrong order
  • -
  • Setting intercept ratio too high
  • -
  • Forgetting to load MOOSE first
  • -
- -
    -
  • Use GROUP templates (late activation groups)
  • -
  • Copy exact names from mission editor
  • -
  • Squadron Config → Main TADC → Cargo Dispatcher
  • -
  • Start with 0.8-1.0, adjust after testing
  • -
  • MOOSE must be first script loaded
  • -
- -

Conclusion

- -

The Universal TADC system provides mission makers with powerful, automated air defense capabilities that create dynamic, realistic air combat scenarios. By following this guide, even new mission makers can create sophisticated missions with minimal scripting knowledge.

- -

Key Takeaways

- -
    -
  • Three scripts work together: Squadron Config → Main TADC → Cargo Dispatcher
  • -
  • Configuration is simple: Edit tables, not complex code
  • -
  • Both coalitions operate independently: Balanced or asymmetric scenarios
  • -
  • Zones enable tactical behavior: Realistic area-of-responsibility system
  • -
  • Cargo enables sustained operations: Long missions with automatic resupply
  • -
  • Built-in validation: Checks configuration before mission starts
  • -
  • F10 menus provide visibility: Monitor system status in real-time
  • -
- -

Getting Help

- -

If you encounter issues:

- -
    -
  1. Check DCS.log for validation errors
  2. -
  3. Use F10 menu diagnostics
  4. -
  5. Run console commands for detailed info
  6. -
  7. Review this guide's troubleshooting section
  8. -
  9. Start simple and expand gradually
  10. -
- -

Next Steps

- -
    -
  1. Set up your first squadron (1 RED, 1 BLUE)
  2. -
  3. Test basic intercept behavior
  4. -
  5. Add zones for tactical depth
  6. -
  7. Implement cargo resupply for long missions
  8. -
  9. Experiment with advanced features
  10. -
- -

Happy mission making! 🚁✈️

- - -
- - \ No newline at end of file diff --git a/Moose_TADC/TADC_SYSTEM_GUIDE.md b/Moose_TADC/TADC_SYSTEM_GUIDE.md deleted file mode 100644 index 70bf452..0000000 --- a/Moose_TADC/TADC_SYSTEM_GUIDE.md +++ /dev/null @@ -1,965 +0,0 @@ -# Universal TADC System - Mission Maker's Guide -## Tactical Air Defense Controller with Automated Logistics - ---- - -## 📋 Table of Contents - -1. [What is TADC?](#what-is-tadc) -2. [System Overview](#system-overview) -3. [Quick Start Guide](#quick-start-guide) -4. [Detailed Configuration](#detailed-configuration) -5. [Zone-Based Defense Setup](#zone-based-defense-setup) -6. [Cargo Replenishment System](#cargo-replenishment-system) -7. [Testing & Troubleshooting](#testing--troubleshooting) -8. [Advanced Features](#advanced-features) -9. [Common Scenarios](#common-scenarios) - ---- - -## What is TADC? - -**TADC (Tactical Air Defense Controller)** is an automated air defense system for DCS missions that creates realistic, dynamic fighter aircraft responses to airborne threats. Think of it as an AI commander that: - -- **Detects enemy aircraft** automatically -- **Launches fighters** to intercept threats -- **Manages squadron resources** (aircraft availability, cooldowns) -- **Replenishes squadrons** through cargo aircraft deliveries -- **Operates independently** for both RED and BLUE coalitions - -### Why Use TADC? - -✅ **Realistic Air Defense** - Squadrons respond intelligently to threats -✅ **Dynamic Gameplay** - Air battles happen organically without manual triggers -✅ **Balanced Competition** - Both sides operate with equal capabilities -✅ **Sustainable Operations** - Cargo system allows long missions with resupply -✅ **Easy Configuration** - Simple tables instead of complex scripting - ---- - -## System Overview - -The TADC system consists of **three main scripts** that work together: - -### 1. Squadron Configuration (`Moose_TADC_SquadronConfigs_Load1st.lua`) -**Purpose:** Define all fighter squadrons for RED and BLUE coalitions -**Contains:** Aircraft templates, airbases, patrol parameters, zone assignments -**Load Order:** **FIRST** (must load before main TADC script) - -### 2. Main TADC System (`Moose_TADC_Load2nd.lua`) -**Purpose:** Core threat detection and interceptor management -**Contains:** Threat scanning, squadron selection, intercept logic, F10 menus -**Load Order:** **SECOND** (after squadron config) - -### 3. Cargo Dispatcher (`Moose_TADC_CargoDispatcher.lua`) -**Purpose:** Automated squadron resupply through cargo aircraft -**Contains:** Squadron monitoring, cargo spawning, delivery tracking -**Load Order:** **THIRD** (optional, only if using resupply system) - ---- - -## Quick Start Guide - -### Prerequisites - -Before setting up TADC, you need: - -- ✅ **MOOSE Framework** loaded in your mission (download from [MOOSE GitHub](https://github.com/FlightControl-Master/MOOSE)) -- ✅ **Fighter aircraft templates** created in DCS mission editor (as GROUPS, not units) -- ✅ **Airbases** under correct coalition control -- ✅ (Optional) **Cargo aircraft templates** for resupply missions - -### 5-Minute Setup - -#### Step 1: Create Fighter Templates - -1. Open your mission in DCS Mission Editor -2. Place fighter aircraft as **LATE ACTIVATION GROUPS** (not individual units) -3. Name them clearly (example: `RED_CAP_Kilpyavr_MiG29`) -4. Position them at or near the airbases they'll operate from -5. Set them to the correct coalition (RED or BLUE) - -**Important:** Use GROUP templates, not UNIT templates! - -#### Step 2: Load MOOSE Framework - -1. In mission editor, go to **Triggers** -2. Create a new trigger: **MISSION START** -3. Add action: **DO SCRIPT FILE** -4. Select your MOOSE.lua file -5. This must be the FIRST script loaded - -#### Step 3: Load Squadron Configuration - -1. Create another **DO SCRIPT FILE** action (after MOOSE) -2. Select `Moose_TADC_SquadronConfigs_Load1st.lua` -3. Edit the file to configure your squadrons (see below) - -#### Step 4: Load Main TADC System - -1. Create another **DO SCRIPT FILE** action -2. Select `Moose_TADC_Load2nd.lua` -3. (Optional) Adjust settings in the file if needed - -#### Step 5: (Optional) Load Cargo Dispatcher - -1. If using resupply system, create another **DO SCRIPT FILE** action -2. Select `Moose_TADC_CargoDispatcher.lua` - -**Load Order in Mission Editor:** -``` -1. MOOSE.lua -2. Moose_TADC_SquadronConfigs_Load1st.lua -3. Moose_TADC_Load2nd.lua -4. Moose_TADC_CargoDispatcher.lua (optional) -``` - ---- - -## Detailed Configuration - -### Squadron Configuration Explained - -Open `Moose_TADC_SquadronConfigs_Load1st.lua` and find the squadron configuration sections. - -#### Basic Squadron Example - -```lua -{ - templateName = "RED_CAP_Kilpyavr_MiG29", -- Must match mission editor template name - displayName = "Kilpyavr CAP MiG-29A", -- Human-readable name for logs/messages - airbaseName = "Kilpyavr", -- Exact airbase name from DCS - aircraft = 12, -- Maximum aircraft in squadron - skill = AI.Skill.EXCELLENT, -- AI pilot skill level - altitude = 20000, -- Patrol altitude (feet) - speed = 350, -- Patrol speed (knots) - patrolTime = 30, -- Time on station (minutes) - type = "FIGHTER" -- Aircraft role -} -``` - -#### Parameter Guide - -| Parameter | Description | Example Values | -|-----------|-------------|----------------| -| **templateName** | Group name from mission editor (EXACT match) | `"RED_CAP_Base_F15"` | -| **displayName** | Friendly name shown in messages | `"Kilpyavr CAP Squadron"` | -| **airbaseName** | DCS airbase name (case sensitive) | `"Kilpyavr"`, `"Nellis AFB"` | -| **aircraft** | Max squadron size | `8`, `12`, `16` | -| **skill** | AI difficulty | `AI.Skill.AVERAGE`, `GOOD`, `HIGH`, `EXCELLENT`, `ACE` | -| **altitude** | CAP patrol altitude | `15000` (feet) | -| **speed** | CAP patrol speed | `300` (knots) | -| **patrolTime** | Minutes on station before RTB | `20`, `30`, `40` | -| **type** | Aircraft role | `"FIGHTER"` | - -### Finding Airbase Names - -**Method 1: Mission Editor** -1. Open mission editor -2. Click on any airbase -3. The exact name appears in the properties panel -4. Copy this name EXACTLY (case sensitive!) - -**Method 2: Common Airbases** - -**Kola Peninsula (Example Map):** -- RED: `"Kilpyavr"`, `"Severomorsk-1"`, `"Severomorsk-3"`, `"Murmansk International"` -- BLUE: `"Luostari Pechenga"`, `"Ivalo"`, `"Alakurtti"` - -**Nevada:** -- `"Nellis AFB"`, `"McCarran International"`, `"Creech AFB"`, `"Tonopah Test Range"` - -**Caucasus:** -- `"Batumi"`, `"Gudauta"`, `"Senaki-Kolkhi"`, `"Kobuleti"`, `"Kutaisi"` - -### Adding Multiple Squadrons - -You can add as many squadrons as you want. Just copy the squadron block and modify the values: - -```lua -RED_SQUADRON_CONFIG = { - -- First Squadron - { - templateName = "RED_CAP_Base1_MiG29", - displayName = "Base 1 CAP", - airbaseName = "Kilpyavr", - aircraft = 12, - skill = AI.Skill.EXCELLENT, - altitude = 20000, - speed = 350, - patrolTime = 30, - type = "FIGHTER" - }, - - -- Second Squadron (different base) - { - templateName = "RED_CAP_Base2_SU27", - displayName = "Base 2 CAP", - airbaseName = "Severomorsk-1", - aircraft = 16, - skill = AI.Skill.ACE, - altitude = 25000, - speed = 380, - patrolTime = 25, - type = "FIGHTER" - }, - - -- Add more squadrons here... -} -``` - -**Repeat the same process for BLUE squadrons** in the `BLUE_SQUADRON_CONFIG` section. - ---- - -## Zone-Based Defense Setup - -Zones allow squadrons to have specific areas of responsibility, creating realistic layered defense. - -### Why Use Zones? - -- **Border Defense:** Squadrons patrol specific sectors -- **Layered Defense:** Multiple squadrons cover overlapping areas -- **Priority Response:** Squadrons respond differently based on threat location -- **Realistic Behavior:** Fighters don't fly across the entire map for minor threats - -### Zone Types - -Each squadron can have up to 3 zone types: - -1. **Primary Zone** - Main area of responsibility (full response) -2. **Secondary Zone** - Support area (reduced response, 60% by default) -3. **Tertiary Zone** - Emergency fallback (enhanced response when squadron weakened) - -### Creating Zones in Mission Editor - -**Method: Helicopter Waypoint Method** - -1. Place a **helicopter group** (late activation, any type) -2. Name it clearly (example: `"RED BORDER"`) -3. Add waypoints that outline your zone boundary -4. The script will automatically create a polygon zone from these waypoints -5. Repeat for each zone you want to create - -**Example Zone Setup:** -``` -Mission Editor: -- Helicopter Group: "RED BORDER" with waypoints forming a polygon -- Helicopter Group: "BLUE BORDER" with waypoints forming a polygon -- Helicopter Group: "CONTESTED ZONE" with waypoints forming a polygon -``` - -### Configuring Zone Response - -Add zone configuration to your squadron: - -```lua -{ - templateName = "RED_CAP_Kilpyavr_MiG29", - displayName = "Kilpyavr CAP", - airbaseName = "Kilpyavr", - aircraft = 12, - skill = AI.Skill.EXCELLENT, - altitude = 20000, - speed = 350, - patrolTime = 30, - type = "FIGHTER", - - -- Zone Configuration - primaryZone = "RED BORDER", -- Main responsibility area - secondaryZone = "CONTESTED ZONE", -- Backup coverage - tertiaryZone = nil, -- No tertiary zone - - -- Optional: Customize zone behavior - zoneConfig = { - primaryResponse = 1.0, -- Full response in primary zone - secondaryResponse = 0.6, -- 60% response in secondary - tertiaryResponse = 1.4, -- 140% response in tertiary - enableFallback = false, -- Don't auto-switch to tertiary - fallbackThreshold = 0.3, -- Switch when <30% aircraft remain - secondaryLowPriorityFilter = true, -- Ignore small threats in secondary - secondaryLowPriorityThreshold = 2 -- "Small threat" = 2 or fewer aircraft - } -} -``` - -### Zone Behavior Examples - -**Example 1: Border Defense Squadron** -```lua -primaryZone = "RED BORDER", -- Patrols the border -secondaryZone = "INTERIOR", -- Helps with interior threats if needed -tertiaryZone = nil -- No fallback -``` - -**Example 2: Base Defense with Fallback** -```lua -primaryZone = "NORTHERN SECTOR", -- Main patrol area -secondaryZone = nil, -- No secondary -tertiaryZone = "BASE PERIMETER", -- Falls back to defend base when weakened -enableFallback = true, -- Auto-switch to tertiary when low -fallbackThreshold = 0.4 -- Switch at 40% strength -``` - -**Example 3: Layered Defense** -```lua --- Squadron A: Outer layer -primaryZone = "OUTER PERIMETER" - --- Squadron B: Middle layer -primaryZone = "MIDDLE PERIMETER" - --- Squadron C: Inner/base defense -primaryZone = "BASE DEFENSE" -``` - -### Global Response (No Zones) - -If you **DON'T** want zone restrictions, simply leave all zones as `nil`: - -```lua -{ - templateName = "RED_CAP_Base_MiG29", - displayName = "Global Response CAP", - airbaseName = "Kilpyavr", - aircraft = 12, - skill = AI.Skill.EXCELLENT, - altitude = 20000, - speed = 350, - patrolTime = 30, - type = "FIGHTER", - - -- No zones = responds to threats anywhere on the map - primaryZone = nil, - secondaryZone = nil, - tertiaryZone = nil -} -``` - ---- - -## Cargo Replenishment System - -The cargo system automatically replenishes squadrons by spawning transport aircraft that fly supplies to airbases. - -### How Cargo Works - -1. **Monitoring:** Script checks squadron aircraft counts every minute -2. **Detection:** When squadron drops below threshold (90% by default), cargo is dispatched -3. **Spawning:** Transport aircraft spawns at a supply airfield -4. **Delivery:** Flies to destination airbase and lands -5. **Replenishment:** Squadron aircraft count increases upon delivery -6. **Cooldown:** 5-minute cooldown before next delivery to same base - -### Cargo Aircraft Detection - -The system detects cargo by aircraft name patterns: -- `CARGO` -- `TRANSPORT` -- `C130` or `C-130` -- `AN26` or `AN-26` - -**Delivery Methods:** -- **Landing:** Aircraft lands at destination airbase - -### Configuring Cargo Templates - -Edit `Moose_TADC_CargoDispatcher.lua` and find `CARGO_SUPPLY_CONFIG`: - -```lua -local CARGO_SUPPLY_CONFIG = { - red = { - cargoTemplate = "CARGO_RED_AN26_TEMPLATE", -- Template name from mission editor - supplyAirfields = {"Airbase1", "Airbase2"}, -- List of supply bases - replenishAmount = 4, -- Aircraft added per delivery - threshold = 0.90 -- Trigger at 90% capacity - }, - blue = { - cargoTemplate = "CARGO_BLUE_C130_TEMPLATE", - supplyAirfields = {"Airbase3", "Airbase4"}, - replenishAmount = 4, - threshold = 0.90 - } -} -``` - -### Creating Cargo Templates - -1. **In Mission Editor:** - - Place transport aircraft group (C-130, An-26, etc.) - - Name it: `CARGO_RED_AN26_TEMPLATE` or `CARGO_BLUE_C130_TEMPLATE` - - Set **LATE ACTIVATION** - - Position at any friendly airbase (starting position doesn't matter) - -2. **In Configuration:** - - Use the EXACT template name in `cargoTemplate` field - - List supply airbases in `supplyAirfields` array - - Set how many aircraft each delivery adds (`replenishAmount`) - -### Supply Airfield Strategy - -**Choose rear/safe airbases for supplies:** - -```lua -red = { - cargoTemplate = "CARGO_RED_AN26_TEMPLATE", - supplyAirfields = { - "Rear_Base_1", -- Far from frontline, safe - "Rear_Base_2", -- Alternate supply source - "Central_Logistics_Hub" -- Main supply depot - }, - replenishAmount = 4, - threshold = 0.90 -} -``` - -**Tips:** -- Use 3-5 supply airbases for redundancy -- Choose bases far from combat zones -- Ensure supply bases are well-defended -- Balance geographic coverage - -### Disabling Cargo System - -If you don't want automated resupply: -1. **Don't load** `Moose_TADC_CargoDispatcher.lua` -2. Squadrons will operate with their initial aircraft count only -3. System still works perfectly for shorter missions - ---- - -## Testing & Troubleshooting - -### Validation Tools - -The system includes built-in validation. Check the DCS log file after mission start for: - -``` -[Universal TADC] ═══════════════════════════════════════ -[Universal TADC] Configuration Validation Results: -[Universal TADC] ✓ All templates exist -[Universal TADC] ✓ All airbases valid -[Universal TADC] ✓ All zones found -[Universal TADC] Configuration is VALID -[Universal TADC] ═══════════════════════════════════════ -``` - -### In-Game F10 Menu Commands - -Press **F10** in-game to access TADC utilities: - -**Available to Each Coalition:** -- **Show Squadron Resource Summary** - Current aircraft counts -- **Show Airbase Status Report** - Operational status of all bases -- **Show Active Interceptors** - Currently airborne fighters -- **Show Threat Summary** - Detected enemy aircraft -- **Broadcast Squadron Summary Now** - Force immediate status update -- **Show Cargo Delivery Log** - Recent supply missions -- **Show Zone Coverage Map** - Squadron zone assignments - -**Available to All (Mission Commands):** -- **Emergency Cleanup Interceptors** - Remove stuck/dead groups -- **Show TADC System Status** - Uptime and system health -- **Check for Stuck Aircraft** - Manual stuck aircraft check -- **Show Airbase Health Status** - Parking/spawn issues - -### Common Issues & Solutions - -#### Issue: "Template not found in mission" - -**Cause:** Template name in config doesn't match mission editor -**Solution:** -1. Check exact spelling and case -2. Ensure template is in mission editor -3. Verify template is a GROUP (not a unit) -4. Check template name in mission editor properties - -#### Issue: "Airbase not found or wrong coalition" - -**Cause:** Airbase name wrong or captured by enemy -**Solution:** -1. Check exact airbase spelling (case sensitive) -2. Verify airbase is owned by correct coalition in mission editor -3. Use `_G.TDAC_CheckAirbase("AirbaseName")` in DCS console - -#### Issue: "No interceptors launching" - -**Check:** -1. Are enemy aircraft detected? (F10 → Show Threat Summary) -2. Are squadrons operational? (F10 → Show Squadron Resource Summary) -3. Is airbase captured/destroyed? (F10 → Show Airbase Status Report) -4. Are squadrons on cooldown? (F10 → Show Squadron Resource Summary) -5. Check intercept ratio settings (might be too low) - -#### Issue: "Cargo not delivering" - -**Check:** -1. Is cargo template name correct? -2. Are supply airbases valid and friendly? -3. Is destination airbase captured/operational? -4. Check parking availability (F10 → Show Airbase Health Status) -5. Look for "Cargo delivery detected" messages in log - -#### Issue: "Aircraft spawning stuck at parking" - -**Cause:** Parking spots occupied or insufficient space -**Solution:** -1. Use F10 → Check for Stuck Aircraft -2. Use F10 → Emergency Cleanup Interceptors -3. Check airbase parking capacity (larger aircraft need more space) -4. Reduce squadron sizes if parking is limited - -### DCS Console Diagnostics - -Open DCS Lua console (**F12** or scripting console) and run: - -```lua --- Check all supply airbase ownership -_G.TDAC_CheckAirbaseOwnership() - --- Check specific airbase -_G.TDAC_CheckAirbase("Kilpyavr") - --- Validate dispatcher configuration -_G.TDAC_RunConfigCheck() - --- Check airbase parking availability -_G.TDAC_LogAirbaseParking("Kilpyavr") - --- Test cargo spawn (debugging) -_G.TDAC_CargoDispatcher_TestSpawn("CARGO_RED_AN26_TEMPLATE", "SupplyBase", "DestinationBase") -``` - ---- - -## Advanced Features - -### Intercept Ratio System - -The `interceptRatio` setting controls how many fighters launch per enemy aircraft. - -**In `Moose_TADC_Load2nd.lua`:** - -```lua -local TADC_SETTINGS = { - red = { - interceptRatio = 0.8, -- RED launches 0.8 fighters per threat - maxActiveCAP = 8, -- Max 8 groups in air simultaneously - defaultCooldown = 300, -- 5-minute cooldown after engagement - }, - blue = { - interceptRatio = 1.2, -- BLUE launches 1.2 fighters per threat - maxActiveCAP = 10, -- Max 10 groups in air simultaneously - defaultCooldown = 300, - } -} -``` - -**Intercept Ratio Chart:** - -| Ratio | 1 Enemy | 4 Enemies | 8 Enemies | Effect | -|-------|---------|-----------|-----------|--------| -| 0.5 | 1 fighter | 2 fighters | 4 fighters | Conservative response | -| 0.8 | 1 fighter | 4 fighters | 7 fighters | **Balanced (default)** | -| 1.0 | 1 fighter | 4 fighters | 8 fighters | 1:1 parity | -| 1.4 | 2 fighters | 6 fighters | 12 fighters | Strong response | -| 2.0 | 2 fighters | 8 fighters | 16 fighters | Overwhelming force | - -**Tactical Effects:** -- **Low (0.5-0.8):** Sustainable defense, squadrons last longer -- **Medium (0.8-1.2):** Balanced dogfights, realistic attrition -- **High (1.4-2.0):** Strong defense, rapid squadron depletion - -**Asymmetric Scenarios:** -```lua --- RED advantage -red = { interceptRatio = 1.4 }, -blue = { interceptRatio = 0.8 } - --- BLUE advantage -red = { interceptRatio = 0.8 }, -blue = { interceptRatio = 1.4 } -``` - -### Distance-Based Engagement - -Control how far squadrons will chase threats: - -```lua -{ - templateName = "RED_CAP_Base_MiG29", - displayName = "Base Defense", - airbaseName = "Kilpyavr", - aircraft = 12, - -- ... other settings ... - - zoneConfig = { - maxEngagementRange = 50000, -- Won't engage threats >50km from base - primaryResponse = 1.0, - secondaryResponse = 0.6 - } -} -``` - -### Cooldown System - -After launching interceptors, squadrons go on cooldown to prevent spam: - -```lua -local TADC_SETTINGS = { - red = { - defaultCooldown = 300, -- 5 minutes between launches - -- ... other settings ... - } -} -``` - -**Per-Squadron Cooldown (optional):** -```lua -{ - templateName = "RED_CAP_Base_MiG29", - cooldownOverride = 600, -- This squadron: 10-minute cooldown - -- ... other settings ... -} -``` - -### Aircraft Skill Levels - -Adjust AI difficulty per squadron: - -```lua -skill = AI.Skill.AVERAGE -- Easiest, good for training -skill = AI.Skill.GOOD -- Below average -skill = AI.Skill.HIGH -- Average pilots -skill = AI.Skill.EXCELLENT -- Above average (recommended) -skill = AI.Skill.ACE -- Hardest, expert pilots -``` - -**Mixed Difficulty Example:** -```lua -RED_SQUADRON_CONFIG = { - { - displayName = "Elite Squadron", - skill = AI.Skill.ACE, -- Best pilots - aircraft = 8, - -- ... - }, - { - displayName = "Regular Squadron", - skill = AI.Skill.GOOD, -- Average pilots - aircraft = 12, - -- ... - } -} -``` - ---- - -## Common Scenarios - -### Scenario 1: Simple Border Defense - -**Goal:** RED defends northern border, BLUE defends southern border - -```lua --- RED Configuration -RED_SQUADRON_CONFIG = { - { - templateName = "RED_CAP_North_MiG29", - displayName = "Northern Border CAP", - airbaseName = "Northern_Base", - aircraft = 12, - skill = AI.Skill.EXCELLENT, - altitude = 20000, - speed = 350, - patrolTime = 30, - type = "FIGHTER", - primaryZone = "RED BORDER" - } -} - --- BLUE Configuration -BLUE_SQUADRON_CONFIG = { - { - templateName = "BLUE_CAP_South_F16", - displayName = "Southern Border CAP", - airbaseName = "Southern_Base", - aircraft = 12, - skill = AI.Skill.EXCELLENT, - altitude = 20000, - speed = 350, - patrolTime = 30, - type = "FIGHTER", - primaryZone = "BLUE BORDER" - } -} -``` - -**In Mission Editor:** -- Create zone "RED BORDER" (helicopter waypoints on northern border) -- Create zone "BLUE BORDER" (helicopter waypoints on southern border) - ---- - -### Scenario 2: Layered Defense Network - -**Goal:** Multiple squadrons covering overlapping zones with different priorities - -```lua -RED_SQUADRON_CONFIG = { - -- Outer Layer: Long-range interceptors - { - templateName = "RED_LONG_RANGE_MiG31", - displayName = "Long Range Interceptors", - airbaseName = "Forward_Base", - aircraft = 8, - skill = AI.Skill.EXCELLENT, - altitude = 35000, - speed = 450, - patrolTime = 20, - type = "FIGHTER", - primaryZone = "OUTER PERIMETER" - }, - - -- Middle Layer: General defense - { - templateName = "RED_CAP_MiG29", - displayName = "Middle Defense CAP", - airbaseName = "Central_Base", - aircraft = 12, - skill = AI.Skill.EXCELLENT, - altitude = 25000, - speed = 350, - patrolTime = 30, - type = "FIGHTER", - primaryZone = "MIDDLE PERIMETER", - secondaryZone = "OUTER PERIMETER" - }, - - -- Inner Layer: Point defense - { - templateName = "RED_BASE_DEFENSE_SU27", - displayName = "Base Defense", - airbaseName = "Main_Base", - aircraft = 16, - skill = AI.Skill.ACE, - altitude = 20000, - speed = 320, - patrolTime = 40, - type = "FIGHTER", - primaryZone = "BASE PERIMETER", - tertiaryZone = "BASE PERIMETER", - zoneConfig = { - enableFallback = true, - fallbackThreshold = 0.3 - } - } -} -``` - ---- - -### Scenario 3: Sustained Operations with Resupply - -**Goal:** Long mission with automated squadron replenishment - -**Squadron Config:** -```lua -RED_SQUADRON_CONFIG = { - { - templateName = "RED_CAP_Frontline_MiG29", - displayName = "Frontline CAP", - airbaseName = "Frontline_Base", - aircraft = 12, -- Will be resupplied - skill = AI.Skill.EXCELLENT, - altitude = 20000, - speed = 350, - patrolTime = 30, - type = "FIGHTER", - primaryZone = "COMBAT ZONE" - } -} -``` - -**Cargo Config** (in `Moose_TADC_CargoDispatcher.lua`): -```lua -local CARGO_SUPPLY_CONFIG = { - red = { - cargoTemplate = "CARGO_RED_AN26", - supplyAirfields = { - "Rear_Base_1", -- Safe logistics hub - "Rear_Base_2", -- Backup supply source - "Central_Depot" -- Main supply depot - }, - replenishAmount = 4, -- +4 aircraft per delivery - threshold = 0.75 -- Trigger at 75% (9/12 aircraft) - } -} -``` - -**Mission Flow:** -1. Frontline squadron intercepts threats -2. Squadron drops to 9 aircraft (75%) -3. Cargo automatically dispatched from rear base -4. Transport flies to frontline base -5. Cargo delivers, squadron back to 12 aircraft -6. Cycle repeats throughout mission - ---- - -### Scenario 4: Asymmetric Warfare - -**Goal:** RED has numerical superiority, BLUE has quality advantage - -```lua --- RED: More squadrons, lower skill -local TADC_SETTINGS = { - red = { - interceptRatio = 0.8, -- Conservative response - maxActiveCAP = 12, -- More groups allowed - } -} - -RED_SQUADRON_CONFIG = { - { - templateName = "RED_CAP_1", - airbaseName = "Base_1", - aircraft = 16, -- Large squadron - skill = AI.Skill.GOOD, -- Average skill - -- ... - }, - { - templateName = "RED_CAP_2", - airbaseName = "Base_2", - aircraft = 16, - skill = AI.Skill.GOOD, - -- ... - }, - { - templateName = "RED_CAP_3", - airbaseName = "Base_3", - aircraft = 16, - skill = AI.Skill.GOOD, - -- ... - } -} - --- BLUE: Fewer squadrons, higher skill -local TADC_SETTINGS = { - blue = { - interceptRatio = 1.2, -- Aggressive response - maxActiveCAP = 8, -- Fewer groups - } -} - -BLUE_SQUADRON_CONFIG = { - { - templateName = "BLUE_CAP_1", - airbaseName = "Base_1", - aircraft = 10, -- Smaller squadron - skill = AI.Skill.ACE, -- Elite pilots - -- ... - }, - { - templateName = "BLUE_CAP_2", - airbaseName = "Base_2", - aircraft = 10, - skill = AI.Skill.ACE, - -- ... - } -} -``` - ---- - -## Tips for New Mission Makers - -### Start Simple - -1. **First Mission:** Use 1-2 squadrons per side with no zones -2. **Second Mission:** Add zone-based defense -3. **Third Mission:** Add cargo resupply system -4. **Advanced:** Multi-squadron layered defense with fallback - -### Realistic Aircraft Numbers - -**Small Airbase:** 6-8 aircraft per squadron -**Medium Airbase:** 10-12 aircraft per squadron -**Large Airbase:** 14-18 aircraft per squadron - -**Balance across map:** If RED has 40 total aircraft, BLUE should have similar unless asymmetric - -### Performance Considerations - -- **Limit active groups:** Use `maxActiveCAP` to prevent FPS drops -- **Zone sizes matter:** Smaller zones = less scanning overhead -- **Cargo cooldowns:** Prevent cargo spam with reasonable cooldowns -- **Squadron counts:** 3-5 squadrons per side is a good starting point - -### Testing Workflow - -1. **Create minimal setup** (1 squadron each side) -2. **Test in mission editor** using "Fly Now" -3. **Check F10 menus** for squadron status -4. **Spawn enemy aircraft** to test intercepts -5. **Review DCS.log** for validation messages -6. **Expand gradually** once basic system works - -### Common Mistakes to Avoid - -❌ **Using UNIT templates instead of GROUP templates** -✅ Use GROUP templates (late activation groups) - -❌ **Misspelling airbase names** -✅ Copy exact names from mission editor - -❌ **Loading scripts in wrong order** -✅ Squadron Config → Main TADC → Cargo Dispatcher - -❌ **Setting intercept ratio too high** -✅ Start with 0.8-1.0, adjust after testing - -❌ **Forgetting to load MOOSE first** -✅ MOOSE must be first script loaded - ---- - -## Conclusion - -The Universal TADC system provides mission makers with powerful, automated air defense capabilities that create dynamic, realistic air combat scenarios. By following this guide, even new mission makers can create sophisticated missions with minimal scripting knowledge. - -### Key Takeaways - -✅ **Three scripts work together:** Squadron Config → Main TADC → Cargo Dispatcher -✅ **Configuration is simple:** Edit tables, not complex code -✅ **Both coalitions operate independently:** Balanced or asymmetric scenarios -✅ **Zones enable tactical behavior:** Realistic area-of-responsibility system -✅ **Cargo enables sustained operations:** Long missions with automatic resupply -✅ **Built-in validation:** Checks configuration before mission starts -✅ **F10 menus provide visibility:** Monitor system status in real-time - -### Getting Help - -If you encounter issues: - -1. Check DCS.log for validation errors -2. Use F10 menu diagnostics -3. Run console commands for detailed info -4. Review this guide's troubleshooting section -5. Start simple and expand gradually - -### Next Steps - -1. Set up your first squadron (1 RED, 1 BLUE) -2. Test basic intercept behavior -3. Add zones for tactical depth -4. Implement cargo resupply for long missions -5. Experiment with advanced features - -Happy mission making! 🚁✈️ - ---- -*Author: F99th-TracerFacer -*Document Version: 1.0* -*Last Updated: October 2025* -*Compatible with: MOOSE Framework & DCS World* diff --git a/Moose_Tanker/Moose_Tanker.lua b/Moose_Tanker/Moose_Tanker.lua deleted file mode 100644 index 85baf7f..0000000 --- a/Moose_Tanker/Moose_Tanker.lua +++ /dev/null @@ -1,2493 +0,0 @@ --- ============================================================================ --- MOOSE TANKER MANAGEMENT SYSTEM --- Comprehensive tanker lifecycle management with auto-respawn, fuel monitoring, --- TACAN/frequency announcements, and menu controls --- ============================================================================ - --- ============================================================================ --- USER CONFIGURATION --- ============================================================================ - --- Tanker Configuration -local TANKER_CONFIG = { - KC135 = { - groupName = "TANKER 135", - unitName = "TANKER 135-1", - displayName = "TANKER KC-135", - aircraftType = "KC-135", -- DCS aircraft type name - livery = nil, -- nil for default, or livery_id string - callsign = "SHELL", -- Map marker prefix for custom routes - tacan = "50X", -- Set to match ME or nil if none - frequency = "251.000", -- Set to match ME or nil if none - respawnDelay = 180, -- seconds before auto-respawn after destruction - emergencyRespawnDelay = 60, -- Emergency spawn delay - fuelWarningPercent = 25, -- Warn when fuel drops below this % - fuelBingoPercent = 15, -- RTB fuel level - defaultAltitude = 22000, -- Default altitude in feet (FL220) - defaultSpeed = 330, -- Default speed in knots - }, - KC135_MPRS = { - groupName = "TANKER 135 MPRS", - unitName = "TANKER 135 MPRS-1", - displayName = "TANKER KC-135 MPRS", - aircraftType = "KC135MPRS", -- DCS aircraft type name - livery = nil, - callsign = "ARCO", -- Map marker prefix for custom routes - tacan = "51X", - frequency = "252.000", - respawnDelay = 180, - emergencyRespawnDelay = 60, - fuelWarningPercent = 25, - fuelBingoPercent = 15, - defaultAltitude = 22000, - defaultSpeed = 330, - } -} - --- Custom Route Configuration -local ROUTE_CONFIG = { - minWaypoints = 2, -- Minimum waypoints required - maxWaypoints = 10, -- Maximum waypoints allowed - deleteMarkersAfterUse = true, -- Delete markers after route creation - waypointPrefix = { -- Recognized marker prefixes - SHELL = "KC135", -- SHELL1, SHELL2, etc. → KC-135 - ARCO = "KC135_MPRS", -- ARCO1, ARCO2, etc. → KC-135 MPRS - } -} - --- Monitoring Configuration -local FUEL_CHECK_INTERVAL = 60 -- Check fuel every 60 seconds -local DAMAGE_RTB_THRESHOLD = 50 -- RTB if hull damage exceeds this % - --- Default Spawn Location (for non-custom route spawns) --- Note: Using lat/lon with SetAltitude to ensure proper altitude MSL -local DEFAULT_SPAWN_COORD = COORDINATE:NewFromLLDD(34.564, 69.212):SetAltitude(22000 * 0.3048, true) -- Kabul area, FL220 - --- ============================================================================ --- GLOBAL STATE TRACKING --- ============================================================================ - -TANKER_STATE = { - KC135 = { - active = false, - group = nil, - fuelWarned = false, - bingoWarned = false, - respawnScheduler = nil, - fuelMonitor = nil, - }, - KC135_MPRS = { - active = false, - group = nil, - fuelWarned = false, - bingoWarned = false, - respawnScheduler = nil, - fuelMonitor = nil, - } -} - --- ============================================================================ --- MENU REFERENCES (for enable/disable) --- ============================================================================ - -local MENU_TANKER_ROOT = nil -local MENU_KC135_LAUNCH = nil -local MENU_KC135_MPRS_LAUNCH = nil - --- ============================================================================ --- MESSAGE POOLS FOR VARIETY --- Randomized messages provide immersive variety across tanker operations. --- Each category contains 100 variations selected randomly via GetRandomMessage() --- ============================================================================ - -local TANKER_MESSAGES = { - -- Spawn Confirmation (success) - SPAWN_SUCCESS = { - "%s is airborne and ready for refueling operations.", - "%s has launched and is standing by for fuel.", - "%s is now on station and ready to pump gas.", - "%s has departed and is available for refueling.", - "%s is up and ready to service aircraft.", - "%s is airborne. Refueling services now available.", - "%s has checked in on station.", - "%s is overhead and ready for business.", - "%s is now available for aerial refueling.", - "%s has arrived on station. Ready to refuel.", - "%s is up! Time to get your drink on.", - "%s has joined the party. Bring your cups!", - "%s reporting. The bar is now open.", - "%s is flying. Get in line for your juice.", - "%s on station. Don't be shy, we got plenty.", - "%s airborne. Unlike Mo's last attempt at flying.", - "%s has successfully launched. No thanks to Mo.", - "%s is ready. Mo said he could do this but we know better.", - "%s in position. Fuel truck of the sky is open for business!", - "%s has arrived fashionably late but ready to pump.", - "%s checking in. Your gas station with wings is here.", - "%s is up there doing tanker things.", - "%s launched without hitting anything. Good start!", - "%s airborne and hasn't broken anything yet.", - "%s is ready to make it rain... JP-8.", - "%s in the pattern. Come get some dinosaur juice!", - "%s reporting for duty. Time to feed some thirsty birds.", - "%s has spawned successfully. Mo's jealous.", - "%s is flying high and ready to share the wealth.", - "%s on station. Dispensary is OPEN.", - "%s has graced you with its presence. You're welcome.", - "%s is here to save your ass from flameout.", - "%s launched. The sky gas station is open 24/7.", - "%s airborne. Better than Mo's last tanker spawn attempt.", - "%s ready to refuel. Unlike your love life, this actually works.", - "%s has arrived to keep you from embarrassing yourself.", - "%s on station and totally not judging your fuel planning.", - "%s is up. Try not to break the boom this time.", - "%s launched successfully. Mo couldn't get his off the ground.", - "%s airborne. Your aerial bartender has arrived!", - "%s ready for action. The juice is loose!", - "%s has spawned. Time to get wet... with fuel.", - "%s on station. We promise not to tell anyone you needed us.", - "%s reporting. Because someone forgot to fuel before takeoff.", - "%s is here! The flying fuel truck has arrived!", - "%s airborne and ready to fill your tanks. That's what she said.", - "%s launched. Even Mo could refuel from this... maybe.", - "%s on station. Your poor planning is our opportunity!", - "%s has arrived. The aerial milk truck is ready.", - "%s ready to pump. Get your minds out of the gutter.", - "%s airborne because you can't manage fuel apparently.", - "%s is up there waiting. Don't keep us hovering forever.", - "%s has joined the fight. By 'fight' we mean 'hovering lazily.'", - "%s on station. Premium unleaded is on tap!", - "%s launched and looking sexy up here.", - "%s ready to refuel. Try not to scratch the paint this time.", - "%s has arrived. Mo said this was impossible but here we are.", - "%s airborne. The sky's full service station is open!", - "%s on station ready to save your bacon.", - "%s has launched into the wild blue yonder!", - "%s reporting for gas pumping duty.", - "%s is up and Mo isn't. Winner: us.", - "%s airborne. Fuel flows like wine at a wedding!", - "%s on station. Unlike Mo, we actually showed up.", - "%s ready to top you off. No phrasing.", - "%s has successfully taken off. Mo's still taxiing.", - "%s airborne and operational. The real MVP.", - "%s on station doing the lord's work.", - "%s has arrived to prevent your walk of shame.", - "%s ready for refueling ops. Try to connect this time.", - "%s launched because someone has to be the adult here.", - "%s airborne. Probably more reliable than your ex.", - "%s on station ready to give you the good stuff.", - "%s has spawned. Mo's tanker is still in the hangar.", - "%s reporting. Your airborne gas station awaits!", - "%s is up! Time for some hot refueling action.", - "%s airborne and Mo's not invited to this party.", - "%s on station. We have fuel, you have need. Let's dance.", - "%s ready to dispense freedom molecules!", - "%s has arrived to fix your fuel management issues.", - "%s launched. The flying gas can is ready for customers.", - "%s airborne because apparently nobody can calculate bingo.", - "%s on station. Come get your fix!", - "%s ready to pump premium into your thirsty bird.", - "%s has spawned successfully. Suck it, Mo.", - "%s reporting. Your aerial enabler is on station.", - "%s is up there waiting like a patient parent.", - "%s airborne and ready to make your fuel gauge happy.", - "%s on station. Mo said we couldn't do it. We did it.", - "%s launched with more grace than Mo's last landing.", - "%s ready for business. The boom is ready to boom.", - "%s has arrived fashionably and ready to serve.", - "%s airborne. Your fuel problems are about to be solved!", - "%s on station doing God's work up here.", - "%s ready to refuel. We got the good stuff.", - "%s has spawned. Time to feed the hungry jets!", - "%s reporting for duty with full tanks!", - "%s launched successfully without Mo's help, thank God.", - "%s airborne. The flying filling station is OPEN!", - }, - - -- Already Active Warning - ALREADY_ACTIVE = { - "%s is already airborne!", - "%s is currently active.", - "%s is already on station.", - "%s is already flying. Check status for details.", - "%s is already up - can't spawn another.", - "%s is currently operating.", - "Cannot spawn - %s already active.", - "%s is already out there!", - "%s already flying. One at a time, please.", - "%s is already working the pattern.", - "%s is already up there, genius.", - "Dude, %s is ALREADY flying. Pay attention.", - "%s is currently active. Are you even looking?", - "Hey Einstein, %s is already airborne!", - "%s is up there right now. Use your eyes.", - "What part of '%s is active' don't you understand?", - "%s is already flying. Did Mo program this button?", - "Seriously? %s is already up. Check your radar.", - "%s is currently operational. Nice try though.", - "Negative. %s is already in the air.", - "%s is already active. Mo would have known that.", - "Can't spawn two, buttercup. %s is already flying.", - "%s is already out there doing tanker things.", - "Nice try. %s is already airborne, hotshot.", - "%s is currently flying. One's enough.", - "Hold your horses! %s is already active.", - "%s is already up. We're not running a bus service here.", - "Bruh. %s is already flying.", - "%s is currently active. Maybe learn to read?", - "Negative ghostrider. %s is already up.", - "%s is already airborne. Unlike your awareness.", - "Um, %s is ALREADY flying. Hello?", - "%s is currently on station. Wake up.", - "You can't spawn %s twice. Physics doesn't work that way.", - "%s is already active. Not sure what you expected.", - "Denied! %s is already in the pattern.", - "%s is currently flying around. Look outside.", - "News flash: %s is already airborne!", - "%s is already up there. Mo makes better decisions than this.", - "Request denied. %s is already active, chief.", - "%s is currently operational. Check your instruments.", - "Already got one! %s is flying right now.", - "%s is already airborne. Reading is fundamental.", - "Uh, no. %s is currently active.", - "%s is already out there. Situational awareness: zero.", - "Can't spawn %s again. Not a video game, buddy.", - "%s is currently flying. We only get one.", - "That's a negative. %s is already up.", - "%s is already on station. Did you even check?", - "Seriously? %s has been flying for 20 minutes.", - "%s is already active. This isn't rocket science.", - "Request rejected. %s is currently airborne.", - "%s is already up there pumping gas. Pay attention!", - "Nope. %s is already flying. Check the status board.", - "%s is currently active. Even Mo knew this.", - "Cannot comply. %s is already operational.", - "%s is already airborne. Try the status menu next time.", - "That's a no-go. %s is currently flying.", - "%s is already up. Did you think we had two?", - "Denied. %s is already on station doing its thing.", - "%s is currently active. Surprised you didn't notice.", - "Can't do it. %s is already flying around up there.", - "%s is already operational. One tanker at a time, pal.", - "Negative. %s has been active for a while now.", - "%s is already up there. Spawn button isn't a toy.", - "Request denied. %s is currently on station.", - "%s is already flying. Not cloning aircraft today.", - "Can't spawn another. %s is already airborne.", - "%s is currently active. Stop button mashing.", - "That's not happening. %s is already up.", - "%s is already operational. One's all you get.", - "No can do. %s is already in the pattern.", - "%s is currently flying. Check before clicking, maybe?", - "Request rejected. %s is already on duty.", - "%s is already airborne. Unlike your attention span.", - "Nope! %s is currently active and doing fine.", - "%s is already up there. Stop spamming the spawn button.", - "Cannot spawn duplicate. %s is already flying.", - "%s is currently operational. Mo's spawn would work better.", - "Denied! %s is already on station, genius.", - "%s is already flying. Check your tanker status!", - "That's a negative. %s is currently active.", - "%s is already airborne. One tanker per customer.", - "Can't do that. %s is already up and working.", - "%s is currently on station. Read the room.", - "Request denied. %s is already operational, chief.", - "%s is already active. Try paying attention.", - "No dice. %s is already flying the pattern.", - "%s is currently airborne. Spawn limit: 1.", - "Negative. %s is already up there doing tanker stuff.", - "%s is already active. Maybe check the status screen?", - "Can't spawn %s again. We're not made of tankers here.", - "%s is currently flying. One at a time, hotshot.", - "Request rejected. %s is already on station.", - "%s is already operational. Even Mo knows you only get one.", - "That's not possible. %s is currently airborne.", - "%s is already up there. Better situational awareness needed.", - "Denied. %s is currently active and wondering why you asked.", - "%s is already flying. The spawn button isn't for spam.", - "Cannot comply. %s is already operational, Einstein.", - }, - - -- Spawn Failure - SPAWN_FAILURE = { - "Failed to spawn %s!", - "Unable to launch %s. Try again.", - "%s spawn aborted!", - "Cannot spawn %s at this time.", - "%s failed to launch!", - "Error spawning %s. Contact support.", - "%s launch unsuccessful.", - "Unable to activate %s. Retry required.", - "%s spawn failed. Check logs.", - "Launch failure for %s!", - "%s spawn went sideways. Oops.", - "Well that didn't work. %s failed to spawn.", - "%s couldn't get off the ground. Awkward.", - "Houston, we have a problem. %s didn't spawn.", - "%s spawn failed harder than Mo's last landing.", - "Oof. %s spawn went to hell.", - "%s launch aborted. This is embarrassing.", - "Yeah, %s didn't spawn. Our bad.", - "Spawn failed for %s. Not our finest moment.", - "%s couldn't launch. Try again, genius.", - "That's a big negative on %s spawn.", - "%s failed to spawn. Did Mo write this code?", - "Error: %s spawn went boom. The bad kind.", - "%s launch unsuccessful. Better luck next time.", - "Spawn failed. %s is still in the hangar.", - "%s didn't want to fly today apparently.", - "Well crap. %s spawn totally failed.", - "%s launch aborted. Something broke.", - "That didn't work. %s spawn failed miserably.", - "%s couldn't spawn. Technical difficulties.", - "Negative spawn for %s. Try again maybe?", - "%s spawn went tits up. Sorry.", - "Launch failure! %s is grounded.", - "%s spawn crashed and burned. Not literally.", - "Unable to spawn %s. Computer says no.", - "%s launch failed. Mo could have done better.", - "Spawn error for %s. This is awkward.", - "%s didn't spawn. The universe said no.", - "Failed to launch %s. Not our day.", - "%s spawn aborted. Probably for the best.", - "Yeah... %s spawn didn't happen.", - "%s failed to spawn. Check your setup.", - "Spawn unsuccessful for %s. Womp womp.", - "%s launch went south. Way south.", - "That's a no-go. %s failed to spawn.", - "%s spawn error. Better call tech support.", - "Launch failure! %s stayed on the ground.", - "%s couldn't spawn. Even we're confused.", - "Spawn failed for %s. Mo's laughing right now.", - "%s launch aborted. Something went wrong.", - "Unable to activate %s. Try turning it off and on again.", - "%s spawn went nowhere fast.", - "Failed spawn alert: %s is still parked.", - "%s launch unsuccessful. This is fine. Everything's fine.", - "Spawn error for %s. Not ideal.", - "%s couldn't get airborne. Rough.", - "Launch aborted. %s is taking a day off.", - "%s spawn failed spectacularly.", - "Cannot spawn %s. System said 'nah.'", - "%s launch went sideways. Try again.", - "Spawn failure! %s is grounded indefinitely.", - "%s didn't spawn. Murphy's Law in effect.", - "Failed to launch %s. Mo's spawn worked better.", - "%s spawn unsuccessful. Check the logs.", - "Error spawning %s. This shouldn't happen.", - "%s launch aborted. Technical difficulties ahead.", - "Spawn failed. %s is staying home today.", - "%s couldn't spawn. Better luck next time, champ.", - "Launch failure for %s. Not sure why.", - "%s spawn went wrong. Very wrong.", - "Unable to spawn %s. Try again later.", - "%s launch failed. Mo would be disappointed.", - "Spawn error: %s didn't make it.", - "%s failed to spawn. Computer threw a tantrum.", - "Launch aborted for %s. Sorry about that.", - "%s spawn unsuccessful. Try again maybe?", - "Cannot activate %s. Spawn failed.", - "%s launch went nowhere. Like Mo's career.", - "Spawn failure! %s is MIA.", - "%s couldn't spawn. System error.", - "Failed to launch %s. This is awkward.", - "%s spawn aborted. Not today, apparently.", - "Launch error for %s. Check your setup.", - "%s didn't spawn. Computer says no way.", - "Spawn unsuccessful. %s is grounded.", - "%s launch failed. Mo's code was better.", - "Cannot spawn %s. Technical issues.", - "%s failed to activate. Try again.", - "Launch aborted. %s spawn went south.", - "%s spawn error. This isn't good.", - "Failed to spawn %s. Maybe next time.", - "%s launch unsuccessful. Something broke.", - "Spawn failure for %s. Not our best work.", - "%s couldn't get off the ground. Awkward moment.", - "Launch error! %s is still parked.", - "%s spawn went wrong. Very, very wrong.", - "Unable to spawn %s. System malfunction.", - "%s launch failed harder than expected.", - "Spawn aborted. %s is taking a sick day.", - }, - - -- Custom Route Accepted - ROUTE_ACCEPTED = { - "%s accepting custom route with %d waypoints.%s", - "%s has your route. %d waypoints loaded.%s", - "%s acknowledges custom flight plan. %d waypoints.%s", - "%s route confirmed. %d waypoints programmed.%s", - "%s copy your route. %d waypoints accepted.%s", - "%s roger. %d waypoint route loaded.%s", - "%s has the route. %d points confirmed.%s", - "%s flight plan accepted. %d waypoints.%s", - "%s confirms route. %d waypoints in the box.%s", - "%s routing confirmed with %d waypoints.%s", - "%s has your custom route. %d waypoints loaded.%s", - "%s accepts your flight plan. %d points confirmed.%s", - "%s copies custom route with %d waypoints.%s", - "%s acknowledges %d waypoint route.%s", - "%s route programmed. %d waypoints locked in.%s", - "%s flight plan confirmed with %d points.%s", - "%s roger your route. %d waypoints loaded.%s", - "%s accepts %d waypoint custom plan.%s", - "%s has your %d waypoint route locked in.%s", - "%s confirms %d waypoint flight plan.%s", - "%s copy that. %d waypoint route programmed.%s", - "%s routing accepted. %d points confirmed.%s", - "%s has the route. %d waypoints ready.%s", - "%s acknowledges %d point route.%s", - "%s flight plan loaded with %d waypoints.%s", - "%s custom route confirmed. %d points.%s", - "%s accepts your %d waypoint plan.%s", - "%s roger. %d waypoints programmed.%s", - "%s has your %d waypoint custom route.%s", - "%s routing confirmed with %d points.%s", - "%s copies %d waypoint route. Unlike Mo's attempt.%s", - "%s accepts your custom %d waypoint plan.%s", - "%s has loaded %d waypoint route.%s", - "%s confirms %d waypoint routing.%s", - "%s flight plan locked in. %d waypoints.%s", - "%s roger your %d waypoint route.%s", - "%s accepts custom route with %d points.%s", - "%s has programmed %d waypoint plan.%s", - "%s acknowledges %d waypoint custom route.%s", - "%s routing confirmed. %d waypoints ready.%s", - "%s copies %d waypoint flight plan.%s", - "%s accepts your %d point custom route.%s", - "%s has %d waypoint route confirmed.%s", - "%s roger custom plan with %d waypoints.%s", - "%s routing accepted. %d points programmed.%s", - "%s flight plan confirmed. %d waypoints loaded.%s", - "%s has your custom %d waypoint routing.%s", - "%s accepts %d waypoint plan.%s", - "%s confirms custom route. %d waypoints.%s", - "%s roger that. %d waypoint route accepted.%s", - "%s has %d waypoint custom plan loaded.%s", - "%s acknowledges %d point custom route.%s", - "%s routing programmed. %d waypoints confirmed.%s", - "%s flight plan accepted with %d points.%s", - "%s copies your %d waypoint custom route.%s", - "%s has %d waypoint route ready.%s", - "%s accepts custom plan. %d waypoints.%s", - "%s confirms %d point flight plan.%s", - "%s roger custom %d waypoint route.%s", - "%s routing locked in. %d waypoints.%s", - "%s has %d waypoint plan confirmed.%s", - "%s flight plan loaded. %d waypoints accepted.%s", - "%s acknowledges custom %d waypoint route.%s", - "%s accepts %d waypoint routing.%s", - "%s copies custom %d waypoint plan.%s", - "%s has %d waypoint route programmed.%s", - "%s confirms your %d waypoint custom route.%s", - "%s roger. %d waypoint custom plan loaded.%s", - "%s routing accepted with %d points.%s", - "%s flight plan programmed. %d waypoints.%s", - "%s has custom route with %d waypoints.%s", - "%s accepts %d waypoint custom plan.%s", - "%s acknowledges %d waypoint routing.%s", - "%s copies %d waypoint custom route.%s", - "%s has %d waypoint flight plan confirmed.%s", - "%s roger custom route. %d waypoints.%s", - "%s routing confirmed with %d waypoints.%s", - "%s flight plan accepted. %d points loaded.%s", - "%s has your %d waypoint custom plan.%s", - "%s accepts custom %d waypoint route.%s", - "%s confirms %d waypoint custom plan.%s", - "%s acknowledges %d waypoint flight plan.%s", - "%s copies %d waypoint route confirmed.%s", - "%s has custom %d waypoint routing ready.%s", - "%s roger. %d waypoints accepted and locked.%s", - "%s routing programmed with %d waypoints.%s", - "%s flight plan confirmed with %d points.%s", - "%s has %d waypoint custom route loaded.%s", - "%s accepts your custom %d waypoint routing.%s", - "%s confirms %d waypoint plan confirmed.%s", - "%s acknowledges custom route with %d points.%s", - "%s copies %d waypoint custom flight plan.%s", - "%s has %d waypoint route locked and loaded.%s", - "%s roger that. %d waypoint custom route ready.%s", - "%s routing accepted. %d waypoints programmed.%s", - "%s flight plan loaded with %d waypoints.%s", - }, - - -- Emergency Spawn - EMERGENCY_SPAWN = { - "EMERGENCY: %s launching immediately!", - "PRIORITY LAUNCH: %s is scrambling now!", - "EMERGENCY TANKER: %s departing expedited!", - "URGENT: %s is launching on priority status!", - "EMERGENCY RESPONSE: %s airborne ASAP!", - "PRIORITY: %s scrambling for emergency fuel!", - "EMERGENCY: %s launching hot!", - "URGENT LAUNCH: %s is wheels up now!", - "EMERGENCY TANKER: %s responding immediately!", - "PRIORITY STATUS: %s emergency launch in progress!", - "EMERGENCY! %s wheels up NOW!", - "SCRAMBLE SCRAMBLE: %s launching immediately!", - "PRIORITY LAUNCH: %s getting airborne right now!", - "EMERGENCY TANKER: %s departing hot and fast!", - "URGENT: %s scrambling for emergency refuel!", - "PRIORITY: %s launching on expedited status!", - "EMERGENCY RESPONSE: %s airborne immediately!", - "URGENT LAUNCH: %s departing NOW!", - "EMERGENCY: %s getting up there ASAP!", - "PRIORITY STATUS: %s scrambling right now!", - "EMERGENCY TANKER: %s wheels up immediately!", - "URGENT: %s launching on priority!", - "SCRAMBLE: %s departing expedited!", - "EMERGENCY: %s getting airborne fast!", - "PRIORITY LAUNCH: %s launching NOW!", - "URGENT TANKER: %s scrambling immediately!", - "EMERGENCY: %s departing hot!", - "PRIORITY: %s wheels up ASAP!", - "URGENT LAUNCH: %s airborne right now!", - "EMERGENCY TANKER: %s launching immediately!", - "SCRAMBLE SCRAMBLE: %s getting up there now!", - "PRIORITY: %s launching on emergency status!", - "URGENT: %s departing immediately!", - "EMERGENCY: %s scrambling for urgent refuel!", - "PRIORITY LAUNCH: %s wheels up hot!", - "URGENT TANKER: %s airborne ASAP!", - "EMERGENCY: %s launching right now!", - "PRIORITY: %s scrambling expedited!", - "URGENT LAUNCH: %s departing NOW NOW NOW!", - "EMERGENCY TANKER: %s getting airborne fast!", - "PRIORITY STATUS: %s launching immediately!", - "URGENT: %s wheels up on priority!", - "EMERGENCY: %s scrambling now!", - "PRIORITY LAUNCH: %s departing fast!", - "URGENT TANKER: %s launching ASAP!", - "EMERGENCY: %s airborne immediately!", - "PRIORITY: %s scrambling hot!", - "URGENT LAUNCH: %s wheels up right now!", - "EMERGENCY TANKER: %s departing expedited!", - "PRIORITY: %s launching on urgent status!", - "URGENT: %s getting airborne now!", - "EMERGENCY SCRAMBLE: %s departing immediately!", - "PRIORITY TANKER: %s wheels up fast!", - "URGENT: %s launching right now!", - "EMERGENCY: %s airborne ASAP!", - "PRIORITY LAUNCH: %s scrambling now!", - "URGENT TANKER: %s departing hot!", - "EMERGENCY: %s wheels up immediately!", - "PRIORITY: %s getting airborne fast!", - "URGENT LAUNCH: %s scrambling ASAP!", - "EMERGENCY TANKER: %s launching on priority!", - "PRIORITY: %s departing right now!", - "URGENT: %s airborne expedited!", - "EMERGENCY: %s scrambling immediately!", - "PRIORITY LAUNCH: %s wheels up NOW!", - "URGENT TANKER: %s launching fast!", - "EMERGENCY: %s departing ASAP!", - "PRIORITY: %s airborne right now!", - "URGENT LAUNCH: %s scrambling hot!", - "EMERGENCY TANKER: %s wheels up expedited!", - "PRIORITY: %s launching immediately!", - "URGENT: %s getting airborne ASAP!", - "EMERGENCY: %s scrambling fast!", - "PRIORITY LAUNCH: %s departing NOW!", - "URGENT TANKER: %s wheels up right now!", - "EMERGENCY: %s airborne hot!", - "PRIORITY: %s scrambling ASAP!", - "URGENT LAUNCH: %s launching immediately!", - "EMERGENCY TANKER: %s departing fast!", - "PRIORITY: %s wheels up expedited!", - "URGENT: %s airborne NOW!", - "EMERGENCY: %s launching hot and fast!", - "PRIORITY LAUNCH: %s scrambling expedited!", - "URGENT TANKER: %s departing immediately!", - "EMERGENCY: %s wheels up ASAP!", - "PRIORITY: %s getting airborne now!", - "URGENT LAUNCH: %s airborne fast!", - "EMERGENCY TANKER: %s scrambling NOW!", - "PRIORITY: %s launching expedited!", - "URGENT: %s departing hot!", - "EMERGENCY: %s airborne immediately unlike Mo!", - "PRIORITY LAUNCH: %s wheels up faster than Mo!", - "URGENT TANKER: %s scrambling (Mo couldn't do this)!", - "EMERGENCY: %s launching while Mo watches!", - "PRIORITY: %s departing - Mo take notes!", - "URGENT LAUNCH: %s airborne (unlike Mo's attempts)!", - "EMERGENCY TANKER: %s scrambling successfully!", - "PRIORITY: %s wheels up for real!", - "URGENT: %s launching like professionals do!", - }, - - -- Low Fuel Warning - LOW_FUEL = { - "%s reports fuel at %d%%. Recommend expedite refueling.", - "%s low on fuel - %d%% remaining. RTB soon.", - "%s fuel state: %d%%. Time is limited.", - "%s down to %d%% fuel. Get your gas quick.", - "%s running low - %d%% remaining.", - "%s fuel advisory: %d%% left. Don't delay.", - "%s reports %d%% fuel state. Limited time remaining.", - "%s low fuel warning at %d%%. RTB imminent.", - "%s fuel: %d%%. Better hurry up.", - "%s getting thirsty at %d%% fuel remaining.", - "%s fuel down to %d%%. Time's ticking.", - "%s running on fumes at %d%%. Get moving.", - "%s reports %d%% fuel. Clock is running.", - "%s fuel state critical at %d%%.", - "%s getting low at %d%%. Don't dawdle.", - "%s fuel: %d%%. Window is closing.", - "%s reports %d%% remaining. Hurry it up.", - "%s fuel advisory: %d%%. Time's short.", - "%s down to %d%%. Better move fast.", - "%s fuel at %d%%. RTB soon or refuel now.", - "%s running thin at %d%%. Expedite.", - "%s reports %d%% fuel. Not much time left.", - "%s fuel state %d%%. Don't mess around.", - "%s getting low - %d%% and dropping.", - "%s fuel: %d%%. Better get some quick.", - "%s reports %d%%. Running out of time.", - "%s fuel down to %d%%. Tick tock.", - "%s low on gas at %d%%. Move it.", - "%s reports %d%% fuel state. Limited window.", - "%s fuel: %d%%. Don't be slow about it.", - "%s getting thirsty - %d%% remaining.", - "%s reports %d%%. Better hurry your ass up.", - "%s fuel at %d%%. Time ain't on your side.", - "%s running low - %d%%. Get in here.", - "%s fuel state: %d%%. Mo could refuel faster.", - "%s reports %d%%. Don't be a hero, get fuel.", - "%s fuel down to %d%%. Unlike Mo we're warning you.", - "%s getting low at %d%%. Stop screwing around.", - "%s reports %d%% fuel. This isn't a drill.", - "%s fuel: %d%%. Better not screw this up.", - "%s running thin - %d%% remaining.", - "%s reports %d%%. Time to get your ass over here.", - "%s fuel state %d%%. Seriously, hurry up.", - "%s getting thirsty at %d%%. Don't be stupid.", - "%s fuel: %d%%. We're leaving soon.", - "%s reports %d%%. Better expedite refueling.", - "%s fuel down to %d%%. Window closing fast.", - "%s low on juice - %d%% remaining.", - "%s reports %d%% fuel. Get moving or RTB.", - "%s fuel state: %d%%. Don't drag ass.", - "%s getting low at %d%%. Time's running out.", - "%s reports %d%%. Stop dicking around.", - "%s fuel: %d%%. Get in the basket.", - "%s running thin at %d%%. Move faster.", - "%s reports %d%% remaining. Chop chop.", - "%s fuel down to %d%%. Unlike Mo's planning.", - "%s getting thirsty - %d%%. Don't be slow.", - "%s reports %d%% fuel state. Hurry.", - "%s fuel: %d%%. Better not flame out.", - "%s low on gas at %d%%. Get over here.", - "%s reports %d%%. Time to move it.", - "%s fuel state %d%%. We don't have all day.", - "%s getting low - %d%% and dropping fast.", - "%s reports %d%%. Stop being a pussy.", - "%s fuel: %d%%. Refuel or die trying.", - "%s running thin - %d%%. Better hurry.", - "%s reports %d%% fuel. Move your ass.", - "%s fuel down to %d%%. Not kidding here.", - "%s getting thirsty at %d%%. Expedite.", - "%s reports %d%%. Don't be like Mo.", - "%s fuel state: %d%%. Get fuel or get bent.", - "%s low at %d%%. Time's wasting.", - "%s reports %d%% remaining. Hurry up.", - "%s fuel: %d%%. Stop fucking around.", - "%s running low - %d%%. Get here now.", - "%s reports %d%%. We're not waiting forever.", - "%s fuel down to %d%%. Better get moving.", - "%s getting low at %d%%. Tick tock motherfucker.", - "%s reports %d%% fuel state. Move it.", - "%s fuel: %d%%. Don't be a jackass.", - "%s running thin at %d%%. Expedite refuel.", - "%s reports %d%%. Time's running short.", - "%s fuel state %d%%. Get in the pattern.", - "%s getting thirsty - %d%%. Don't delay.", - "%s reports %d%%. Unlike Mo we're still here.", - "%s fuel: %d%%. Better not screw this up.", - "%s low on gas - %d%% remaining.", - "%s reports %d%% fuel. Window closing.", - "%s fuel down to %d%%. Get your shit together.", - "%s getting low at %d%%. Seriously move.", - "%s reports %d%%. Don't make us leave.", - "%s fuel state: %d%%. Better expedite.", - "%s running thin - %d%%. Time's up soon.", - "%s reports %d%% remaining. Get here.", - "%s fuel: %d%%. Stop dragging ass.", - "%s getting thirsty at %d%%. Hurry.", - "%s reports %d%%. Mo would have flamed out by now.", - }, - - -- Bingo Fuel (RTB) - BINGO_FUEL = { - "%s is BINGO fuel. Returning to base immediately!", - "%s has reached BINGO. RTB in progress!", - "%s calling BINGO fuel. Departing the pattern now!", - "%s is at BINGO state. Returning to base!", - "%s BINGO fuel - heading home now!", - "%s has hit BINGO. No more refueling available!", - "%s fuel critical - RTB initiated!", - "%s at BINGO state. Breaking off now!", - "%s calling BINGO. Pattern is clear!", - "%s BINGO fuel declared. Returning to base!", - "%s is BINGO. Getting the hell out!", - "%s calling BINGO fuel. We're done here!", - "%s has reached BINGO state. Leaving NOW!", - "%s BINGO declared. RTB in progress!", - "%s at BINGO fuel. Heading home!", - "%s calling BINGO. Pattern clear!", - "%s has hit BINGO. See ya!", - "%s BINGO fuel state. Departing!", - "%s is at BINGO. RTB immediately!", - "%s calling BINGO. We're out!", - "%s has reached BINGO. Breaking off!", - "%s BINGO fuel declared. Leaving!", - "%s at BINGO state. Going home!", - "%s calling BINGO. Adios!", - "%s has hit BINGO fuel. Departing now!", - "%s BINGO declared. RTB active!", - "%s is at BINGO. Bye bye!", - "%s calling BINGO fuel. Out of here!", - "%s has reached BINGO state. Later!", - "%s BINGO fuel. Heading back!", - "%s at BINGO. Returning immediately!", - "%s calling BINGO. Pattern's yours!", - "%s has hit BINGO. Going home!", - "%s BINGO declared. Leaving the AO!", - "%s is at BINGO fuel. RTB now!", - "%s calling BINGO. Peace out!", - "%s has reached BINGO. Departing!", - "%s BINGO fuel state. We're done!", - "%s at BINGO. Heading to base!", - "%s calling BINGO. Catch you later!", - "%s has hit BINGO fuel. RTB!", - "%s BINGO declared. Getting out!", - "%s is at BINGO state. Later gator!", - "%s calling BINGO. We out!", - "%s has reached BINGO. Returning!", - "%s BINGO fuel. Leaving now!", - "%s at BINGO. Going home finally!", - "%s calling BINGO. Done pumping gas!", - "%s has hit BINGO. RTB initiated!", - "%s BINGO declared. Out of here!", - "%s is at BINGO fuel. Bye!", - "%s calling BINGO. Pattern clear!", - "%s has reached BINGO state. Departing!", - "%s BINGO fuel. Heading back!", - "%s at BINGO. RTB in progress!", - "%s calling BINGO. See ya later!", - "%s has hit BINGO fuel. Leaving!", - "%s BINGO declared. Going home!", - "%s is at BINGO. Out!", - "%s calling BINGO fuel. We're outta here!", - "%s has reached BINGO. RTB now!", - "%s BINGO fuel state. Later!", - "%s at BINGO. Returning to base!", - "%s calling BINGO. Adios amigos!", - "%s has hit BINGO. Departing!", - "%s BINGO declared. Heading home!", - "%s is at BINGO fuel. Peace!", - "%s calling BINGO. We done!", - "%s has reached BINGO state. Leaving!", - "%s BINGO fuel. RTB active!", - "%s at BINGO. Going back!", - "%s calling BINGO. That's it folks!", - "%s has hit BINGO fuel. Out of here!", - "%s BINGO declared. Returning!", - "%s is at BINGO. Later suckers!", - "%s calling BINGO fuel. Bye!", - "%s has reached BINGO. Heading home!", - "%s BINGO fuel state. Departing!", - "%s at BINGO. RTB initiated!", - "%s calling BINGO. We're gone!", - "%s has hit BINGO. Leaving now!", - "%s BINGO declared. Getting out of dodge!", - "%s is at BINGO fuel. Later!", - "%s calling BINGO. Don't wait up!", - "%s has reached BINGO state. Out!", - "%s BINGO fuel. Going home!", - "%s at BINGO. Returning immediately!", - "%s calling BINGO. Unlike Mo we planned this!", - "%s has hit BINGO fuel. Peace out!", - "%s BINGO declared. Heading back!", - "%s is at BINGO. Bye felicia!", - "%s calling BINGO fuel. That's a wrap!", - "%s has reached BINGO. We're out!", - "%s BINGO fuel state. Later gator!", - "%s at BINGO. RTB right now!", - "%s calling BINGO. Smell ya later!", - "%s has hit BINGO. Departing!", - "%s BINGO declared. Mo would've flamed out!", - "%s is at BINGO fuel. Catch you on the flip side!", - }, - - -- Tanker Destroyed - DESTROYED = { - "%s has been destroyed!", - "%s is down! Aircraft lost!", - "%s has been shot down!", - "%s destroyed in combat!", - "%s is gone - aircraft destroyed!", - "%s has been lost!", - "We've lost %s!", - "%s destroyed! No survivors!", - "%s is down and out!", - "%s has been eliminated!", - "%s has been blown to hell!", - "%s is toast! Aircraft destroyed!", - "%s went down in flames!", - "%s has been obliterated!", - "%s is scrap metal now!", - "%s got smoked!", - "RIP %s. Aircraft destroyed!", - "%s has been vaporized!", - "%s is no more!", - "%s went down hard!", - "%s has been wasted!", - "%s is KIA! Aircraft lost!", - "%s got shot the fuck down!", - "%s has been annihilated!", - "%s is sleeping with the fishes!", - "%s went boom!", - "%s has been terminated!", - "%s is dead! No survivors!", - "%s got fucked up!", - "%s has ceased to exist!", - "%s went down like Mo's career!", - "%s is destroyed! Total loss!", - "%s got hammered!", - "%s has been neutralized!", - "%s is history!", - "%s went down in a ball of fire!", - "%s has been taken out!", - "%s is gone forever!", - "%s got massacred!", - "%s has been deleted!", - "%s is pushing up daisies!", - "%s went down screaming!", - "%s has been liquidated!", - "%s is scattered across the landscape!", - "%s got wrecked!", - "%s has been erased!", - "%s is no longer operational!", - "%s went down like a brick!", - "%s has been dispatched!", - "%s is gone to the great hangar in the sky!", - "%s got absolutely demolished!", - "%s has been removed from existence!", - "%s is dead as fuck!", - "%s went down faster than Mo!", - "%s has been exterminated!", - "%s is now a smoking crater!", - "%s got absolutely destroyed!", - "%s has been converted to debris!", - "%s is no longer with us!", - "%s went down in a spectacular fashion!", - "%s has been sent to hell!", - "%s is totally fucked!", - "%s got blown out of the sky!", - "%s has been utterly destroyed!", - "%s is burning on the ground!", - "%s went down like a sack of shit!", - "%s has been wiped out!", - "%s is permanently grounded!", - "%s got turned into confetti!", - "%s has been removed from service!", - "%s is now spare parts!", - "%s went down hard and fast!", - "%s has been completely destroyed!", - "%s is toast and then some!", - "%s got absolutely annihilated!", - "%s has been blown to smithereens!", - "%s is no longer flying!", - "%s went down like the Hindenburg!", - "%s has been totally wrecked!", - "%s is deader than dead!", - "%s got straight up murdered!", - "%s has been completely obliterated!", - "%s is scattered across three counties!", - "%s went down in flames like Mo's reputation!", - "%s has been catastrophically destroyed!", - "%s is now a fireball!", - "%s got absolutely smoked!", - "%s has been reduced to atoms!", - "%s is gone gone gone!", - "%s went down and ain't coming back!", - "%s has been utterly annihilated!", - "%s is now a lawn dart!", - "%s got completely fucked!", - "%s has been sent to the shadow realm!", - "%s is now in aircraft heaven!", - "%s went down faster than your hopes and dreams!", - "%s has been totally destroyed!", - "%s is no longer a thing!", - }, - - -- Hostile Fire - TAKING_FIRE = { - "%s is taking fire!", - "%s under attack!", - "%s receiving hostile fire!", - "%s taking hits!", - "%s is being engaged!", - "%s under hostile fire!", - "Hostile fire on %s!", - "%s taking enemy fire!", - "%s is under attack!", - "%s being fired upon!", - "%s is getting shot at!", - "%s under hostile fire!", - "%s taking incoming!", - "%s is being lit up!", - "%s receiving enemy fire!", - "%s getting hammered!", - "%s under attack right now!", - "%s taking fire from hostiles!", - "%s is being engaged by enemy!", - "%s getting shot to shit!", - "%s under hostile attack!", - "%s taking heavy fire!", - "%s is being targeted!", - "%s receiving hostile rounds!", - "%s getting fucked up!", - "%s under enemy fire!", - "%s taking hits from hostiles!", - "%s is being shot at!", - "%s receiving incoming fire!", - "%s getting attacked!", - "%s under hostile engagement!", - "%s taking enemy rounds!", - "%s is being hit!", - "%s receiving fire!", - "%s getting lit up!", - "%s under attack from enemy!", - "%s taking hostile fire!", - "%s is being engaged!", - "%s receiving enemy rounds!", - "%s getting shot!", - "%s under fire right now!", - "%s taking incoming rounds!", - "%s is being attacked!", - "%s receiving hostile fire!", - "%s getting hammered by hostiles!", - "%s under enemy attack!", - "%s taking fire from below!", - "%s is being targeted by enemy!", - "%s receiving heavy fire!", - "%s getting shot at hard!", - "%s under hostile fire!", - "%s taking enemy fire now!", - "%s is being engaged by hostiles!", - "%s receiving incoming!", - "%s getting attacked by enemy!", - "%s under fire from hostiles!", - "%s taking hits!", - "%s is being shot up!", - "%s receiving hostile rounds!", - "%s getting fucked up by enemy!", - "%s under hostile engagement!", - "%s taking fire!", - "%s is being hammered!", - "%s receiving enemy fire!", - "%s getting shot at!", - "%s under enemy fire!", - "%s taking hostile rounds!", - "%s is being lit up!", - "%s receiving fire from hostiles!", - "%s getting attacked hard!", - "%s under hostile attack!", - "%s taking incoming fire!", - "%s is being engaged!", - "%s receiving hostile fire!", - "%s getting shot to hell!", - "%s under fire!", - "%s taking enemy rounds!", - "%s is being targeted!", - "%s receiving fire!", - "%s getting hammered!", - "%s under attack by hostiles!", - "%s taking fire from enemy!", - "%s is being shot at!", - "%s receiving incoming rounds!", - "%s getting attacked!", - "%s under hostile fire right now!", - "%s taking hits from enemy!", - "%s is being engaged by hostiles!", - "%s receiving hostile fire!", - "%s getting lit up by enemy!", - "%s under fire from below!", - "%s taking enemy fire!", - "%s is being attacked by hostiles!", - "%s receiving fire from enemy!", - "%s getting shot at hard!", - "%s under enemy attack!", - "%s taking hostile fire unlike Mo who'd be dead!", - "%s is being hammered by hostiles!", - "%s receiving enemy rounds!", - }, - - -- Invalid Waypoint Count (too few) - TOO_FEW_WAYPOINTS = { - "Custom route requires at least %d waypoints!\nPlace markers: %s1, %s2, etc.", - "Not enough waypoints! Need at least %d.\nUse markers: %s1, %s2, etc.", - "Insufficient waypoints - need %d minimum.\nCreate markers: %s1, %s2, etc.", - "Route rejected: need %d waypoints minimum.\nPlace %s1, %s2, etc.", - "At least %d waypoints required!\nDrop markers: %s1, %s2, etc.", - "Need more waypoints - minimum is %d.\nUse: %s1, %s2, etc.", - "Route incomplete. Need %d waypoints.\nCreate: %s1, %s2, etc.", - "Waypoint count too low - need %d.\nPlace: %s1, %s2, etc.", - "Minimum %d waypoints required!\nMark: %s1, %s2, etc.", - "Can't route with less than %d points.\nAdd markers: %s1, %s2, etc.", - }, - - -- Too Many Waypoints - TOO_MANY_WAYPOINTS = { - "Too many waypoints! Maximum is %d", - "Waypoint limit exceeded. Max: %d", - "Can't route with more than %d waypoints!", - "Route rejected - too many points. Max: %d", - "Waypoint overflow! Maximum is %d", - "Too complex - max %d waypoints allowed!", - "Exceeded waypoint limit of %d!", - "Route too long! Maximum: %d waypoints", - "Cannot accept more than %d waypoints!", - "Waypoint maximum is %d. Route rejected.", - }, - - -- No RTB Airbase Found - NO_RTB_AIRBASE = { - "No friendly airbase found for RTB!", - "Cannot locate RTB destination!", - "No suitable airbase available for recovery!", - "Unable to find friendly base for RTB!", - "No recovery airfield located!", - "RTB destination unavailable!", - "Cannot identify friendly airbase for return!", - "No airbase in range for RTB!", - "Recovery base not found!", - "Unable to locate RTB airfield!", - }, - -- EMERGENCY SPAWN MESSAGES (100 total) - EMERGENCY_SPAWN = { - "EMERGENCY: %s launching immediately!", - "PRIORITY LAUNCH: %s is scrambling now!", - "EMERGENCY TANKER: %s departing expedited!", - "URGENT: %s is launching on priority status!", - "EMERGENCY RESPONSE: %s airborne ASAP!", - "PRIORITY: %s scrambling for emergency fuel!", - "EMERGENCY: %s launching hot!", - "URGENT LAUNCH: %s is wheels up now!", - "EMERGENCY TANKER: %s responding immediately!", - "PRIORITY STATUS: %s emergency launch in progress!", - "EMERGENCY! %s wheels up NOW!", - "SCRAMBLE SCRAMBLE: %s launching immediately!", - "PRIORITY LAUNCH: %s getting airborne right now!", - "EMERGENCY TANKER: %s departing hot and fast!", - "URGENT: %s scrambling for emergency refuel!", - "PRIORITY: %s launching on expedited status!", - "EMERGENCY RESPONSE: %s airborne immediately!", - "URGENT LAUNCH: %s departing NOW!", - "EMERGENCY: %s getting up there ASAP!", - "PRIORITY STATUS: %s scrambling right now!", - "EMERGENCY TANKER: %s wheels up immediately!", - "URGENT: %s launching on priority!", - "SCRAMBLE: %s departing expedited!", - "EMERGENCY: %s getting airborne fast!", - "PRIORITY LAUNCH: %s launching NOW!", - "URGENT TANKER: %s scrambling immediately!", - "EMERGENCY: %s departing hot!", - "PRIORITY: %s wheels up ASAP!", - "URGENT LAUNCH: %s airborne right now!", - "EMERGENCY TANKER: %s launching immediately!", - "SCRAMBLE SCRAMBLE: %s getting up there now!", - "PRIORITY: %s launching on emergency status!", - "URGENT: %s departing immediately!", - "EMERGENCY: %s scrambling for urgent refuel!", - "PRIORITY LAUNCH: %s wheels up hot!", - "URGENT TANKER: %s airborne ASAP!", - "EMERGENCY: %s launching right now!", - "PRIORITY: %s scrambling expedited!", - "URGENT LAUNCH: %s departing NOW NOW NOW!", - "EMERGENCY TANKER: %s getting airborne fast!", - "PRIORITY STATUS: %s launching immediately!", - "URGENT: %s wheels up on priority!", - "EMERGENCY: %s scrambling now!", - "PRIORITY LAUNCH: %s departing fast!", - "URGENT TANKER: %s launching ASAP!", - "EMERGENCY: %s airborne immediately!", - "PRIORITY: %s scrambling hot!", - "URGENT LAUNCH: %s wheels up right now!", - "EMERGENCY TANKER: %s departing expedited!", - "PRIORITY: %s launching on urgent status!", - "URGENT: %s getting airborne now!", - "EMERGENCY SCRAMBLE: %s departing immediately!", - "PRIORITY TANKER: %s wheels up fast!", - "URGENT: %s launching right now!", - "EMERGENCY: %s airborne ASAP!", - "PRIORITY LAUNCH: %s scrambling now!", - "URGENT TANKER: %s departing hot!", - "EMERGENCY: %s wheels up immediately!", - "PRIORITY: %s getting airborne fast!", - "URGENT LAUNCH: %s scrambling ASAP!", - "EMERGENCY TANKER: %s launching on priority!", - "PRIORITY: %s departing right now!", - "URGENT: %s airborne expedited!", - "EMERGENCY: %s scrambling immediately!", - "PRIORITY LAUNCH: %s wheels up NOW!", - "URGENT TANKER: %s launching fast!", - "EMERGENCY: %s departing ASAP!", - "PRIORITY: %s airborne right now!", - "URGENT LAUNCH: %s scrambling hot!", - "EMERGENCY TANKER: %s wheels up expedited!", - "PRIORITY: %s launching immediately!", - "URGENT: %s getting airborne ASAP!", - "EMERGENCY: %s scrambling fast!", - "PRIORITY LAUNCH: %s departing NOW!", - "URGENT TANKER: %s wheels up right now!", - "EMERGENCY: %s airborne hot!", - "PRIORITY: %s scrambling ASAP!", - "URGENT LAUNCH: %s launching immediately!", - "EMERGENCY TANKER: %s departing fast!", - "PRIORITY: %s wheels up expedited!", - "URGENT: %s airborne NOW!", - "EMERGENCY: %s launching hot and fast!", - "PRIORITY LAUNCH: %s scrambling expedited!", - "URGENT TANKER: %s departing immediately!", - "EMERGENCY: %s wheels up ASAP!", - "PRIORITY: %s getting airborne now!", - "URGENT LAUNCH: %s airborne fast!", - "EMERGENCY TANKER: %s scrambling NOW!", - "PRIORITY: %s launching expedited!", - "URGENT: %s departing hot!", - "EMERGENCY: %s airborne immediately unlike Mo!", - "PRIORITY LAUNCH: %s wheels up faster than Mo!", - "URGENT TANKER: %s scrambling (Mo couldn't do this)!", - "EMERGENCY: %s launching while Mo watches!", - "PRIORITY: %s departing - Mo take notes!", - "URGENT LAUNCH: %s airborne (unlike Mo's attempts)!", - "EMERGENCY TANKER: %s scrambling successfully!", - "PRIORITY: %s wheels up for real!", - "URGENT: %s launching like professionals do!", - }, -} - ---- Get a random message from a category ---- @param category string Message category key ---- @param ... any Format arguments for string.format ---- @return string Formatted message -local function GetRandomMessage(category, ...) - local pool = TANKER_MESSAGES[category] - if not pool or #pool == 0 then - return "Message unavailable" - end - - local template = pool[math.random(1, #pool)] - - if select("#", ...) > 0 then - return string.format(template, ...) - else - return template - end -end - --- ============================================================================ --- UTILITY FUNCTIONS --- ============================================================================ - ---- Update menu state based on tanker availability -local function UpdateTankerMenus() - if MENU_KC135_LAUNCH then - if TANKER_STATE.KC135.active then - MENU_KC135_LAUNCH:Remove() - MENU_KC135_LAUNCH = nil - elseif not MENU_KC135_LAUNCH then - MENU_KC135_LAUNCH = MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - "Launch " .. TANKER_CONFIG.KC135.displayName, - MENU_TANKER_ROOT, - SpawnTanker - ) - end - end - - if MENU_KC135_MPRS_LAUNCH then - if TANKER_STATE.KC135_MPRS.active then - MENU_KC135_MPRS_LAUNCH:Remove() - MENU_KC135_MPRS_LAUNCH = nil - elseif not MENU_KC135_MPRS_LAUNCH then - MENU_KC135_MPRS_LAUNCH = MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - "Launch " .. TANKER_CONFIG.KC135_MPRS.displayName, - MENU_TANKER_ROOT, - SpawnTankerMPRS - ) - end - end -end - ---- Announce tanker information to coalition -local function AnnounceTankerInfo(config, spawned) - local msg = GetRandomMessage("SPAWN_SUCCESS", config.displayName) .. "\n" - - if config.tacan then - msg = msg .. string.format("TACAN: %s\n", config.tacan) - end - - if config.frequency then - msg = msg .. string.format("Radio: %s MHz", config.frequency) - end - - MESSAGE:New(msg, 20):ToBlue() - env.info(string.format("[TANKER] %s spawned successfully", config.displayName)) -end - ---- Monitor tanker fuel levels -local function MonitorTankerFuel(stateKey, config) - return function() - local state = TANKER_STATE[stateKey] - - if not state.active or not state.group then - return - end - - -- Check if group still exists - if not state.group:IsAlive() then - return - end - - local fuelPercent = state.group:GetFuel() * 100 - - -- Bingo fuel check - if fuelPercent <= config.fuelBingoPercent and not state.bingoWarned then - MESSAGE:New(GetRandomMessage("BINGO_FUEL", config.displayName), 15, "WARNING"):ToBlue() - state.bingoWarned = true - env.info(string.format("[TANKER] %s bingo fuel: %.1f%%", config.displayName, fuelPercent)) - - -- Low fuel warning - elseif fuelPercent <= config.fuelWarningPercent and not state.fuelWarned then - MESSAGE:New(GetRandomMessage("LOW_FUEL", config.displayName, math.floor(fuelPercent)), 15):ToBlue() - state.fuelWarned = true - env.info(string.format("[TANKER] %s low fuel warning: %.1f%%", config.displayName, fuelPercent)) - end - end -end - ---- Start (or restart) the fuel monitor scheduler for a tanker -local function StartFuelMonitor(stateKey, config) - local state = TANKER_STATE[stateKey] - if not state then - return - end - - if state.fuelMonitor then - state.fuelMonitor:Stop() - state.fuelMonitor = nil - end - - state.fuelMonitor = SCHEDULER:New( - nil, - MonitorTankerFuel(stateKey, config), - {}, - FUEL_CHECK_INTERVAL, - FUEL_CHECK_INTERVAL - ) -end - ---- Schedule auto-respawn after tanker loss -local function ScheduleRespawn(stateKey, config, spawnFunc) - local state = TANKER_STATE[stateKey] - - -- Cancel existing respawn if any - if state.respawnScheduler then - state.respawnScheduler:Stop() - end - - local countdown = config.respawnDelay - - MESSAGE:New(string.format("%s will respawn in %d seconds", - config.displayName, countdown), 10):ToBlue() - - -- Respawn scheduler - state.respawnScheduler = SCHEDULER:New(nil, function() - env.info(string.format("[TANKER] Auto-respawning %s", config.displayName)) - spawnFunc() - end, {}, config.respawnDelay) -end - ---- Clean up tanker state -local function CleanupTankerState(stateKey) - local state = TANKER_STATE[stateKey] - - state.active = false - state.group = nil - state.fuelWarned = false - state.bingoWarned = false - - if state.fuelMonitor then - state.fuelMonitor:Stop() - state.fuelMonitor = nil - end - - if state.respawnScheduler then - state.respawnScheduler:Stop() - state.respawnScheduler = nil - end -end - --- ============================================================================ --- CUSTOM ROUTE FUNCTIONS --- ============================================================================ - ---- Parse waypoint marker text for altitude and speed overrides ---- Supports formats: SHELL1, SHELL1:FL220, SHELL1:FL220:SP330, SHELL1::SP300, SHELL1:RTB ---- @param markerText string The text from the map marker ---- @param defaultAlt number Default altitude in feet ---- @param defaultSpeed number Default speed in knots ---- @return table Parsed waypoint data {altitude, speed, rtb, isValid} -local function ParseWaypointMarker(markerText, defaultAlt, defaultSpeed) - local result = { - altitude = defaultAlt, - speed = defaultSpeed, - rtb = false, - isValid = true, - originalText = markerText - } - - -- Split by colon - local parts = {} - for part in string.gmatch(markerText, "[^:]+") do - table.insert(parts, part) - end - - -- Check for RTB command - for _, part in ipairs(parts) do - if string.upper(part) == "RTB" then - result.rtb = true - return result - end - end - - -- Parse FL (Flight Level) - for _, part in ipairs(parts) do - local fl = string.match(part, "FL(%d+)") - if fl then - result.altitude = tonumber(fl) * 100 -- Convert FL to feet - end - end - - -- Parse SP (Speed) - for _, part in ipairs(parts) do - local sp = string.match(part, "SP(%d+)") - if sp then - result.speed = tonumber(sp) - end - end - - return result -end - ---- Scan map for waypoint markers matching callsign pattern ---- @param callsign string The callsign prefix to search for (e.g., "SHELL", "ARCO") ---- @return table Array of waypoint data sorted by sequence number -local function ScanForWaypointMarkers(callsign) - local waypoints = {} - local markerIds = {} - - -- Iterate through all possible marker IDs (DCS markers are numbered) - -- We'll scan up to 1000 markers (should be more than enough) - for i = 1, 1000 do - local markerData = world.getMarkPanels() - if markerData and markerData[i] then - local marker = markerData[i] - local markerText = marker.text - - if markerText then - -- Check if marker matches pattern: CALLSIGN + number - local upperText = string.upper(markerText) - local upperCallsign = string.upper(callsign) - local sequence = string.match(upperText, "^" .. upperCallsign .. "(%d+)") - - if sequence then - local seqNum = tonumber(sequence) - local pos = marker.pos - - table.insert(waypoints, { - sequence = seqNum, - coordinate = COORDINATE:NewFromVec3(pos), - markerId = marker.idx, - markerText = markerText - }) - - table.insert(markerIds, marker.idx) - - env.info(string.format("[TANKER] Found waypoint marker: %s at seq %d (ID: %d)", - markerText, seqNum, marker.idx)) - end - end - end - end - - -- Sort by sequence number - table.sort(waypoints, function(a, b) return a.sequence < b.sequence end) - - return waypoints, markerIds -end - --- ============================================================================ - ---- Spawn a tanker directly from config (no Mission Editor template required) ---- @param config table Tanker configuration ---- @param coord COORDINATE Where to spawn ---- @param heading number Initial heading in degrees ---- @return GROUP The spawned tanker group -local function SpawnTankerFromConfig(config, coord, heading) - -- Generate unique group/unit IDs - local groupId = math.random(10000, 99999) - local unitId = math.random(10000, 99999) - - -- Ensure we have valid altitude (coord.y is altitude in meters MSL) - local spawnAlt = coord.y - env.info(string.format("[TANKER] Spawn altitude: %.1f meters (FL%03d)", spawnAlt, spawnAlt * 3.28084 / 100)) - - -- Create group data structure - local groupData = { - ["visible"] = false, - ["taskSelected"] = true, - ["route"] = { - ["points"] = { - [1] = { - ["alt"] = spawnAlt, - ["type"] = "Turning Point", - ["action"] = "Turning Point", - ["alt_type"] = "BARO", - ["speed"] = config.defaultSpeed * 0.514444, - ["task"] = { - ["id"] = "ComboTask", - ["params"] = { - ["tasks"] = { - [1] = { - ["id"] = "Tanker", - ["params"] = {} - } - } - } - }, - ["x"] = coord.x, - ["y"] = coord.z, - } - } - }, - ["hidden"] = false, - ["units"] = { - [1] = { - ["alt"] = spawnAlt, - ["alt_type"] = "BARO", - ["livery_id"] = config.livery, - ["skill"] = "High", - ["speed"] = config.defaultSpeed * 0.514444, - ["type"] = config.aircraftType, - ["unitId"] = unitId, - ["psi"] = -heading, -- Negative for correct heading - ["unitName"] = config.unitName, - ["x"] = coord.x, - ["y"] = coord.z, - ["heading"] = math.rad(heading), - ["onboard_num"] = "010", - }, - }, - ["groupId"] = groupId, - ["y"] = coord.z, - ["x"] = coord.x, - ["name"] = config.groupName, - ["task"] = "Refueling", - } - - -- Spawn the group using coalition.addGroup - local spawnedGroup = coalition.addGroup(country.id.USA, Group.Category.AIRPLANE, groupData) - - if spawnedGroup then - env.info(string.format("[TANKER] Spawned %s (ID: %d)", config.groupName, groupId)) - return GROUP:Find(spawnedGroup:getName()) - else - env.error(string.format("[TANKER] Failed to spawn %s", config.groupName)) - return nil - end -end - ---- Ensure default spawns immediately enter a holding pattern so they do not RTB ---- @param group GROUP The spawned tanker group ---- @param coord COORDINATE Center point for the orbit ---- @param config table Tanker configuration for speed/altitude -local function ApplyDefaultOrbitRoute(group, coord, config) - if not group or not coord or not config then - return - end - - local orbitCenter = coord:SetAltitude(config.defaultAltitude * 0.3048, true) - local orbitWP = orbitCenter:WaypointAirTurningPoint( - COORDINATE.WaypointAltType.BARO, - config.defaultSpeed * 0.514444, - config.defaultAltitude * 0.3048, - {}, - "DEFAULT-ORBIT" - ) - - orbitWP.task = { - id = "ComboTask", - params = { - tasks = { - { - id = "Tanker", - params = {} - }, - { - id = "Orbit", - params = { - pattern = "Circle", - speed = config.defaultSpeed * 0.514444, - altitude = config.defaultAltitude * 0.3048, - point = { - x = orbitCenter.x, - y = orbitCenter.z - } - } - } - } - } - } - - group:Route({ orbitWP }) - env.info(string.format("[TANKER] Applied default orbit for %s", config.displayName)) -end - ---- Create custom route tanker spawn ---- @param callsign string Callsign prefix used for markers ---- @param config table Tanker configuration ---- @param stateKey string State key for tracking ---- @param isEmergency boolean Whether this is an emergency spawn ---- @return boolean Success status -local function SpawnCustomRouteTanker(callsign, config, stateKey, isEmergency) - local state = TANKER_STATE[stateKey] - - -- Check if already active - if state.active then - MESSAGE:New(GetRandomMessage("ALREADY_ACTIVE", config.displayName), 10):ToBlue() - return false - end - - -- Scan for waypoint markers - local waypoints, markerIds = ScanForWaypointMarkers(callsign) - - -- Validate waypoint count - if #waypoints < ROUTE_CONFIG.minWaypoints then - MESSAGE:New(GetRandomMessage("TOO_FEW_WAYPOINTS", - ROUTE_CONFIG.minWaypoints, callsign, callsign), 15, "ERROR"):ToBlue() - return false - end - - if #waypoints > ROUTE_CONFIG.maxWaypoints then - MESSAGE:New(GetRandomMessage("TOO_MANY_WAYPOINTS", - ROUTE_CONFIG.maxWaypoints), 15, "ERROR"):ToBlue() - return false - end - - -- Build route description and validate waypoints - local routeDesc = "" - local routePoints = {} - local hasRTB = false - - for i, wp in ipairs(waypoints) do - local parsed = ParseWaypointMarker(wp.markerText, config.defaultAltitude, config.defaultSpeed) - - if parsed.rtb then - hasRTB = true - -- Find nearest friendly airbase from last waypoint position - local lastPos = #routePoints > 0 and routePoints[#routePoints].coord or wp.coordinate - local nearestAirbase = lastPos:GetClosestAirbase(Airbase.Category.AIRDROME, coalition.side.BLUE) - - if nearestAirbase then - local airbaseName = nearestAirbase:GetName() - local airbaseCoord = nearestAirbase:GetCoordinate() - routeDesc = routeDesc .. string.format("\n WP%d: RTB to %s", i, airbaseName) - - table.insert(routePoints, { - coord = airbaseCoord, - altitude = 0, -- Will land - speed = parsed.speed, - rtb = true, - airbase = nearestAirbase, - airbaseName = airbaseName - }) - - env.info(string.format("[TANKER] RTB destination: %s", airbaseName)) - else - routeDesc = routeDesc .. string.format("\n WP%d: RTB (no airbase found)", i) - env.warning("[TANKER] No friendly airbase found for RTB") - end - break -- RTB is terminal command - else - routeDesc = routeDesc .. string.format("\n WP%d: FL%03d @ %d kts", - i, math.floor(parsed.altitude / 100), parsed.speed) - - table.insert(routePoints, { - coord = wp.coordinate, - altitude = parsed.altitude, - speed = parsed.speed, - rtb = false - }) - end - end - - -- Confirm route to player - local emergencyText = isEmergency and " [EMERGENCY]" or "" - local routeMsg = GetRandomMessage("ROUTE_ACCEPTED", config.displayName, #routePoints, routeDesc) - if isEmergency then - routeMsg = GetRandomMessage("EMERGENCY_SPAWN", config.displayName) .. "\n" .. routeMsg - end - MESSAGE:New(routeMsg, 20):ToBlue() - - env.info(string.format("[TANKER] Spawning %s with custom route: %d waypoints", - config.displayName, #routePoints)) - - -- Debug: log route point data - for i, rp in ipairs(routePoints) do - env.info(string.format("[TANKER] RoutePoint %d: coord=%s, alt=%.0f, spd=%.0f, rtb=%s", - i, tostring(rp.coord), rp.altitude, rp.speed, tostring(rp.rtb))) - end - - -- Delete markers if configured - if ROUTE_CONFIG.deleteMarkersAfterUse then - for _, markerId in ipairs(markerIds) do - trigger.action.removeMark(markerId) - end - env.info(string.format("[TANKER] Deleted %d waypoint markers", #markerIds)) - end - - -- Spawn tanker with custom route - -- Calculate initial heading - local headingCoord - if routePoints[2] and routePoints[2].coord then - headingCoord = routePoints[2].coord - else - headingCoord = routePoints[1].coord - end - - local initialHeading = routePoints[1].coord:HeadingTo(headingCoord) - - -- Set the spawn coordinate with correct altitude (convert feet to meters) - local spawnCoord = routePoints[1].coord:SetAltitude(routePoints[1].altitude * 0.3048) - - local spawnedGroup = SpawnTankerFromConfig( - config, - spawnCoord, - initialHeading - ) - - if not spawnedGroup then - MESSAGE:New(GetRandomMessage("SPAWN_FAILURE", config.displayName), 10, "ERROR"):ToBlue() - return false - end - - -- Route the group through all waypoints - local taskRoute = {} - for i, rp in ipairs(routePoints) do - local wp - - -- RTB waypoint - land at airbase - if rp.rtb and rp.airbase then - wp = rp.coord:WaypointAirLanding( - rp.speed * 0.514444, - rp.airbase:GetDCSObject(), - {}, - "RTB" - ) - else - -- Normal waypoint - wp = rp.coord:WaypointAirFlyOverPoint( - COORDINATE.WaypointAltType.BARO, - rp.speed * 0.514444, -- Convert knots to m/s - rp.altitude * 0.3048, -- Convert feet to meters - {}, - "WP" .. i - ) - - -- Add tanker task to all waypoints - wp.task = { - id = "ComboTask", - params = { - tasks = { - { - id = "Tanker", - params = {} - } - } - } - } - end - - table.insert(taskRoute, wp) - end - - -- If last waypoint is not RTB, loop back to first waypoint to create continuous patrol - if not hasRTB and #routePoints > 1 then - local firstPoint = routePoints[1] - local loopWP = firstPoint.coord:WaypointAirFlyOverPoint( - COORDINATE.WaypointAltType.BARO, - firstPoint.speed * 0.514444, - firstPoint.altitude * 0.3048, - {}, - "LOOP-WP1" - ) - - -- Add tanker task to loop waypoint - loopWP.task = { - id = "ComboTask", - params = { - tasks = { - { - id = "Tanker", - params = {} - } - } - } - } - - table.insert(taskRoute, loopWP) - env.info(string.format("[TANKER] Added loop waypoint back to WP1 for continuous patrol")) - elseif not hasRTB and #routePoints == 1 then - -- Single waypoint - add circular orbit pattern - local singlePoint = routePoints[1] - local orbitWP = singlePoint.coord:WaypointAirTurningPoint( - COORDINATE.WaypointAltType.BARO, - singlePoint.speed * 0.514444, - singlePoint.altitude * 0.3048, - {}, - "ORBIT" - ) - orbitWP.task = { - id = "ComboTask", - params = { - tasks = { - { - id = "Tanker", - params = {} - }, - { - id = "Orbit", - params = { - pattern = "Circle", - speed = singlePoint.speed * 0.514444, - altitude = singlePoint.altitude * 0.3048 - } - } - } - } - } - table.insert(taskRoute, orbitWP) - env.info(string.format("[TANKER] Single waypoint - added circular orbit pattern")) - end - - -- Apply route to group - spawnedGroup:Route(taskRoute) - - -- Update state - local state = TANKER_STATE[stateKey] - state.active = true - state.group = spawnedGroup - state.fuelWarned = false - state.bingoWarned = false - - -- Announce spawn with details - AnnounceTankerInfo(config, true) - - -- Start fuel monitoring - StartFuelMonitor(stateKey, config) - - -- Update menus - UpdateTankerMenus() - - return true -end - --- ============================================================================ --- EVENT HANDLER --- ============================================================================ - -BlueTankerEventHandler = EVENTHANDLER:New() - -function BlueTankerEventHandler:OnEventBirth(EventData) - local groupName = EventData.IniDCSGroupName - - if groupName and string.find(groupName, "TANKER 135") then - env.info(string.format("[TANKER] Birth event: %s", groupName)) - - -- Determine which tanker spawned - local stateKey, config - if string.find(groupName, "MPRS") then - stateKey = "KC135_MPRS" - config = TANKER_CONFIG.KC135_MPRS - else - stateKey = "KC135" - config = TANKER_CONFIG.KC135 - end - - -- Update state - local state = TANKER_STATE[stateKey] - state.active = true - state.group = GROUP:FindByName(groupName) - state.fuelWarned = false - state.bingoWarned = false - - -- Announce spawn with details - AnnounceTankerInfo(config, true) - - -- Start fuel monitoring - StartFuelMonitor(stateKey, config) - - -- Update menus - UpdateTankerMenus() - end -end - -function BlueTankerEventHandler:OnEventDead(EventData) - local groupName = EventData.IniDCSGroupName - - if groupName and string.find(groupName, "TANKER 135") then - env.info(string.format("[TANKER] Dead event: %s", groupName)) - - -- Determine which tanker died - local stateKey, config, spawnFunc - if string.find(groupName, "MPRS") then - stateKey = "KC135_MPRS" - config = TANKER_CONFIG.KC135_MPRS - spawnFunc = SpawnTankerMPRS - else - stateKey = "KC135" - config = TANKER_CONFIG.KC135 - spawnFunc = SpawnTanker - end - - MESSAGE:New(GetRandomMessage("DESTROYED", config.displayName), - 15, "ALERT"):ToBlue() - - -- Clean up and schedule respawn - CleanupTankerState(stateKey) - ScheduleRespawn(stateKey, config, spawnFunc) - - -- Update menus - UpdateTankerMenus() - end -end - -function BlueTankerEventHandler:OnEventCrash(EventData) - -- Treat crash same as dead - self:OnEventDead(EventData) -end - -function BlueTankerEventHandler:OnEventEngineShutdown(EventData) - local groupName = EventData.IniDCSGroupName - - if groupName and string.find(groupName, "TANKER 135") then - env.info(string.format("[TANKER] Engine shutdown event: %s", groupName)) - - -- Determine which tanker - local stateKey, config, spawnFunc - if string.find(groupName, "MPRS") then - stateKey = "KC135_MPRS" - config = TANKER_CONFIG.KC135_MPRS - spawnFunc = SpawnTankerMPRS - else - stateKey = "KC135" - config = TANKER_CONFIG.KC135 - spawnFunc = SpawnTanker - end - - MESSAGE:New(string.format("%s has returned to base", config.displayName), - 10):ToBlue() - - -- Clean up and schedule respawn - CleanupTankerState(stateKey) - ScheduleRespawn(stateKey, config, spawnFunc) - - -- Update menus - UpdateTankerMenus() - end -end - -function BlueTankerEventHandler:OnEventHit(EventData) - local groupName = EventData.IniDCSGroupName - - if groupName and string.find(groupName, "TANKER 135") then - local config = string.find(groupName, "MPRS") and TANKER_CONFIG.KC135_MPRS or TANKER_CONFIG.KC135 - - MESSAGE:New(GetRandomMessage("TAKING_FIRE", config.displayName), - 15, "WARNING"):ToBlue() - - env.info(string.format("[TANKER] %s hit by hostile fire", config.displayName)) - end -end - --- ============================================================================ --- SPAWN OBJECTS AND FUNCTIONS --- ============================================================================ - --- Function to spawn KC-135 -function SpawnTanker() - if TANKER_STATE.KC135.active then - MESSAGE:New(GetRandomMessage("ALREADY_ACTIVE", TANKER_CONFIG.KC135.displayName), 10):ToBlue() - return - end - - env.info("[TANKER] Spawning KC-135") - local spawnedGroup = SpawnTankerFromConfig( - TANKER_CONFIG.KC135, - DEFAULT_SPAWN_COORD, - 0 -- heading north - ) - - if spawnedGroup then - ApplyDefaultOrbitRoute(spawnedGroup, DEFAULT_SPAWN_COORD, TANKER_CONFIG.KC135) - TANKER_STATE.KC135.active = true - TANKER_STATE.KC135.group = spawnedGroup - AnnounceTankerInfo(TANKER_CONFIG.KC135, true) - - -- Start fuel monitoring - StartFuelMonitor("KC135", TANKER_CONFIG.KC135) - - UpdateTankerMenus() - else - MESSAGE:New(GetRandomMessage("SPAWN_FAILURE", TANKER_CONFIG.KC135.displayName), 10, "ERROR"):ToBlue() - end -end - --- Function to spawn KC-135 MPRS -function SpawnTankerMPRS() - if TANKER_STATE.KC135_MPRS.active then - MESSAGE:New(GetRandomMessage("ALREADY_ACTIVE", TANKER_CONFIG.KC135_MPRS.displayName), 10):ToBlue() - return - end - - env.info("[TANKER] Spawning KC-135 MPRS") - local spawnedGroup = SpawnTankerFromConfig( - TANKER_CONFIG.KC135_MPRS, - DEFAULT_SPAWN_COORD, - 0 -- heading north - ) - - if spawnedGroup then - ApplyDefaultOrbitRoute(spawnedGroup, DEFAULT_SPAWN_COORD, TANKER_CONFIG.KC135_MPRS) - TANKER_STATE.KC135_MPRS.active = true - TANKER_STATE.KC135_MPRS.group = spawnedGroup - AnnounceTankerInfo(TANKER_CONFIG.KC135_MPRS, true) - - -- Start fuel monitoring - StartFuelMonitor("KC135_MPRS", TANKER_CONFIG.KC135_MPRS) - - UpdateTankerMenus() - else - MESSAGE:New(GetRandomMessage("SPAWN_FAILURE", TANKER_CONFIG.KC135_MPRS.displayName), 10, "ERROR"):ToBlue() - end -end - --- Function to spawn KC-135 with custom route -function SpawnCustomTanker() - SpawnCustomRouteTanker( - TANKER_CONFIG.KC135.callsign, - TANKER_CONFIG.KC135, - "KC135", - false - ) -end - --- Function to spawn KC-135 MPRS with custom route -function SpawnCustomTankerMPRS() - SpawnCustomRouteTanker( - TANKER_CONFIG.KC135_MPRS.callsign, - TANKER_CONFIG.KC135_MPRS, - "KC135_MPRS", - false - ) -end - --- Function to spawn emergency KC-135 with custom route -function SpawnEmergencyTanker() - -- Use emergency respawn delay - local originalDelay = TANKER_CONFIG.KC135.respawnDelay - TANKER_CONFIG.KC135.respawnDelay = TANKER_CONFIG.KC135.emergencyRespawnDelay - - local success = SpawnCustomRouteTanker( - TANKER_CONFIG.KC135.callsign, - TANKER_CONFIG.KC135, - "KC135", - true - ) - - -- Restore original delay - TANKER_CONFIG.KC135.respawnDelay = originalDelay - - return success -end - --- Function to spawn emergency KC-135 MPRS with custom route -function SpawnEmergencyTankerMPRS() - local originalDelay = TANKER_CONFIG.KC135_MPRS.respawnDelay - TANKER_CONFIG.KC135_MPRS.respawnDelay = TANKER_CONFIG.KC135_MPRS.emergencyRespawnDelay - - local success = SpawnCustomRouteTanker( - TANKER_CONFIG.KC135_MPRS.callsign, - TANKER_CONFIG.KC135_MPRS, - "KC135_MPRS", - true - ) - - TANKER_CONFIG.KC135_MPRS.respawnDelay = originalDelay - - return success -end - --- Function to display tanker status -function ShowTankerStatus() - local msg = "=== TANKER STATUS ===\n\n" - - -- KC-135 Status - local kc135State = TANKER_STATE.KC135 - if kc135State.active and kc135State.group and kc135State.group:IsAlive() then - local fuel = kc135State.group:GetFuel() * 100 - local coord = kc135State.group:GetCoordinate() - local alt = coord:GetLandHeight() + coord.y - msg = msg .. string.format("%s: ACTIVE\n", TANKER_CONFIG.KC135.displayName) - msg = msg .. string.format(" Fuel: %.0f%%\n", fuel) - msg = msg .. string.format(" Altitude: FL%03d\n", math.floor(alt * 3.28084 / 100)) - if TANKER_CONFIG.KC135.tacan then - msg = msg .. string.format(" TACAN: %s\n", TANKER_CONFIG.KC135.tacan) - end - if TANKER_CONFIG.KC135.frequency then - msg = msg .. string.format(" Radio: %s MHz\n", TANKER_CONFIG.KC135.frequency) - end - else - msg = msg .. string.format("%s: NOT ACTIVE\n", TANKER_CONFIG.KC135.displayName) - end - - msg = msg .. "\n" - - -- KC-135 MPRS Status - local mprsState = TANKER_STATE.KC135_MPRS - if mprsState.active and mprsState.group and mprsState.group:IsAlive() then - local fuel = mprsState.group:GetFuel() * 100 - local coord = mprsState.group:GetCoordinate() - local alt = coord:GetLandHeight() + coord.y - msg = msg .. string.format("%s: ACTIVE\n", TANKER_CONFIG.KC135_MPRS.displayName) - msg = msg .. string.format(" Fuel: %.0f%%\n", fuel) - msg = msg .. string.format(" Altitude: FL%03d\n", math.floor(alt * 3.28084 / 100)) - if TANKER_CONFIG.KC135_MPRS.tacan then - msg = msg .. string.format(" TACAN: %s\n", TANKER_CONFIG.KC135_MPRS.tacan) - end - if TANKER_CONFIG.KC135_MPRS.frequency then - msg = msg .. string.format(" Radio: %s MHz\n", TANKER_CONFIG.KC135_MPRS.frequency) - end - else - msg = msg .. string.format("%s: NOT ACTIVE\n", TANKER_CONFIG.KC135_MPRS.displayName) - end - - MESSAGE:New(msg, 25):ToBlue() -end - --- Function to show custom route help -function ShowCustomRouteHelp() - local msg = "╔════════════════════════════════════════════╗\n" - msg = msg .. "║ TANKER MANAGEMENT SYSTEM - GUIDE ║\n" - msg = msg .. "╚════════════════════════════════════════════╝\n\n" - - msg = msg .. "━━━ QUICK START ━━━\n\n" - msg = msg .. "1. SIMPLE SPAWN:\n" - msg = msg .. " • F10 → Tanker Management → Launch KC-135\n" - msg = msg .. " • Tanker spawns at default location (FL220)\n" - msg = msg .. " • Automatically orbits and provides refueling\n\n" - - msg = msg .. "2. CUSTOM ROUTE SPAWN:\n" - msg = msg .. " • Place numbered F10 map markers\n" - msg = msg .. " • Launch from Custom Route menu\n" - msg = msg .. " • Tanker follows your waypoints\n\n" - - msg = msg .. "━━━ AVAILABLE TANKERS ━━━\n\n" - msg = msg .. string.format("• %s (SHELL)\n", TANKER_CONFIG.KC135.displayName) - msg = msg .. string.format(" TACAN: %s | Radio: %s MHz\n", - TANKER_CONFIG.KC135.tacan or "N/A", TANKER_CONFIG.KC135.frequency or "N/A") - msg = msg .. string.format(" Marker Prefix: %s\n\n", TANKER_CONFIG.KC135.callsign) - - msg = msg .. string.format("• %s (ARCO)\n", TANKER_CONFIG.KC135_MPRS.displayName) - msg = msg .. string.format(" TACAN: %s | Radio: %s MHz\n", - TANKER_CONFIG.KC135_MPRS.tacan or "N/A", TANKER_CONFIG.KC135_MPRS.frequency or "N/A") - msg = msg .. string.format(" Marker Prefix: %s\n\n", TANKER_CONFIG.KC135_MPRS.callsign) - - msg = msg .. "━━━ CUSTOM ROUTE MARKERS ━━━\n\n" - msg = msg .. "BASIC USAGE:\n" - msg = msg .. " Place markers in sequence: SHELL1, SHELL2, SHELL3\n" - msg = msg .. " Minimum 2 waypoints required\n" - msg = msg .. " Defaults: FL220 @ 330 knots\n\n" - - msg = msg .. "ADVANCED SYNTAX:\n" - msg = msg .. " SHELL1:FL180 → Altitude override\n" - msg = msg .. " SHELL2::SP300 → Speed override\n" - msg = msg .. " SHELL3:FL200:SP280 → Both overrides\n" - msg = msg .. " SHELL4:RTB → Return to nearest base\n\n" - - msg = msg .. "EXAMPLES:\n" - msg = msg .. " Simple 3-point orbit:\n" - msg = msg .. " ARCO1, ARCO2, ARCO3\n\n" - msg = msg .. " High altitude route with RTB:\n" - msg = msg .. " SHELL1:FL280, SHELL2:FL280, SHELL3:RTB\n\n" - msg = msg .. " Low-level tanker track:\n" - msg = msg .. " ARCO1:FL120:SP250, ARCO2:FL120:SP250\n\n" - - msg = msg .. "━━━ REROUTING ACTIVE TANKERS ━━━\n\n" - msg = msg .. "Change an active tanker's route mid-mission:\n" - msg = msg .. " 1. Place new waypoint markers\n" - msg = msg .. " 2. F10 → Custom Route → Reroute Active Tanker\n" - msg = msg .. " 3. Tanker immediately follows new route\n\n" - - msg = msg .. "Use cases:\n" - msg = msg .. " • Reposition for different theater\n" - msg = msg .. " • Avoid threat areas\n" - msg = msg .. " • Send tanker home (use :RTB)\n\n" - - msg = msg .. "━━━ NOTES ━━━\n\n" - msg = msg .. "• Markers are auto-deleted after use\n" - msg = msg .. "• Tankers auto-respawn after 3 minutes if lost\n" - msg = msg .. "• Use Emergency Tanker for 1-minute respawn\n" - msg = msg .. "• RTB finds nearest friendly airbase & lands\n" - msg = msg .. "• Check Tanker Status for current position/fuel\n" - - MESSAGE:New(msg, 45):ToBlue() -end - --- Function to reroute an active tanker with new waypoints -function RerouteTanker() - if not TANKER_STATE.KC135.active or not TANKER_STATE.KC135.group then - MESSAGE:New("KC-135 is not active! Spawn it first.", 10):ToBlue() - return - end - - -- Scan for waypoint markers - local waypoints, markerIds = ScanForWaypointMarkers(TANKER_CONFIG.KC135.callsign) - - if #waypoints < ROUTE_CONFIG.minWaypoints then - MESSAGE:New(string.format("Reroute requires at least %d waypoints!\nPlace markers: %s1, %s2, etc.", - ROUTE_CONFIG.minWaypoints, TANKER_CONFIG.KC135.callsign, TANKER_CONFIG.KC135.callsign), 15, "ERROR"):ToBlue() - return - end - - -- Build new route - local routePoints = {} - local routeDesc = "" - local hasRTB = false - - for i, wp in ipairs(waypoints) do - local parsed = ParseWaypointMarker(wp.markerText, TANKER_CONFIG.KC135.defaultAltitude, TANKER_CONFIG.KC135.defaultSpeed) - - if parsed.rtb then - hasRTB = true - local lastPos = #routePoints > 0 and routePoints[#routePoints].coord or TANKER_STATE.KC135.group:GetCoordinate() - local nearestAirbase = lastPos:GetClosestAirbase(Airbase.Category.AIRDROME, coalition.side.BLUE) - - if nearestAirbase then - local airbaseName = nearestAirbase:GetName() - local airbaseCoord = nearestAirbase:GetCoordinate() - routeDesc = routeDesc .. string.format("\n WP%d: RTB to %s", i, airbaseName) - - table.insert(routePoints, { - coord = airbaseCoord, - altitude = 0, - speed = parsed.speed, - rtb = true, - airbase = nearestAirbase, - airbaseName = airbaseName - }) - end - break - else - routeDesc = routeDesc .. string.format("\n WP%d: FL%03d @ %d kts", - i, math.floor(parsed.altitude / 100), parsed.speed) - table.insert(routePoints, { - coord = wp.coordinate, - altitude = parsed.altitude, - speed = parsed.speed, - rtb = false - }) - end - end - - -- Build task route - local taskRoute = {} - for i, rp in ipairs(routePoints) do - local wp - - if rp.rtb and rp.airbase then - wp = rp.coord:WaypointAirLanding( - rp.speed * 0.514444, - rp.airbase:GetDCSObject(), - {}, - "RTB" - ) - else - wp = rp.coord:WaypointAirFlyOverPoint( - COORDINATE.WaypointAltType.BARO, - rp.speed * 0.514444, - rp.altitude * 0.3048, - {}, - "WP" .. i - ) - - if not rp.rtb then - wp.task = { - id = "ComboTask", - params = { - tasks = { - {id = "Tanker", params = {}} - } - } - } - end - end - - table.insert(taskRoute, wp) - end - - -- Apply new route - TANKER_STATE.KC135.group:Route(taskRoute) - - MESSAGE:New(string.format("%s accepting new route with %d waypoints:%s", - TANKER_CONFIG.KC135.displayName, #routePoints, routeDesc), 20):ToBlue() - - -- Delete markers - if ROUTE_CONFIG.deleteMarkersAfterUse then - for _, markerId in ipairs(markerIds) do - trigger.action.removeMark(markerId) - end - end - - env.info(string.format("[TANKER] Rerouted %s with %d waypoints", TANKER_CONFIG.KC135.displayName, #routePoints)) -end - --- Function to reroute KC-135 MPRS -function RerouteTankerMPRS() - if not TANKER_STATE.KC135_MPRS.active or not TANKER_STATE.KC135_MPRS.group then - MESSAGE:New("KC-135 MPRS is not active! Spawn it first.", 10):ToBlue() - return - end - - local waypoints, markerIds = ScanForWaypointMarkers(TANKER_CONFIG.KC135_MPRS.callsign) - - if #waypoints < ROUTE_CONFIG.minWaypoints then - MESSAGE:New(string.format("Reroute requires at least %d waypoints!\nPlace markers: %s1, %s2, etc.", - ROUTE_CONFIG.minWaypoints, TANKER_CONFIG.KC135_MPRS.callsign, TANKER_CONFIG.KC135_MPRS.callsign), 15, "ERROR"):ToBlue() - return - end - - local routePoints = {} - local routeDesc = "" - local hasRTB = false - - for i, wp in ipairs(waypoints) do - local parsed = ParseWaypointMarker(wp.markerText, TANKER_CONFIG.KC135_MPRS.defaultAltitude, TANKER_CONFIG.KC135_MPRS.defaultSpeed) - - if parsed.rtb then - hasRTB = true - local lastPos = #routePoints > 0 and routePoints[#routePoints].coord or TANKER_STATE.KC135_MPRS.group:GetCoordinate() - local nearestAirbase = lastPos:GetClosestAirbase(Airbase.Category.AIRDROME, coalition.side.BLUE) - - if nearestAirbase then - local airbaseName = nearestAirbase:GetName() - local airbaseCoord = nearestAirbase:GetCoordinate() - routeDesc = routeDesc .. string.format("\n WP%d: RTB to %s", i, airbaseName) - - table.insert(routePoints, { - coord = airbaseCoord, - altitude = 0, - speed = parsed.speed, - rtb = true, - airbase = nearestAirbase, - airbaseName = airbaseName - }) - end - break - else - routeDesc = routeDesc .. string.format("\n WP%d: FL%03d @ %d kts", - i, math.floor(parsed.altitude / 100), parsed.speed) - table.insert(routePoints, { - coord = wp.coordinate, - altitude = parsed.altitude, - speed = parsed.speed, - rtb = false - }) - end - end - - local taskRoute = {} - for i, rp in ipairs(routePoints) do - local wp - - if rp.rtb and rp.airbase then - wp = rp.coord:WaypointAirLanding( - rp.speed * 0.514444, - rp.airbase:GetDCSObject(), - {}, - "RTB" - ) - else - wp = rp.coord:WaypointAirFlyOverPoint( - COORDINATE.WaypointAltType.BARO, - rp.speed * 0.514444, - rp.altitude * 0.3048, - {}, - "WP" .. i - ) - - if not rp.rtb then - wp.task = { - id = "ComboTask", - params = { - tasks = { - {id = "Tanker", params = {}} - } - } - } - end - end - - table.insert(taskRoute, wp) - end - - TANKER_STATE.KC135_MPRS.group:Route(taskRoute) - - MESSAGE:New(string.format("%s accepting new route with %d waypoints:%s", - TANKER_CONFIG.KC135_MPRS.displayName, #routePoints, routeDesc), 20):ToBlue() - - if ROUTE_CONFIG.deleteMarkersAfterUse then - for _, markerId in ipairs(markerIds) do - trigger.action.removeMark(markerId) - end - end - - env.info(string.format("[TANKER] Rerouted %s with %d waypoints", TANKER_CONFIG.KC135_MPRS.displayName, #routePoints)) -end - --- ============================================================================ --- MISSION MENU SETUP --- ============================================================================ - --- Create mission menu for tanker requests --- Integrates with MenuManager to place under "Mission Options" --- This keeps CTLD at F2 and AFAC at F3 as intended -if MenuManager and MenuManager.CreateCoalitionMenu then - -- Use MenuManager to create menu under "Mission Options" - MENU_TANKER_ROOT = MenuManager.CreateCoalitionMenu(coalition.side.BLUE, "Tanker Operations") - env.info("[TANKER] Using MenuManager - menu created under Mission Options") -else - -- Fallback: create root menu if MenuManager not available - MENU_TANKER_ROOT = MENU_COALITION:New(coalition.side.BLUE, "Tanker Operations") - env.warning("[TANKER] MenuManager not found - creating root menu (load MenuManager first!)") -end - --- Standard tanker spawns -MENU_KC135_LAUNCH = MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - "Launch " .. TANKER_CONFIG.KC135.displayName, - MENU_TANKER_ROOT, - SpawnTanker -) - -MENU_KC135_MPRS_LAUNCH = MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - "Launch " .. TANKER_CONFIG.KC135_MPRS.displayName, - MENU_TANKER_ROOT, - SpawnTankerMPRS -) - --- Custom route submenu -local MENU_CUSTOM_ROUTE = MENU_COALITION:New( - coalition.side.BLUE, - "Custom Route", - MENU_TANKER_ROOT -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - "How to Use Custom Routes", - MENU_CUSTOM_ROUTE, - ShowCustomRouteHelp -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - string.format("Launch %s (%s markers)", TANKER_CONFIG.KC135.displayName, TANKER_CONFIG.KC135.callsign), - MENU_CUSTOM_ROUTE, - SpawnCustomTanker -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - string.format("Launch %s (%s markers)", TANKER_CONFIG.KC135_MPRS.displayName, TANKER_CONFIG.KC135_MPRS.callsign), - MENU_CUSTOM_ROUTE, - SpawnCustomTankerMPRS -) - --- Reroute submenu for changing active tanker routes -local MENU_REROUTE = MENU_COALITION:New( - coalition.side.BLUE, - "Reroute Active Tanker", - MENU_CUSTOM_ROUTE -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - string.format("Reroute %s (%s markers)", TANKER_CONFIG.KC135.displayName, TANKER_CONFIG.KC135.callsign), - MENU_REROUTE, - RerouteTanker -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - string.format("Reroute %s (%s markers)", TANKER_CONFIG.KC135_MPRS.displayName, TANKER_CONFIG.KC135_MPRS.callsign), - MENU_REROUTE, - RerouteTankerMPRS -) - --- Emergency spawns submenu -local MENU_EMERGENCY = MENU_COALITION:New( - coalition.side.BLUE, - "Emergency Tanker", - MENU_TANKER_ROOT -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - string.format("Emergency %s (%s markers)", TANKER_CONFIG.KC135.displayName, TANKER_CONFIG.KC135.callsign), - MENU_EMERGENCY, - SpawnEmergencyTanker -) - -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - string.format("Emergency %s (%s markers)", TANKER_CONFIG.KC135_MPRS.displayName, TANKER_CONFIG.KC135_MPRS.callsign), - MENU_EMERGENCY, - SpawnEmergencyTankerMPRS -) - --- Status and info -MENU_COALITION_COMMAND:New( - coalition.side.BLUE, - "Tanker Status Report", - MENU_TANKER_ROOT, - ShowTankerStatus -) - --- ============================================================================ --- EVENT HANDLER REGISTRATION --- ============================================================================ - -BlueTankerEventHandler:HandleEvent(EVENTS.Birth) -BlueTankerEventHandler:HandleEvent(EVENTS.Dead) -BlueTankerEventHandler:HandleEvent(EVENTS.Crash) -BlueTankerEventHandler:HandleEvent(EVENTS.EngineShutdown) -BlueTankerEventHandler:HandleEvent(EVENTS.Hit) - -env.info("[TANKER] Tanker Management System initialized") -MESSAGE:New("Tanker Management System online - Use F10 menu to request tankers", 15):ToBlue() \ No newline at end of file diff --git a/Patch-MooseMissions/Download-MooseInclude.ps1 b/Patch-MooseMissions/Download-MooseInclude.ps1 deleted file mode 100644 index b04c7b2..0000000 --- a/Patch-MooseMissions/Download-MooseInclude.ps1 +++ /dev/null @@ -1,105 +0,0 @@ -# Download latest Moose_.lua from GitHub - -[CmdletBinding()] -param( - # Destination path for Moose_.lua. If not provided, defaults to repo root alongside Patch-MooseMissions folder - [Parameter(Mandatory=$false)] - [string]$MooseLuaPath, - - # Use -Force to actually download; otherwise runs in WhatIf/preview mode - [Parameter(Mandatory=$false)] - [switch]$Force -) - -# Resolve a robust script root that works even when dot-sourced or in older hosts -$__scriptRoot = $PSScriptRoot -if ([string]::IsNullOrWhiteSpace($__scriptRoot)) { - try { $__scriptRoot = Split-Path -Parent $PSCommandPath } catch {} -} -if ([string]::IsNullOrWhiteSpace($__scriptRoot)) { - try { $__scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path } catch {} -} - -# If destination wasn't provided, default to the repo root (parent of Patch-MooseMissions) -if ([string]::IsNullOrWhiteSpace($MooseLuaPath)) { - $parentOfScriptRoot = $__scriptRoot - if (-not [string]::IsNullOrWhiteSpace($parentOfScriptRoot)) { - try { $parentOfScriptRoot = Split-Path -Path $parentOfScriptRoot -Parent } catch { $parentOfScriptRoot = $null } - } - if ([string]::IsNullOrWhiteSpace($parentOfScriptRoot)) { - # Final fallback: current directory - $parentOfScriptRoot = (Get-Location).Path - } - $MooseLuaPath = Join-Path -Path $parentOfScriptRoot -ChildPath 'Moose_.lua' -} - -# Determine WhatIf mode (preview by default) -$runInWhatIfMode = -not $Force - -# Ensure destination directory exists (avoid null/invalid path issues) -if ([string]::IsNullOrWhiteSpace($MooseLuaPath)) { - throw "Destination path for Moose_.lua is empty. Provide -MooseLuaPath." -} - -$destDir = Split-Path -Path $MooseLuaPath -Parent -if (-not [string]::IsNullOrWhiteSpace($destDir) -and -not (Test-Path $destDir)) { - New-Item -Path $destDir -ItemType Directory -Force -WhatIf:$false | Out-Null -} - -# Enable TLS 1.2 for GitHub downloads on older environments -try { - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12 -} catch {} - -if (-not $runInWhatIfMode) { - Write-Host "Downloading latest Moose_.lua from GitHub..." -ForegroundColor Yellow - - $mooseGitHubUrl = "https://raw.githubusercontent.com/FlightControl-Master/MOOSE_INCLUDE/develop/Moose_Include_Static/Moose_.lua" - $backupPath = "$MooseLuaPath.backup" - - try { - # Create a single backup of existing Moose_.lua if it exists and backup doesn't exist yet - if ((Test-Path $MooseLuaPath) -and -not (Test-Path $backupPath)) { - Write-Host " Creating backup: $backupPath" -ForegroundColor Gray - Copy-Item $MooseLuaPath $backupPath -Force -WhatIf:$false - } - - # Download the file - $ProgressPreference = 'SilentlyContinue' # Speeds up Invoke-WebRequest - Invoke-WebRequest -Uri $mooseGitHubUrl -OutFile $MooseLuaPath -ErrorAction Stop - $ProgressPreference = 'Continue' - - # Verify the download - if (Test-Path $MooseLuaPath) { - $fileSize = (Get-Item $MooseLuaPath).Length - Write-Host " SUCCESS: Downloaded Moose_.lua ($([math]::Round($fileSize/1MB, 2)) MB)" -ForegroundColor Green - } else { - throw "Downloaded file not found after download" - } - } - catch { - Write-Error "Failed to download Moose_.lua from GitHub: $_" - Write-Host " URL: $mooseGitHubUrl" -ForegroundColor Red - - # Check if we have a backup or existing file to use - if (Test-Path $MooseLuaPath) { - Write-Warning "Using existing Moose_.lua file instead" - } else { - Write-Error "No Moose_.lua file available. Cannot proceed." - exit 1 - } - } - - Write-Host "" -} else { - Write-Host "WHATIF: Would download latest Moose_.lua from GitHub" -ForegroundColor Magenta - Write-Host " URL: https://raw.githubusercontent.com/FlightControl-Master/MOOSE_INCLUDE/develop/Moose_Include_Static/Moose_.lua" -ForegroundColor Gray - Write-Host " Destination: $MooseLuaPath" -ForegroundColor Gray - - # Still need to verify file exists for WhatIf to show what would be patched - if (-not (Test-Path $MooseLuaPath)) { - Write-Warning "Moose_.lua not found at $MooseLuaPath - run with -Force to download it" - Write-Warning "Continuing with WhatIf to show which missions would be processed..." - } - Write-Host "" -} \ No newline at end of file diff --git a/Patch-MooseMissions/Patch-MooseMissions.ps1 b/Patch-MooseMissions/Patch-MooseMissions.ps1 deleted file mode 100644 index e6e3909..0000000 --- a/Patch-MooseMissions/Patch-MooseMissions.ps1 +++ /dev/null @@ -1,306 +0,0 @@ -<# -.SYNOPSIS - Patches DCS mission files (.miz) with updated Lua scripts. - -.DESCRIPTION - This script extracts a DCS mission file (which is a ZIP archive), replaces or adds - a Lua script file, and repackages the mission. This allows you to update scripts - like Moose_.lua across multiple missions without opening the DCS Mission Editor. - -.PARAMETER MissionPath - Path to the .miz mission file to patch. Can be a single file or multiple files. - -.PARAMETER LuaScriptPath - Path to the Lua script file to insert/replace in the mission. - -.PARAMETER ScriptName - Optional. The name the script should have inside the mission file. - If not specified, uses the filename from LuaScriptPath. - -.PARAMETER OutputPath - Optional. Directory where patched missions should be saved. - If not specified, saves to the same directory as the input mission. - -.PARAMETER NoVersionIncrement - If specified, does not increment the version number in the filename. - By default, the script automatically increments the patch version (e.g., 1.1.2 -> 1.1.3). - WARNING: Using this flag will OVERWRITE the original mission file! - -.EXAMPLE - .\Patch-MooseMissions.ps1 -MissionPath "C:\Missions\MyMission-1.2.3.miz" -LuaScriptPath "C:\Scripts\Moose_.lua" - Creates: MyMission-1.2.4.miz (original 1.2.3 remains untouched) - -.EXAMPLE - Get-ChildItem "C:\Missions\*.miz" | .\Patch-MooseMissions.ps1 -LuaScriptPath "C:\Scripts\Moose_.lua" - -.EXAMPLE - .\Patch-MooseMissions.ps1 -MissionPath "Mission-2.1.miz" -LuaScriptPath "MyScript.lua" -NoVersionIncrement - WARNING: Overwrites Mission-2.1.miz - -.NOTES - Author: F99th-TracerFacer - Version: 2.0 - DCS mission files are ZIP archives containing a 'l10n' folder with a 'DEFAULT' subfolder - where Lua scripts are stored. -#> - -[CmdletBinding()] -param( - [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] - [Alias("FullName", "Path")] - [string[]]$MissionPath, - - [Parameter(Mandatory=$true)] - [string]$LuaScriptPath, - - [Parameter(Mandatory=$false)] - [string]$ScriptName, - - [Parameter(Mandatory=$false)] - [string]$OutputPath, - - [Parameter(Mandatory=$false)] - [switch]$NoVersionIncrement -) - -begin { - # Verify Lua script exists - if (-not (Test-Path $LuaScriptPath)) { - throw "Lua script not found: $LuaScriptPath" - } - - # Determine script name to use inside mission - if ([string]::IsNullOrWhiteSpace($ScriptName)) { - $ScriptName = Split-Path $LuaScriptPath -Leaf - } - - Write-Host "========================================" -ForegroundColor Cyan - Write-Host "DCS Mission Patcher" -ForegroundColor Cyan - Write-Host "========================================" -ForegroundColor Cyan - Write-Host "Lua Script: $ScriptName" -ForegroundColor Yellow - Write-Host "Source: $LuaScriptPath" -ForegroundColor Gray - Write-Host "Version Increment: $(if ($NoVersionIncrement) { 'Disabled (OVERWRITES ORIGINAL!)' } else { 'Enabled' })" -ForegroundColor $(if ($NoVersionIncrement) { 'Red' } else { 'Green' }) - Write-Host "" - - # Validate output path if specified - if ($OutputPath -and -not (Test-Path $OutputPath)) { - Write-Host "Creating output directory: $OutputPath" -ForegroundColor Yellow - New-Item -Path $OutputPath -ItemType Directory -Force -WhatIf:$false | Out-Null - } - - $successCount = 0 - $failCount = 0 - - # Function to increment version number in filename - function Get-IncrementedFilename { - param( - [string]$FileName - ) - - # Remove extension - $nameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($FileName) - $extension = [System.IO.Path]::GetExtension($FileName) - - # Try to find version patterns: X.Y.Z or X.Y or just X at the end - # Patterns to match (in order of specificity): - # 1. Major.Minor.Patch (e.g., 1.2.3) - # 2. Major.Minor (e.g., 1.2) - # 3. Just version number at end (e.g., v5 or -5) - - # Pattern 1: X.Y.Z (most common) - if ($nameWithoutExt -match '^(.+?)[-_\s]?(\d+)\.(\d+)\.(\d+)$') { - $baseName = $matches[1] - $major = $matches[2] - $minor = $matches[3] - $patch = [int]$matches[4] - $newPatch = $patch + 1 - $separator = if ($nameWithoutExt -match '[-_\s](\d+\.\d+\.\d+)$') { $matches[0][0] } else { '' } - return "$baseName$separator$major.$minor.$newPatch$extension" - } - # Pattern 2: X.Y - elseif ($nameWithoutExt -match '^(.+?)[-_\s]?(\d+)\.(\d+)$') { - $baseName = $matches[1] - $major = $matches[2] - $minor = [int]$matches[3] - $newMinor = $minor + 1 - $separator = if ($nameWithoutExt -match '[-_\s](\d+\.\d+)$') { $matches[0][0] } else { '' } - return "$baseName$separator$major.$newMinor$extension" - } - # Pattern 3: Just a number at the end - elseif ($nameWithoutExt -match '^(.+?)[-_\s]?(\d+)$') { - $baseName = $matches[1] - $version = [int]$matches[2] - $newVersion = $version + 1 - $separator = if ($nameWithoutExt -match '[-_\s]\d+$') { $matches[0][0] } else { '' } - return "$baseName$separator$newVersion$extension" - } - # No version found - append .1 - else { - return "$nameWithoutExt-1.0.1$extension" - } - } -} - -process { - foreach ($mission in $MissionPath) { - try { - # Resolve full path - $missionFile = Resolve-Path $mission -ErrorAction Stop - - Write-Host "Processing: " -NoNewline -ForegroundColor White - Write-Host "$missionFile" -ForegroundColor Cyan - - # Verify mission file exists and is a .miz file - if (-not (Test-Path $missionFile)) { - throw "Mission file not found: $missionFile" - } - - if ([System.IO.Path]::GetExtension($missionFile) -ne ".miz") { - throw "File is not a .miz mission file: $missionFile" - } - - # Create temporary extraction directory - $tempDir = Join-Path $env:TEMP ("DCS_Mission_Patch_" + [System.Guid]::NewGuid().ToString()) - New-Item -Path $tempDir -ItemType Directory -Force -WhatIf:$false | Out-Null - - try { - # Extract mission file (it's a ZIP archive) - # Use .NET classes instead of Expand-Archive for better .miz support - Write-Host " Extracting mission..." -ForegroundColor Gray - - Add-Type -Assembly System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($missionFile, $tempDir) - - # Determine Lua script destination in mission structure - # DCS stores Lua scripts in: l10n/DEFAULT/ folder - $luaDestDir = Join-Path $tempDir "l10n\DEFAULT" - - # Create directory if it doesn't exist - if (-not (Test-Path $luaDestDir)) { - Write-Host " Creating l10n/DEFAULT directory..." -ForegroundColor Yellow - New-Item -Path $luaDestDir -ItemType Directory -Force -WhatIf:$false | Out-Null - } - - $luaDestPath = Join-Path $luaDestDir $ScriptName - - # Check if script already exists - if (Test-Path $luaDestPath) { - Write-Host " Replacing existing script: $ScriptName" -ForegroundColor Yellow - } else { - Write-Host " Adding new script: $ScriptName" -ForegroundColor Green - } - - # Copy Lua script to mission - Copy-Item $LuaScriptPath $luaDestPath -Force -WhatIf:$false - - # Determine output filename and location - $originalFileName = Split-Path $missionFile -Leaf - - if ($NoVersionIncrement) { - # Keep original filename - $outputFileName = $originalFileName - } else { - # Increment version number - $outputFileName = Get-IncrementedFilename -FileName $originalFileName - Write-Host " Version increment: $originalFileName -> $outputFileName" -ForegroundColor Cyan - } - - # Determine output directory - if ($OutputPath) { - $outputDir = $OutputPath - } else { - $outputDir = Split-Path $missionFile -Parent - } - - $outputMission = Join-Path $outputDir $outputFileName - - # Remove existing mission file if it exists - if (Test-Path $outputMission) { - Remove-Item $outputMission -Force -WhatIf:$false - } - - # Repackage mission file - Write-Host " Repackaging mission..." -ForegroundColor Gray - - # Use .NET classes for better compatibility - Add-Type -Assembly System.IO.Compression.FileSystem - $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal - - # Create ZIP manually to ensure proper path separators (forward slashes required by ZIP spec) - # CreateFromDirectory uses backslashes on Windows which corrupts DCS mission files - $zipStream = New-Object System.IO.FileStream($outputMission, [System.IO.FileMode]::Create) - $archive = New-Object System.IO.Compression.ZipArchive($zipStream, [System.IO.Compression.ZipArchiveMode]::Create) - - try { - # Get all files in temp directory and add them to ZIP - $files = Get-ChildItem -Path $tempDir -Recurse -File - - foreach ($file in $files) { - # Get relative path for entry name - $relativePath = $file.FullName.Substring($tempDir.Length + 1) - # CRITICAL: Normalize path separators to forward slashes (ZIP standard) - # DCS will fail to load missions with backslashes in ZIP entry names - $entryName = $relativePath.Replace('\', '/') - - # Create entry in ZIP - $entry = $archive.CreateEntry($entryName, $compressionLevel) - - # Write file content to entry - $entryStream = $entry.Open() - try { - $fileStream = [System.IO.File]::OpenRead($file.FullName) - try { - $fileStream.CopyTo($entryStream) - } - finally { - $fileStream.Close() - } - } - finally { - $entryStream.Close() - } - } - } - finally { - $archive.Dispose() - $zipStream.Close() - } - - Write-Host " SUCCESS: Mission patched successfully!" -ForegroundColor Green - Write-Host " Output: $outputMission" -ForegroundColor Gray - Write-Host "" - - $successCount++ - } - finally { - # Clean up temporary directory - if (Test-Path $tempDir) { - Remove-Item $tempDir -Recurse -Force -WhatIf:$false - } - } - } - catch { - Write-Host " ERROR: $_" -ForegroundColor Red - Write-Host ""c - $failCount++ - } - } -} - -end { - Write-Host "========================================" -ForegroundColor Cyan - Write-Host "Patching Complete" -ForegroundColor Cyan - Write-Host "========================================" -ForegroundColor Cyan - Write-Host "Successful: $successCount" -ForegroundColor Green - Write-Host "Failed: $failCount" -ForegroundColor $(if ($failCount -gt 0) { "Red" } else { "Gray" }) - Write-Host "" - - if ($successCount -gt 0) { - if ($NoVersionIncrement) { - Write-Host "WARNING: Original mission files were OVERWRITTEN!" -ForegroundColor Red - } else { - Write-Host "INFO: Original mission files remain untouched. New versioned files created." -ForegroundColor Green - } - Write-Host "TIP: Test your patched missions in DCS before using them!" -ForegroundColor Yellow - } -} \ No newline at end of file diff --git a/Patch-MooseMissions/Patch-MyMooseMissions.ps1 b/Patch-MooseMissions/Patch-MyMooseMissions.ps1 deleted file mode 100644 index e3b84e3..0000000 --- a/Patch-MooseMissions/Patch-MyMooseMissions.ps1 +++ /dev/null @@ -1,384 +0,0 @@ -<# -.SYNOPSIS - Batch updates all DCS missions with the latest Moose framework. - -.DESCRIPTION - This script scans through the DCS mission development folder structure, - finds the latest version of each mission (.miz files with version numbers), - and patches them with the updated Moose_.lua script using Patch-MooseMissions.ps1. - - It processes missions in the structure: C:\DCS_MissionDev\DCS_[Terrain]\[MissionFolder]\ - For each mission folder, it identifies the latest version (by version number or file date) - and creates a new patched version. - -.PARAMETER RootPath - Root directory containing DCS terrain folders. Defaults to C:\DCS_MissionDev - -.PARAMETER MooseLuaPath - Path to the Moose_.lua file to patch into missions. Defaults to C:\DCS_MissionDev\Moose_.lua - -.PARAMETER WhatIf - Shows what would be processed without actually patching any files. - -.PARAMETER ExcludeTerrain - Array of terrain folder names to exclude from processing (e.g., @("DCS_Normandy", "DCS_Falklands")) - -.EXAMPLE - .\Patch-MyMooseMissions.ps1 - Shows what missions would be processed (WhatIf mode - no changes made) - -.EXAMPLE - .\Patch-MyMooseMissions.ps1 -Force - Actually patches all missions with the latest Moose_.lua - -.EXAMPLE - .\Patch-MyMooseMissions.ps1 -Force -ExcludeTerrain @("DCS_Normandy", "DCS_Falklands") - Processes all missions except those in Normandy and Falklands terrains - -.NOTES - Author: F99th-TracerFacer - Version: 1.0 - Requires: Patch-MooseMissions.ps1 in the same directory -#> - -[CmdletBinding()] -param( - [Parameter(Mandatory=$false)] - [string]$RootPath = "C:\DCS_MissionDev", - - [Parameter(Mandatory=$false)] - [string]$MooseLuaPath = "C:\DCS_MissionDev\Moose_.lua", - - [Parameter(Mandatory=$false)] - [string[]]$ExcludeTerrain = @(), - - [Parameter(Mandatory=$false)] - [switch]$Force -) - -Clear-Host - -# Enable WhatIf mode by default unless -Force is specified -$runInWhatIfMode = -not $Force - -if ($runInWhatIfMode) { - Write-Host "========================================" -ForegroundColor Magenta - Write-Host "RUNNING IN WHATIF MODE (Preview Only)" -ForegroundColor Magenta - Write-Host "No files will be modified" -ForegroundColor Magenta - Write-Host "Use -Force parameter to actually patch missions" -ForegroundColor Magenta - Write-Host "========================================" -ForegroundColor Magenta - Write-Host "" -} - -# Verify paths exist -if (-not (Test-Path $RootPath)) { - Write-Error "Root path not found: $RootPath" - exit 1 -} - -# Verify the Patch-MooseMissions.ps1 script exists -$patchScriptPath = Join-Path $PSScriptRoot "Patch-MooseMissions.ps1" -if (-not (Test-Path $patchScriptPath)) { - Write-Error "Patch-MooseMissions.ps1 not found in: $PSScriptRoot" - exit 1 -} - -Write-Host "========================================" -ForegroundColor Cyan -Write-Host "Batch Moose Mission Patcher" -ForegroundColor Cyan -Write-Host "========================================" -ForegroundColor Cyan -Write-Host "Root Path: $RootPath" -ForegroundColor Yellow -Write-Host "Moose Script: $MooseLuaPath" -ForegroundColor Yellow -Write-Host "Patch Script: $patchScriptPath" -ForegroundColor Yellow -if ($ExcludeTerrain.Count -gt 0) { - Write-Host "Excluded Terrains: $($ExcludeTerrain -join ', ')" -ForegroundColor Yellow -} -Write-Host "" - -# Download latest Moose_.lua from GitHub -if (-not $runInWhatIfMode) { - Write-Host "Downloading latest Moose_.lua from GitHub..." -ForegroundColor Yellow - - $mooseGitHubUrl = "https://raw.githubusercontent.com/FlightControl-Master/MOOSE_INCLUDE/develop/Moose_Include_Static/Moose_.lua" - $backupPath = "$MooseLuaPath.backup" - - try { - # Create a single backup of existing Moose_.lua if it exists and backup doesn't exist yet - if ((Test-Path $MooseLuaPath) -and -not (Test-Path $backupPath)) { - Write-Host " Creating backup: $backupPath" -ForegroundColor Gray - Copy-Item $MooseLuaPath $backupPath -Force -WhatIf:$false - } - - # Download the file - $ProgressPreference = 'SilentlyContinue' # Speeds up Invoke-WebRequest - Invoke-WebRequest -Uri $mooseGitHubUrl -OutFile $MooseLuaPath -ErrorAction Stop - $ProgressPreference = 'Continue' - - # Verify the download - if (Test-Path $MooseLuaPath) { - $fileSize = (Get-Item $MooseLuaPath).Length - Write-Host " SUCCESS: Downloaded Moose_.lua ($([math]::Round($fileSize/1MB, 2)) MB)" -ForegroundColor Green - } else { - throw "Downloaded file not found after download" - } - } - catch { - Write-Error "Failed to download Moose_.lua from GitHub: $_" - Write-Host " URL: $mooseGitHubUrl" -ForegroundColor Red - - # Check if we have a backup or existing file to use - if (Test-Path $MooseLuaPath) { - Write-Warning "Using existing Moose_.lua file instead" - } else { - Write-Error "No Moose_.lua file available. Cannot proceed." - exit 1 - } - } - - Write-Host "" -} else { - Write-Host "WHATIF: Would download latest Moose_.lua from GitHub" -ForegroundColor Magenta - Write-Host " URL: https://raw.githubusercontent.com/FlightControl-Master/MOOSE_INCLUDE/develop/Moose_Include_Static/Moose_.lua" -ForegroundColor Gray - Write-Host " Destination: $MooseLuaPath" -ForegroundColor Gray - - # Still need to verify file exists for WhatIf to show what would be patched - if (-not (Test-Path $MooseLuaPath)) { - Write-Warning "Moose_.lua not found at $MooseLuaPath - run with -Force to download it" - Write-Warning "Continuing with WhatIf to show which missions would be processed..." - } - Write-Host "" -} - -# Function to parse version number from filename -function Get-VersionNumber { - param([string]$FileName) - - $nameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($FileName) - - # Try X.Y.Z pattern - if ($nameWithoutExt -match '(\d+)\.(\d+)\.(\d+)') { - $major = [int]$matches[1] - $minor = [int]$matches[2] - $patch = [int]$matches[3] - return [PSCustomObject]@{ - Major = $major - Minor = $minor - Patch = $patch - Value = ($major * 1000000) + ($minor * 1000) + $patch - HasVersion = $true - } - } - # Try X.Y pattern - elseif ($nameWithoutExt -match '(\d+)\.(\d+)') { - $major = [int]$matches[1] - $minor = [int]$matches[2] - return [PSCustomObject]@{ - Major = $major - Minor = $minor - Patch = 0 - Value = ($major * 1000000) + ($minor * 1000) - HasVersion = $true - } - } - # Try single version number - elseif ($nameWithoutExt -match '(\d+)$') { - $version = [int]$matches[1] - return [PSCustomObject]@{ - Major = $version - Minor = 0 - Patch = 0 - Value = $version * 1000000 - HasVersion = $true - } - } - - # No version found - return [PSCustomObject]@{ - Major = 0 - Minor = 0 - Patch = 0 - Value = 0 - HasVersion = $false - } -} - -# Function to get the latest mission file from a directory -function Get-LatestMission { - param([string]$DirectoryPath) - - # Get all .miz files in the directory (not subdirectories) - $mizFiles = Get-ChildItem -Path $DirectoryPath -Filter "*.miz" -File -ErrorAction SilentlyContinue - - if ($mizFiles.Count -eq 0) { - return $null - } - - # Separate files with version numbers from those without - $versionedFiles = @() - $nonVersionedFiles = @() - - foreach ($file in $mizFiles) { - $version = Get-VersionNumber -FileName $file.Name - if ($version.HasVersion) { - $versionedFiles += [PSCustomObject]@{ - File = $file - Version = $version - } - } else { - $nonVersionedFiles += $file - } - } - - # If we have versioned files, return the one with the highest version - if ($versionedFiles.Count -gt 0) { - $latest = $versionedFiles | Sort-Object -Property { $_.Version.Value } -Descending | Select-Object -First 1 - return $latest.File - } - - # If no versioned files, return the most recently modified file - if ($nonVersionedFiles.Count -gt 0) { - return $nonVersionedFiles | Sort-Object -Property LastWriteTime -Descending | Select-Object -First 1 - } - - return $null -} - -# Get all DCS terrain folders (folders starting with "DCS_") -$terrainFolders = Get-ChildItem -Path $RootPath -Directory | Where-Object { $_.Name -match '^DCS_' } - -if ($terrainFolders.Count -eq 0) { - Write-Warning "No DCS terrain folders found in: $RootPath" - exit 0 -} - -Write-Host "Found $($terrainFolders.Count) terrain folder(s)" -ForegroundColor Green -Write-Host "" - -# Track statistics -$totalMissionsFound = 0 -$totalMissionsPatched = 0 -$totalMissionsFailed = 0 -$skippedTerrains = 0 - -# Process each terrain folder -foreach ($terrainFolder in $terrainFolders) { - $terrainName = $terrainFolder.Name - - # Check if this terrain should be excluded - if ($ExcludeTerrain -contains $terrainName) { - Write-Host "SKIPPING TERRAIN: $terrainName (excluded)" -ForegroundColor DarkGray - $skippedTerrains++ - continue - } - - Write-Host "TERRAIN: $terrainName" -ForegroundColor Cyan - - # Get all subdirectories (mission folders) - $missionFolders = Get-ChildItem -Path $terrainFolder.FullName -Directory -ErrorAction SilentlyContinue - - if ($missionFolders.Count -eq 0) { - Write-Host " No mission folders found" -ForegroundColor DarkGray - Write-Host "" - continue - } - - Write-Host " Found $($missionFolders.Count) mission folder(s)" -ForegroundColor Gray - - # Process each mission folder - foreach ($missionFolder in $missionFolders) { - $missionFolderName = $missionFolder.Name - - # Get the latest mission file - $latestMission = Get-LatestMission -DirectoryPath $missionFolder.FullName - - if ($null -eq $latestMission) { - Write-Host " [$missionFolderName] No .miz files found" -ForegroundColor DarkGray - continue - } - - $totalMissionsFound++ - - Write-Host " [$missionFolderName] Latest: " -NoNewline -ForegroundColor White - Write-Host "$($latestMission.Name)" -ForegroundColor Yellow - - # Execute the patch script - if (-not $runInWhatIfMode) { - try { - # Get the expected new filename before patching - $expectedNewFile = $null - $originalFileName = $latestMission.Name - $missionDir = $latestMission.DirectoryName - - # Calculate what the new version filename should be (simplified version increment logic) - $nameWithoutExt = [System.IO.Path]::GetFileNameWithoutExtension($originalFileName) - $extension = [System.IO.Path]::GetExtension($originalFileName) - - if ($nameWithoutExt -match '^(.+?)[-_\s]?(\d+)\.(\d+)\.(\d+)$') { - $baseName = $matches[1] - $major = $matches[2] - $minor = $matches[3] - $patch = [int]$matches[4] + 1 - $separator = if ($nameWithoutExt -match '[-_\s](\d+\.\d+\.\d+)$') { $matches[0][0] } else { '' } - $expectedNewFile = Join-Path $missionDir "$baseName$separator$major.$minor.$patch$extension" - } - elseif ($nameWithoutExt -match '^(.+?)[-_\s]?(\d+)\.(\d+)$') { - $baseName = $matches[1] - $major = $matches[2] - $minor = [int]$matches[3] + 1 - $separator = if ($nameWithoutExt -match '[-_\s](\d+\.\d+)$') { $matches[0][0] } else { '' } - $expectedNewFile = Join-Path $missionDir "$baseName$separator$major.$minor$extension" - } - - # Capture output from Patch-MooseMissions.ps1 - $patchOutput = & $patchScriptPath -MissionPath $latestMission.FullName -LuaScriptPath $MooseLuaPath 2>&1 - - # Display the output - $patchOutput | ForEach-Object { Write-Output $_ } - - # Check if it succeeded by verifying the new file was created - $patchSucceeded = $false - if ($expectedNewFile -and (Test-Path $expectedNewFile)) { - $patchSucceeded = $true - } - - if ($patchSucceeded) { - $totalMissionsPatched++ - } else { - $totalMissionsFailed++ - Write-Host " Mission patch failed - new version file not created" -ForegroundColor Red - } - } - catch { - Write-Host " ERROR: Failed to execute patch script - $_" -ForegroundColor Red - $totalMissionsFailed++ - } - } - else { - Write-Host " WHATIF: Would patch this mission with Moose_.lua" -ForegroundColor Magenta - } - } - - Write-Host "" -} - -# Final summary -Write-Host "========================================" -ForegroundColor Cyan -Write-Host "Batch Processing Complete" -ForegroundColor Cyan -Write-Host "========================================" -ForegroundColor Cyan -Write-Host "Terrains Processed: $($terrainFolders.Count - $skippedTerrains)" -ForegroundColor White -if ($skippedTerrains -gt 0) { - Write-Host "Terrains Skipped: $skippedTerrains" -ForegroundColor DarkGray -} -Write-Host "Missions Found: $totalMissionsFound" -ForegroundColor White -Write-Host "Missions Patched: $totalMissionsPatched" -ForegroundColor Green -if ($totalMissionsFailed -gt 0) { - Write-Host "Missions Failed: $totalMissionsFailed" -ForegroundColor Red -} -Write-Host "" - -if ($runInWhatIfMode) { - Write-Host "INFO: This was a WhatIf run - no files were modified" -ForegroundColor Magenta - Write-Host "INFO: Run with -Force parameter to actually patch missions" -ForegroundColor Magenta -} elseif ($totalMissionsPatched -gt 0) { - Write-Host "SUCCESS: All missions have been patched with the latest Moose framework!" -ForegroundColor Green - Write-Host "TIP: Test your patched missions in DCS before deployment!" -ForegroundColor Yellow -} diff --git a/Patch-MooseMissions/README.md b/Patch-MooseMissions/README.md deleted file mode 100644 index d6032b9..0000000 --- a/Patch-MooseMissions/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# DCS Mission Patcher - -PowerShell script to automatically patch DCS mission files (.miz) with updated Lua scripts and increment version numbers. - -## Features - -- ✅ Updates Lua scripts in .miz files without opening DCS Mission Editor -- ✅ **Automatically increments version numbers** in mission filenames (e.g., 1.2.3 → 1.2.4) -- ✅ **Preserves original missions** - creates new versioned files instead of overwriting -- ✅ Supports single or batch processing of multiple missions -- ✅ Can output to a different directory -- ✅ Handles both new script insertion and existing script replacement -- ✅ Pipeline support for processing multiple missions -- ✅ Smart version detection (supports X.Y.Z, X.Y, and X formats) - -## Version Increment Examples - -| Input Filename | Output Filename | -|----------------|-----------------| -| `Mission-1.2.3.miz` | `Mission-1.2.4.miz` | -| `Operation Black Gold 2.8.miz` | `Operation Black Gold 2.9.miz` | -| `F99th-Battle of Gori 1.3.miz` | `F99th-Battle of Gori 1.4.miz` | -| `MyMission-5.miz` | `MyMission-6.miz` | -| `Test.miz` | `Test-1.0.1.miz` | - -## Usage - -### Get the latest Moose_.lua - -Use the helper script to fetch the latest Moose_.lua into the repo root (C:\DCS_MissionDev\Moose_.lua by default): - -```powershell -# Preview (no changes) -./Download-MooseInclude.ps1 - -# Actually download -./Download-MooseInclude.ps1 -Force - -# Optional: choose a different destination -./Download-MooseInclude.ps1 -Force -MooseLuaPath 'D:\Scripts\Moose_.lua' -``` - -If your system blocks script execution, temporarily allow scripts for the current session only: - -```powershell -Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -``` - -### Basic Usage - -Update a mission with automatic version increment: - -```powershell -.\Patch-MooseMissions.ps1 -MissionPath "MyMission-1.2.3.miz" -LuaScriptPath "Moose_.lua" -# Original: MyMission-1.2.3.miz (untouched) -# Creates: MyMission-1.2.4.miz -``` - -### Batch Processing - -Update all .miz files in a directory: - -```powershell -Get-ChildItem "C:\DCS_Missions\*.miz" | .\Patch-MooseMissions.ps1 -LuaScriptPath "C:\Scripts\Moose_.lua" -# Each mission gets a new version -``` - -### Output to Different Directory - -Patch missions and save versioned outputs to a different folder: - -```powershell -.\Patch-MooseMissions.ps1 -MissionPath "Mission-1.5.miz" -LuaScriptPath "Moose_.lua" -OutputPath "C:\PatchedMissions" -# Creates: C:\PatchedMissions\Mission-1.6.miz -``` - -### Disable Version Increment (CAUTION!) - -⚠️ Overwrite the original mission file without creating a new version: - -```powershell -.\Patch-MooseMissions.ps1 -MissionPath "Mission-1.2.3.miz" -LuaScriptPath "Moose_.lua" -NoVersionIncrement -# WARNING: Overwrites Mission-1.2.3.miz (original is lost!) -``` - -### Custom Script Name - -Insert a script with a different name than the source file: - -```powershell -.\Patch-MooseMissions.ps1 -MissionPath "Mission.miz" -LuaScriptPath "MyScript.lua" -ScriptName "CustomName.lua" -``` - -## Parameters - -| Parameter | Required | Description | -|-----------|----------|-------------| -| `-MissionPath` | Yes | Path to .miz mission file(s) to patch | -| `-LuaScriptPath` | Yes | Path to the Lua script to insert/replace | -| `-ScriptName` | No | Name for the script inside the mission (defaults to source filename) | -| `-OutputPath` | No | Directory for patched missions (defaults to source directory) | -| `-NoVersionIncrement` | No | **CAUTION:** Overwrites original instead of creating new version | - -## Examples - -### Example 1: Update All Caucasus Missions with Version Increment - -```powershell -Get-ChildItem "C:\DCS_MissionDev\DCS_Caucasus\*.miz" | .\Patch-MooseMissions.ps1 -LuaScriptPath "C:\Moose\Moose_.lua" -# Each mission gets a new version: 1.2.miz -> 1.3.miz -# Originals remain untouched -``` - -### Example 2: Update Specific Missions to Output Folder - -```powershell -$missions = @( - "F99th-Operation Black Gold 2.8.miz", - "F99th-Operation Ronin 1.4.miz", - "F99th-Battle of Gori 1.3.miz" -) - -$missions | .\Patch-MooseMissions.ps1 -LuaScriptPath "Moose_.lua" -OutputPath "C:\UpdatedMissions" -# Creates: Operation Black Gold 2.9.miz, Operation Ronin 1.5.miz, Battle of Gori 1.4.miz in C:\UpdatedMissions -``` - -### Example 3: Overwrite Original (Use with Caution) - -```powershell -.\Patch-MooseMissions.ps1 -MissionPath "TestMission-1.0.miz" -LuaScriptPath "Moose_.lua" -NoVersionIncrement -# WARNING: Overwrites TestMission-1.0.miz (original is lost) -``` - -## How It Works - -1. **Extraction**: The script treats .miz files as ZIP archives and extracts them to a temporary directory -2. **Script Replacement**: Locates the Lua script in `l10n/DEFAULT/` folder and replaces/adds it -3. **Version Increment**: Automatically detects version pattern and increments the patch number -4. **Repackaging**: Compresses the modified mission into a new .miz file with incremented version -5. **Cleanup**: Removes temporary files - -## Version Detection Logic - -The script intelligently detects and increments version numbers: - -- **X.Y.Z format** (e.g., `Mission-1.2.3.miz`) → Increments Z: `Mission-1.2.4.miz` -- **X.Y format** (e.g., `Mission-2.8.miz`) → Increments Y: `Mission-2.9.miz` -- **X format** (e.g., `Mission-5.miz`) → Increments X: `Mission-6.miz` -- **No version** (e.g., `Mission.miz`) → Adds version: `Mission-1.0.1.miz` - -Supports various separators: `-`, `_`, or space - -## Mission File Structure - -DCS mission files (.miz) are ZIP archives with this structure: - -``` -Mission.miz -├── mission -├── options -├── warehouses -├── l10n/ -│ └── DEFAULT/ -│ ├── dictionary -│ ├── mapResource -│ └── *.lua ← Scripts are stored here -``` - -## Important Notes - -⚠️ **Always test patched missions** before using them in production or multiplayer! - -⚠️ **Originals are safe**: By default, the script creates NEW versioned files and never modifies originals - -⚠️ **Script order matters**: If your mission has script load order dependencies, this tool only replaces the file content, not the trigger order - -⚠️ **Version increment default**: By default, versions are incremented. Use `-NoVersionIncrement` to overwrite originals (NOT recommended) - -✅ **Safe for**: Updating framework files like Moose_.lua, mist.lua, or any embedded Lua script - -✅ **Preserves originals**: Original missions remain untouched (new versioned files are created) - -✅ **No backups needed**: Since originals aren't modified, you always have your previous version - -## Troubleshooting - -### "File is not a .miz mission file" -- Ensure you're pointing to a valid .miz file, not a .lua or other file type - -### "Lua script not found" -- Verify the path to your Lua script is correct and the file exists - -### Mission doesn't work after patching -- Restore from backup -- Verify the Lua script is valid -- Check DCS.log for script errors -- Ensure you updated the correct script name - -### Permission errors -- Run PowerShell as Administrator if modifying files in protected directories -- Ensure mission files are not read-only - -## Requirements - -- Windows PowerShell 5.1 or later (or PowerShell Core 7+) -- Write permissions to mission file locations -- Valid .miz mission files -- Valid Lua script to insert - -## Author - -**F99th-TracerFacer** - -Discord: https://discord.gg/7wBVWKK3 - -## License - -Free to use and modify for the DCS community.