OpForAC - Opposing Force AI Aircraft script

Home > User Files > OpForAC - Opposing Force AI Aircraft script
DCS World 2.7
Sonstige

OpForAC - Opposing Force AI Aircraft script

Typ - Sonstige
Hochgeladen von - AKA_Relent
Datum - 26.07.2023 00:36:43
Map - Any map
This script will spawn 1-4 opposing force AI aircraft (repeatable), which can be fighter, attack, bomber, trainer aircraft, or helicopter types.  AI aircraft types, engagement scenarios (i.e. BVR, ACM) and pre-set spawn distances are selectable from the F10 menu, under the F10 menu item: "Spawn AI OpFor Aircraft At Will".

See the main/first image to the left to see some of the F10 menu items.

by AKA_Relent

*************************
***** Instructions: *****
*************************

*** Loading script: ***

1) Unzip the OpForAC Zip archive to desired folder

2) Load the script in the DCS mission editor by first clicking the "Set rules for trigger" button on the left vertical tool bar.

3) Next, click the "NEW" button under the TRIGGERS, CONDITIONS, and ACTIONS columns, as described below:

Single Player (SP) missions (i.e. with one Player aircraft/helicopter, NO Clients):
    TRIGGERS: Set trigger to MISSION START (will not work in SP otherwise)
    ACTIONS: Set action to DO SCRIPT FILE, then navigate to and sel ect OpForAC.lua script

Multi Player (MP) missions (i.e. with one or more Client aircraft/helicopter):
    Option 1:
        TRIGGERS: Set trigger to MISSION START
        ACTIONS: Set action to DO SCRIPT FILE, then navigate to and sel ect OpForAC.lua script
    Option 2: (if there are issues loading script at mission start)
        TRIGGERS: Set trigger to ONCE
        CONDITIONS: Set condition to TIME MORE(x) (where x = desired delay in seconds fr om mission start)
        ACTIONS: Set action to DO SCRIPT FILE, then navigate to and sel ect OpForAC.lua script
        NOTE: With this option, before you spawn in an aircraft, un-pause the mission first, or the script will not have loaded yet


*** Coalitions: ***

4) To avoid blue-on-blue/neutral engagements, the script assumes the following countries are on the coalitions listed (NOTE: This is the default condition when creating a new mission.  However,     older missions may not have all of these countries mapped to the coalitions listed).

Please verify and if necessary, assign to the coalitions listed below.  Click the "Changing coalitions" button on the left vertical tool bar to check the coalition assignments.

    BLUE Coalition:
        country.id.CJTF_BLUE (i.e. Combined Joint Task Forces Blue)
        country.id.FRANCE
        country.id.UK
        country.id.USA
        
    RED Coalition:
        country.id.CHINA
        country.id.CJTF_RED (i.e. Combined Joint Task Forces Red)
        country.id.NORTH_KOREA
        country.id.RUSSIA


*** Creating Exclusion Zones: ***

5) (optional) You can prevent OpFor AI aircraft fr om spawning in or travelling through an exclusion zone(s), so they do not readily attack players focused on non air-to-air activities;  Simply create one or more circular trigger zones that include "Exclusion Zone" or "exclusion zone" in the trigger name.  Click the "Create trigger zone" button on the left vertical tool bar to create a circular trigger zone(s).
        
        
*** Known issues: ***

- For multi player missions, when a Client(player) is shot down, if they wish to use the same aircraft/helicopter slot, they may need to move to Spectator first, then back to the aircraft/helicopter client slot.  Otherwise, the main OpForAC menu (i.e. "Spawn AI OpFor Aircraft At Will") may be duplicated and not work.

- When mission is flown in single player mode, kills are not being recorded properly in the debrief screen.  It is suggested to play all missions (i.e. with Client or Player) in multi-player mode (i.e. "Launch Multiplayer Server") if you wish to see the kills recorded.

==========================================================================================================        

*** Features: ***

Version 1.4.1
- AI OpFor aircraft coalition will be opposing the coalition of the aircraft or helicopter
    the client (MP) or player (SP) spawns in
- The same AI OpFor aircraft type can be re-spawned as many times as desired
- One to four AI OpFor aircraft can be spawned at a time
- AI OpFor aircraft load-out depends on engagement scenario (e.g. for jet fighters: BVR vs ACM)
- AI OpFor aircraft skill defaults to "Random", but can be changed via 'Options' menu.  Note
    that the upd ated AI skill persists for the initiating player name, for the duration of the mission
- AI OpFor aircraft altitude AGL defaults to "Random", but can be changed via 'Options' menu
    using pre-se t low/medium/high altitudes AGL.  Note that the upd ated AI altitude AGL persists
    for the initiating player name, for the duration of the mission
