A random air and ground mission generator supporting all WW2 aircraft, ships, and ground units.
REQUIRES WW2 ASSET PACK*
Let's face it. Your warbirds are in the hanger, along with your WW2 asset pack and Normandy map, collecting dust.
I know, I know, there aren't a lot of reasons to see them anymore.
The missions you go on are nothing like they used to be, happy endings are rare, and Jeff has been lookin' damn fine.
Your moves get stale, you and the ol' birds slowly lose touch.
C'est la vie, right?
WRONG!
Put on your best flight suit, grab hard on your stick, and take those hanger queens to see GREG!
You won't know what you'll be flying, who you'll be fighting, or where you'll finish ;)
Greg will populate the map with air and ground units before throwing you in one of your aircraft with a random mission and loadout.
Give it a fly!
INSTRUCTIONS:
1) Open this mission in the mission editor and delete the aircraft you don't own.
2) Start the mission and sel ect the "RANDOM" Su-25t role on the BLUE side (or a different aircraft you really want to fly).
Within seconds, you will be flying a random aircraft with a random loadout among random friends and enemies.
Greg will spawn all units, INCLUDING YOU, at random speeds and altitudes, after the mission has loaded.
How does is it work:
Greg will generate targets for the for red and blue sides inside their respective zones called "red_spawn" and "blue_spawn".
Based on the units generated, GREG will allow Fighter Sweep, CAP, SEAD, CAS, or Anti-ship missions.
GREG will choose an aircraft for the player, pick a team based on it, and spawn the player within their team's zone with one of the above missions assigned and a loadout to match.
Any generated AI units will either be stationary or moving towards their side's bullseye.
Move the bullseyes around to change the respective side's target destination.
Move the zones around or change the size of them to control where the units spawn.
If you're a masochist, put both zones and both bullseyes all on the same exact spot ;)
Greg is set by default to smoke targets.
To change this, go to the triggers page, find the "---SETTINGS--" doscript trigger and change the "smoke_targets = true" to "smoke_targets = false"
At the moment, Greg doesn't create elaborate missions with strike packages and escorts with desired times on target and stuff.
While not super deep, Greg does some thinking about the missions he creates, like making sure he's not spawning p-51s at 80k feet anymore.
Sel ect Random Player Aircraft:
Greg can't figure out what the player owns, so he scans the map for flyable aircraft that are set to "late activation" to add to the player's plane list.
He can't scan aircraft set to "Client" so I needed to place AI aircraft for him in the mission.
FOR THE RANDOM PLAYER AIRCRAFT TO WORK, you need to delete the aircraft you don't own or don't want to fly in the mission editor.
To select the random player aircraft option after starting the mission, choose the Su-25T role labelled "RANDOM" on the blue side.
Once loaded, you'll be in a Su-25t and the first scripts will load, setting up Greg.
Then the main Greg script will load. Your system will hang for a period of time 5 to 20 seconds, depending on how many units you're spawning and how powerful your PC is.
Then you will be in your aircraft ready for battle!
For Nerds/Deeper customization:
In the mission editor, go to the triggers page.
There are two triggers, the first for settings, the other for the main Greg script
On the first/settings trigger, labelled "SETTINGS", there are 3 script runs.
The first, "(--DON'T EDIT---)", is where all the aircraft and other things are defined. You shouldn't edit this unless you know what you're doing.
The second, "(--EDIT LISTS---)", contains lists covering which units, missions, and start types are allowed for blue, red, and the player.
Before we continue, it is easiest to press Ctrl+A in the script text box to select all so you can copy and paste the whole code to a text editor.
Anyway,
One of the lists looks like this:
[Group.Category.GROUND] =
{
--"SAM",
"ARTILLERY",
--"RADAR",
"ARMOR",
"AAA",
--"UNARMED",
"INFANTRY",
},
This is the ground unit types list for the red side. You can see that we have disabled SAM, RADAR and UNARMED by adding two dashes (--) in front of those options.
So if you only want AAA for ground units, you would add an "--" in front of everything else like below:
[Group.Category.GROUND] =
{
"SAM",
--"ARTILLERY",
--"RADAR",
--"ARMOR",
--"AAA",
--"UNARMED",
--"INFANTRY",
},
--CHANGE START TYPES
Closer to the bottom of the same (--EDIT LISTS) script, you will find the player lists. There is a list for start types called:
["STARTS"] =
{
"turnpoint",
"runway",
--"parkhot",
--"parkcold",
},
To enable airbase spawning (everything but "turnpoint"), airbases need to be set in the mission editor for the coalitions needing bases to spawn at.
Click on the name of an airbase in the mission editor and set the coalition to the side you want. Greg will try and use the closest airbase to the spawn zone.
--CHANGE GREG SETTINGS
The third DO SCRIPT, "(--SETTINGS)", contains all the settings for Greg. There are two sets of identical settings. 1 for the blue/blue side and 1 for the red.
It looks like this:
guns_only = 0 (This will remove all equipment fr om pylons leaving aircraft with their internal guns. You can also select the "RANDOM GUNS ONLY" Su-25t)
smoke_targets = true (Greg will put blue smoke on blue ground and naval targets and red smoke on thems)
player_side = "randomish" (this can be set to "red", "blue", "random", or "randomish")
disable_player = false (if you want to use your own player unit in the mission editor with your favorite loadout, disable_player = true will still spawn all the other greg units).
choose_player_from_mission = true (you might have noticed a list of aircraft for the player in the lists script. If I didn't want to place all those units I made you delete, I'd set this to false and greg would refer to the list instead)
--blue SETTINGS
greg_settings =
{
[coalition.side.BLUE] =
{
["unit_per_group"] = {["min"] = 2, ["max"] = 4}, --how many units spawn in each group. aircraft groups have a dcs cap of 4
["plane_group_number"] = {["min"] = 2, ["max"] = 4}, --how many plane groups to spawn
["heli_group_number"] = {["min"] = 0, ["max"] = 0}, --(spawn between 0 heli groups)
["ground_group_number"] = {["min"] = 3, ["max"] = 6},
["awacs_enabled"] = 0, --0 is off, 1 is on, anything else is random.
["spawn"] = trigger.misc.getZone("blue_spawn"), --sets spawn to the blue_spawn zone
["target"] = coalition.getMainRefPoint(coalition.side.BLUE), --sets the target for blue groups to the blue bullseye
},
}
--START FLYING
After editing the settings for both groups, launch the mission.
Once loaded, the first scripts will load, setting up Greg.
Then the main Greg script will load. Your system will hang for a period of time 5 to 20 seconds, depending on how many units you're spawning and how powerful your PC is.
Then you will be in one of the allowed player aircraft ready for battle!
*WW2 Asset Pack Requirement
By default, GREG uses the units included in the WW2 asset pack when choosing AAA, Artillery, Ship, Armor, Infantry, or Unarmed unit types.
The easiest way to bypass this requirement is to disable ground units.
Go to the SETTINGS trigger page and look for the "---SETTINGS---" do script.
Find the below line
["ground_group_number"] = {["min"] = 2, ["max"] = 3},
And change both numbers to 0 so it looks like this:
["ground_group_number"] = {["min"] = 0, ["max"] = 0}
You will need to do this twice, once for the red side and once for the blue.
You could also switch out all the WW2 units with units that come with the base game.
To do this, find the "--EDIT LISTS---" in the triggers page and scroll down until you see one the above categories for the red and blue sides.
The infantry list for blue looks like this:
["INFANTRY"] =
{
--"Soldier M4",
--"Soldier M249",
--"Infantry AK",
--"Paratrooper AKS-74",
--"Paratrooper RPG-16",
--WW2 pack below
"soldier_wwii_br_01",
"soldier_wwii_us",
--"soldier_mauser98",
},
If you delete the "--" fr om the non ww2 units and add "--" to the br_01 and us soldier, you'll have disabled WW2 pack infantry.
About:
GREG Stands for "GREG Random Engagement Generator", and is a project I've had a lot of fun working on the last few months.
I used some sounds provided to the hoggit community by deadlyfishes. He's the guy behind the very popular "Through the Inferno" missions.
I'd check out his website, https://throughtheinferno.com/, if you haven't heard of them. They're awesome.
Thanks deadlyfishes!
This mission is the fourth GREG mission, but the first focusing on WW2 combat!
It's also the first release with air and ground missions enabled by default!
"GREG - Gulf Random Engagement Generator" is the original which currently runs a way older version of Greg.
"GREG - Random Air Battles" is GREG, but focused on air to air combat in the Caucasus.
"GREG - Caucasus Ground Attack" is GREG, but, you guessed it, focused on ground combat in the Caucasus.
I am a novice programmer so I'm sure it's full of bugs, but it's been a blast!
Let me know what you think!
--Ltp0wer
Change log:
--Initial release