The Gulf Random Engagement Generator! (WIP)
A random aircraft battle generator for a variety of aircraft in the Persian gulf.
-Currently supported aircraft:
F/A-18C, F-14B, AJS-37, C-101, F-15C, F-5E, F-86F, M-2000C, Mig-19P, Mig-21, Mig-29, Su-27, Su-33, J-11A, A-10A, A-10C, AV-8B NA, and the Su-25T
With Greg, you can generate random engagements within parameters you set.
Adjust the settings in the mission editor, hit fly, and random blue and red groups are generated, ready to fight!
Do you want to hone your BVR skills?
Greg will throw you into countless engagements with F-14s, Su-27s, J-11s, and F-16s to test your ability to dodge a variety of missiles!
Are you an adrenaline junkie?
Greg will generate endless 5 mile fur balls with F-16s, F-15s, F/A-18s, and Mirages fighting Su-27s, Su-33s, Mig-29s, and J-11s!
Do you just want variety?
When Greg is setup completely random, you won't know what's coming, going, how many, or even what you'll be flying!
How does Greg work?
Greg works by spawning aircraft you choose, including the player, in the air in an area around the coalition's bullseye.
The default settings are setup for random BVR engagements and you can adjust things as you go.
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 the three lists for blue, red, and player aircraft, as well as the missions list.
One looks like this:
(more and more...)
To disable an aircraft fr om the blue spawn pool, you would add an "--" in front of the aircraft you want to ban.
In the above list for the blue team, only F-14Bs and F-15Cs will spawn.
To start, the only player aircraft enabled is the Su-25T, because everyone has it. The Frogfoot and Greg are now "friends"
You will need to edit the player_aircraft_types list to select/randomize your plane. If you only wish to fly as one plane, you will have to disable all the other aircraft in the player_aircraft_types list.
At the bottom of the same (--EDIT LISTS) script, you will also see the mission_types list. Again, use two dashes "--" in front of the mission type to deactivate it.
For example, if you only want Fighter Sweep missions, your list would look like:
--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 --Both sides are limited to built in guns only. Aircraft with guns as added pylons won't have them. Also poor CAS and SEAD guys...
blue_acpergroup_min = 2 --Create at least 2 aircraft in each group/flight
blue_acpergroup_max = 4 --Create No more than 4 aircraft in each group created. 4 is the maximum for this setting.
blue_groups_min = 3 --At least 3 blue groups will be created
blue_groups_max = 5 --No more than 5 groups will be created
blue_distance_min = 45000 --Groups will be spawned at least 45000 meters away from coalition bullseye
blue_distance_max = 70000 --Groups will be spawned no more than 70000 meters away from coalition bullseye
blue_alt_min = 5000 --meters
blue_alt_max = 10000--meters
blue_speed_min = 250 --meters per second
blue_speed_max = 300 --meters per second
blue_spawn_bearing_min = 340 --This is the minimum bearing from the bullseye blue groups will spawn. North is 0.
blue_spawn_bearing_max = 20 --Groups will spawn in a 40 degree spread north of their bullseye (340 to 20 degrees)
blue_destination_bearing_min = 160 --This is the minimum bearing off the red bullseye blue groups will fly towards
blue_destination_bearing_max = 200 --With these numbers, Groups will head to the area south of the red bullseye in a 40 degree spread
blue_awacs_enabled = -1 --0 is off, 1 is on, anything else is random. I like -1 for no particular reason
So with all the blue settings above, Greg will generate 3 to 5 flights of 2 to 4 aircraft each of F-14Bs and F-15Cs on Fighter Sweep missions.
They will spawn 45 to 70 thousand meters north of the blue bullseye and head towards the southern part of the enemy bullseye, flying between 5000 and 10000 meters between 250 and 300 meters per second.
AWACS has a 50% chance of spawning.
Move the bullseyes around to change the spawn zones/engagement distance.
After editing the settings for both groups, launch the mission.
Once loaded, you'll be in a Su-25t and the first scripts will load, setting up Greg.
Then the man himself, Greg 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!
Mission Info/Defaults: What will happen if you just click fly right now.
By default, the F/A-18 is the only player aircraft enabled. Change this referring to the instructions above.
The blue and red bullseyes are opposite sides of the straight for some over the water BVR action.
The aircraft are setup to spawn in a cluster 50km around their bullseye.
For variety, Greg is allowed to spawn most of the "modern" aircraft for Red and Blue.
The only mission enabled is the fighter sweep. SEAD and CAS are in WIP but work.
AWACs is random for both sides. Datalink is enabled on all applicable aircraft so it is really helpful for player and AI.
It'll be 3 to 5 groups of 2 to 4 aircraft each. Sometimes it'll be unfair, sometimes it'll be balanced.
You can change all the above to suit your play style.
Currently, GREG only does air starts and only spawns aircraft.
Support for ground units is on the horizon, but in the meantime, the mission that comes with GREG has SAM sites and some static units for the CAS and SEAD missions, thanks to OfficerAMR.
For the fighter sweep mission, I tried to set loadouts up with a good BVR/WVR balance, but I don't know all the aircraft very well.
Same goes for the CAS and SEAD loadouts. I aimed for something easy for the AI to use, but hopefully not too boring for the player.
The liveries are now based on coalition. I aimed for gray/less pattern for BLUE, and desert colors/tiger pattern for RED. I wish more liveries were available. If you have suggestions for builtin ones I should be using, let me know.
Players are on the same radio as their group, and awacs should automatically be active as well.
I'd like to add the prop birds at some point.
I also want to add more waypoints to the generated flights, including take-off and landing eventually.
AWACS doesn't always spawn in the right place, especially noticeable if the bullseyes are close together.
I used "Persian Gulf SAM/ASW/BASE template" by OfficerAMR on the user files section.
This template adds SAM sites, oil rigs, static units to airfields, and more. I highly recommend it for basing missions on.
I got inspired to make this because I really enjoyed the F/A-18 BVR 8v8 instant action mission but quickly grew tired of the predictibility after playing it a few dozen times.
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!
--Initial v.b release
--Radio channels assigned dynamically. Flights are now on the same channel, player should automatically have their flight and awacs programmed in.
--callsigns now assigned dynamically (WIP)
--livery now based on coalition (WIP)
--fixed embarrasing bug that would cause lua error if a unit was generated to point EXACTLY N, E, S, or W.
--optimized huge chunks of code, but added so many unoptimized features I can no longer tell...
--reworked waypoint system. unit target waypoint is now based off enemy coalition bullseye. This makes so much more sense.
--added initial support for CAS and SEAD missions. this meant reworking how Greg assigns tasks and loadouts
--added CAS and SEAD loadouts to already supported aircraft, wh ere applicable
--added a10a, a10c, av8bna, and su25t now that we have CAS and SEAD
--added list pruning process to ensure only aircraft capable of selected missions are used
--added better briefing for player at start of mission and as aircraft crash
--Release of v.c