- AI OpFor aircraft spawn directly in front of client/player aircraft with a reverse heading
    towards the initiating client/player aircraft by default, but the starting point can be changed
    via Options menu.    Note that the updated AI starting point setting persists
    for the initiating player name, for the duration of the mission
- AI OpFor aircraft spawn at a random altitude ~3k-26k feet AGL by default, but can be changed to
    pre-se t altitudes via Options menu;    AI helicopters spawn at ~500 feet AGL
- AI OpFor aircraft spawn at a distance fr om the initiating aircraft of ~90 miles for BVR
    engagements, ~25 miles for ACM, ~12 miles for helicopters and WW2 aircraft
- Once an AI OpFor aircraft returns to a friendly/neutral base and lands, it will be de-spawned
    once the aircraft stops (there is a function that checks for this every 120 seconds)
- A maximum of 24 AI OpFor aircraft can be spawned and active (alive) at a time, as defined by
    the glbMaxOpForSpawnable variable;  If you attempt to spawn AI OpFor aircraft and it
    would cause the total number of active (alive) AI OpFor aircraft to exceed this maximum number,
    you will see a message telling you they cannot be spawned, until the number of active AI OpFor
    aircraft is reduced by attrition or they land and de-spawn
- You can prevent OpFor AI aircraft fr om spawning in or travelling through an exclusion zones, so they
    do not readily attack players focused on non air-to-air activities;  Simply create one or more circular
    trigger zones that include "Exclusion Zone" or "exclusion zone" in the trigger name.

============================================

Update: 2/25/2024:  I uploaded a new Zip, now version 1.4.1

I made a very minor update, namely, to bump up the starting unit and group ids used to assign to newly spawned AI aircraft, to reduce the chance they are assigned to ids for existing aircraft in the given mission.

============================================

Update: 2/16/2024:  I uploaded a new Zip, now version 1.4

I added two features:

- Once an AI OpFor aircraft returns to a friendly/neutral base and lands, it will be de-spawned once the aircraft stops (there is a function that checks for this every 120 seconds)

- A maximum of 24 AI OpFor aircraft can be spawned and active (alive) at a time, as defined by the glbMaxOpForSpawnable variable;  If you attempt to spawn AI OpFor aircraft and it would cause the total number of active (alive) AI OpFor aircraft to exceed this maximum number, you will see a message telling you they cannot be spawned, until the number of active AI OpFor aircraft is reduced by attrition or they land and de-spawn

Also made two fixes:

- Previously the call signs for the spawned OpFor aircraft were fixed (e.g. Enfield11), and hadn't given it much thought, until I was testing and switched sides.  Then I saw a bunch of "Enfield11" aircraft all over the place :).  So, for OpFor aircraft spawned on the blue/alllied side, they will use more dynamic in-game call signs.  Those on the red/axis side will use dynamic numeric call signs

- With the changes to the SA-342, the OpFor SA-342L and SA-342Mistral were spawning with no/missing weapons.  They were corrected such that both are now SA-342L, one with cannon/rocket load out, one with Mistral loadout.


============================================

Update: 8/26/2023:  I re-uploaded a new Zip, now version 1.3.3

I fixed the issue wh ere opposing AI aircraft were not spawning if the mission loading the script is a single player mission with one Player and no Clients.  The AI aircraft should now spawn upon request.

Also fixed an issue wh ere the MiG-19P was not loading IR missiles based on the scenario; now it loads them correctly.

============================================

8/25/2023: NOTE:  Based on a post in the scripts thread in the ED forums, I ran some tests and there seems to be a bug with running the script in SP missions wh ere you have one Player aircraft.   It's working if you have one or more Client aircraft, so I apparently didn't do full regression testing with SP "Player" missions with my last bunch of changes (sorry about that).  For now, in SP missions, if you can just change the aircraft you use to Client instead of Player, it should work.

I'll need to spend some time debugging wh ere this stopped working for SP "Player" missions.  I tried an older version of the script and it worked, but there were significant changes, so it will take me a while.

Thanks in advance for your patience.

============================================

Update: 7/29/2023:  I re-uploaded a new Zip, now version 1.3.2

I was play-testing and noticed that there were two identical scenario menu items for the Su-24M bomber AI spawning, which was causing neither to work.  I fixed it and now you have two scenario options:

F1. Intercept w/IR Missiles (90 mi)
F2. ACM w/IR Missiles (25 mi)

For some easy gunnery practice, etc. :)
  • Lizenz: Freeware - Kostenlose Version, Weitergabe untersagt
  • Sprache: Englisch
  • Größe: 26.72 Kb
  • Geladen: 305
  • Kommentare: 14
FOLLOW US