RotorOps: Mission Creator Guide - spencershepard/RotorOps GitHub Wiki

The RotorOps mission generator can load custom templates that define the base mission, and friendly and enemy forces to be populated. These templates are simply .miz files that can be created in the DCS mission editor.

Scenarios

A Scenario is a mission template for the generator. At its most basic, it defines the map, the conflict zones, and the friendly/enemy start points. But it doesn't have to stop there for mission designers.

A RotorOps Scenario is simply a .miz file in templates/Scenarios/user/[your_folder_name]. If you add a .miz file here, it will show up in the generator.

Starting in version 1.1.1, user scenarios should now go in templates/scenarios/user, and you will need to create a new folder there for each scenario template.

Easy: Changing zone locations

The easiest way to get started with making your own scenario is to open one of the existing files, move the zones where you like, and save it as a new file. Use the existing scenario templates as a guide, and keep the zone sizes and distances reasonable.

  • Put zone centers over open areas.
  • Imagine the path that ground forces will need to take between zones
  • Test your scenario for ground unit movement and travel time. You can use Ctrl-Z to speed up time for testing purposes.

Advanced: Scenario Creation

A Scenario template can contain almost any mission asset from the DCS mission editor, including but not limited to:

  • additional units
  • triggers
  • scripts
  • spawns
  • briefing text/images

Included in the RotorOps/sound directory is a large library of voiceovers for use in your missions.

With some care and creativity in your scenario mission design, you can replay it again and again with the variety provided by the mission generator.

A scenario .miz file MUST have:

  1. Between 1-4 circular trigger zones called "ALPHA", "BRAVO", "CHARLIE", "DELTA"
  2. At least one trigger zone with a name that starts with "STAGING".
  3. A blue airport (recommend somewhere near/on-side your staging zone).
  4. A red airport (recommend somewhere near/on-side your last conflict zone).

Optional:

  • CJTF Blue FARP called "HELO_FARP" for automatic player placement. (4 slots only. Consider using FOB import templates for more slots)
  • CJTF Carrier called "HELO_CARRIER" for automatic player placement. (4 slots only)
  • Infantry spawn zones inside conflict zones. Add near buildings to simulate infantry hiding within. Name trigger zones like "ALPHA_SPAWN", "ALPHA_SPAWN_2, etc.
  • Configuration file (see section below)

Testing: You should test your scenarios to ensure that vehicles move between zones as you expect. In some circumstances, vehicles may not be able to calculate a valid route to the next zone, and they will stop. Make sure they can route correctly by testing your scenario in fast forward, with few defending units. You can also get a good idea of how long your scenario will take to complete.

Tips:

  • Position the center of conflict zones over an open area, as this position will be used to spawn units and FARPs.
  • Position the center of staging zones over an open area of at least 1000 x 1000ft to provide space for logistics zones.
  • For very scenery dense areas like forests or urban areas, smaller conflict zone sizes are highly recommended (eg 4000ft radius). A zone center near a roadway may also help keep units moving smoothly.
  • The conflict game type can be played with blue forces on defense. In this mode the last conflict zone is the only troop pickup zone.
  • Design your template so that it can be played in normal 'attacking' mode or 'defending' the conflict zone from enemy ground units starting from the staging zone.
  • Keep the zones fairly close together, both for helicopter and ground unit travel times.
  • You can place static objects and units in a scenario template.
  • You can change mission briefing and other mission options in the template.
  • Drop your templates in the RotorOps Discord if you'd like to have them added in a release for everyone. Maintain a similar naming convention and be sure to credit yourself in the .miz name.
  • Airfields can be captured with ground units. You might consider placing conflict zones over neutral airfields for a rearming area, or perhaps unarmed client slots.
  • Player/client slots are placed in this priority order: Carrier named "HELO_CARRIER", FARP named "HELO_FARP", and the blue airfield.
  • Friendly AWACs and tankers will be placed at the blue airport if parking is available, otherwise they will start in the air.
  • Enemy helicopters and planes will spawn at the red airport.
  • In "Defense" or with "Swap sides" option, Blue and Red ships, helicopters, planes, and ground units will swap countries.
  • Turn off or limit civilian road traffic.
  • Pay attention to rivers and bridges, as a far away bridge crossing may break routing if it's the only way across. See the testing notes above.

FARP Locations: You can now control the FARP spawning location and heading by adding a static object (such as a mark flag) with group name 'ALPHA' etc. Same for staging area logistics site..but the group name should be 'STAGING'. Change the object heading to better align with roads or map objects. The flags for these must be CJTFB country.

You can dynamically insert complex arrangements of objects such as large bases with multiplayer spawns. See the Imports section for more details

Imports

A breakthrough feature of mission design with RotorOps is the ability to import complex arrangements of statics and vehicles. This allows you to create reusable mission assets like bases, FARPs, objective sites, or just about anything you can imagine building in the mission editor. You can place these on any map, at your desired point, rotation and coalition!

A selection of FOBs, FARPs, and other objects are available in the Imports folder. Included are multiplayer FOBs with up to 16 helicopter spawns! A guide to the included templates is available here: RotorOps IMPORT Assets

To use an import template:

  1. Place a static mark flag in the scenario template mission.
  2. Change the group name to 'IMPORT-filename', where the filename is a .miz file in templates/Imports/user/[your_folder_name]
  3. Change the flag coalition to CJTF Blue/Red or UN Peacekeepers.
  4. Change the flag heading and position as desired.
  5. Change the flag UNIT NAME to something relevant (ie. 'North Base')
  6. For multiple imports of the same template, the import object GROUP NAME should end with '-01' etc

To create a new import template:

  1. Make an empty mission on Caucasus.
  2. Place units/objects on the map.
  3. Make one unit group name: 'ANCHOR' This will represent the point of insertion/rotation in the target mission.
  4. Save the template .miz file in templates/Imports/user/[your_folder_name]

Tips:

  • Double-check to make sure that the import UNIT names are correct. If the import static object is changed, this unit name will change to match the group name. This won't work, and when you generate the mission it will produce an error. The unit must not start with 'IMPORT'.
  • If creating a new template, moving the ANCHOR object to a key location (corner, a free space where you want a road to match, etc.) can be helpful.
  • Choose a relatively flat area of the map for importing your objects, or verify the imported objects in-game afterward.
  • Some templates found in the Imports folder are used for mission generation in any scenario. For example, the logistics area and the staging zone FARPs use these templates. You can change them if you wish...just understand the significance of the changes you are making. For example, you may end up changing how the FARPs fit in zones, or the functionality of the logistics zone.
  • After a mission is generated, the static ANCHOR and IMPORT markers can be safely deleted, if you wish.

Forces Templates

The friendly/enemy forces templates available in the generator are simply .miz files in the templates/Forces/user/[your_folder_name]

A Forces template defines the groups of ground units available, AI aircraft, liveries, and loadouts.

To create your own Forces template:

  1. Create an empty mission on Caucasus
  2. Add ground unit groups.
  3. Save the mission in this directory.
  4. Add a helicopter with "CAS" main task for attack helicopters.
  5. Add a helicopter with "Transport" main task for transport helicopters.
  6. Add a plane with "CAS" main task for attack planes.
  7. Add a plane with "CAP" main task for fighters.
  8. Configure loadouts, liveries, and skill for aircraft.

Tips:

  • The country or coalition of units in the forces template is not relevant. They will be converted to the appropriate coalition when the mission is generated.

Template Configuration Files

For your own use, configuration files are optional. For submitting for inclusion with the RotorOps distribution, they are mandatory. You can see examples of these within the 'downloaded' folders for each template type. The config file is a .yaml file, which is very forgiving of formatting. However you might want to run it through a simple web-based YAML validator. The config file name must match the name of the template miz file (with different extensions) and it must be in the same folder as the template .miz.

If you are submitting files for distribution with RotorOps, a config file must be included with the following variables set:

  • author: the displayed name to attribute credit to
  • type: 'Scenario', 'Import', or 'Forces'
  • name: the display name of the template
  • description: a short description that will be displayed to users
  • map: Caucasus, PersianGulf, Marianas, Nevada, or Syria (scenario templates only)
  • tags: (must be a list) MultiPlayer, CoOp, SinglePlayer

Scenario Config File

For scenario missions, this can control mission options and set or disable mission generator options. For example, if you've designed a mission that only works well in 'defense' mode, you can set that option in the config file. Below are some of the variables available. All variables are optional and can be added as needed.

An example (highly configured) scenario config file shown below:

author: GRIMM
version: 2
type: Scenario
name: 'Persian Gulf - Nighthawks (AH-64D)'
description: "Fly the Apache in this immersive mission over a gorgeous hidden area of the Persian Gulf map. Single player or co-op: Apache pilot/CPG"
tags:
  -SinglePlayer
map: PersianGulf
player_spawn: fixed
checkboxes:
    defense_checkBox: false
    apcs_spawn_checkBox: true
    logistics_crates_checkBox: true
    awacs_checkBox: false
    tankers_checkBox: false
    zone_sams_checkBox: false
    smoke_pickup_zone_checkBox: false
    inf_spawn_voiceovers_checkBox: false
    game_status_checkBox: false
    voiceovers_checkBox: false
    force_offroad_checkBox: false
disable_checkboxes: zone_sams_checkBox, force_offroad_checkBox, defense_checkBox, awacs_checkBox, tankers_checkBox, logistics_crates_checkBox, voiceovers_checkBox
spinboxes:
    blueqty_spinBox: 4
    redqty_spinBox: 1
    e_attack_helos_spinBox: 0
    e_attack_planes_spinBox: 0
    e_transport_helos_spinBox: 0
    troop_drop_spinBox: 0
    inf_spawn_spinBox: 0
radiobuttons: farp_never,
disable_radiobuttons:
    farp_always, farp_gunits
red_forces: "RED Default Trucks & Infantry (EASY)"
blue_forces: "BLUE Default US Armor"

The red_forces / blue_forces value is the filename of the desired template, without the .miz extension.

You can find the names of the UI elements in this source file: https://github.com/spencershepard/RotorOps/blob/develop/Generator/MissionGeneratorUI.ui

Special options

  • script: text here will be inserted as a do script immediately after RotorOps.lua and CTLD.lua loads. This can be useful for changing options in these scripts.

  • start_trigger: set to false to disable inserting the RotorOps.startConflict trigger action

  • end_trigger: set to false to disable inserting the mission win/lose trigger actions

Override Imported FARP objects You can use alternative import templates to populate the various FARPs and bases used in mission generation. For example, if you wanted your mission template to use a FOB instead of the standard logistics zone, you could include the line: staging_logistics_file: FOB_16_SPWN_WIDE_LIGHTED The filename should not include the .miz extension. Available options:

  • zone_farp_file
  • staging_logistics_file
  • logistics_farp_file
  • defensive_farp_file
  • zone_protect_file

How the script works

In a generated mission, you will find a DO SCRIPT trigger action similar to this:

RotorOps.stagingZone('STAGING')
RotorOps.addZone('ALPHA', 101)
RotorOps.addZone('BRAVO', 102)
RotorOps.addZone('CHARLIE', 103)
RotorOps.setupConflict(100)
RotorOps.startConflict()

Here's what these functions are doing:

RotorOps.addZone(zone_name, defenders_flag)

Where defenders_flag is your DCS user flag that you can use to trigger events. If you read this flag, it will give you the percentage of defending units in the conflict zone. This flag is useful to trigger events like enemy reinforcements.

RotorOps.setupConflict(game_state_flag)

Where game_state_flag is your DCS user flag that will reflect the state of the Conflict game. States are as follows: not_started = 0, alpha_active = 1, bravo_active = 2, charlie_active = 3, delta_active = 4, lost= 98, won = 99

Note: If players are defensive, the game is won when all enemy units from the staging zone are eliminated. The defensive game is lost when the enemy has cleared all player zones. If players are aggressors, the game is won when all zones are cleared. There is no 'lost' flag when players are the aggressors.

RotorOps.startConflict()

This can be called at any point to kick off the Conflict game, so you can move this to another trigger function if you wish. When this function runs, all ground units currently in the staging area will be sent to the first conflict zone.

**Script loading timing: You must load the RotorOps.lua script immediately after the CTLD script. **

Mission Editor code snippets

Copy and paste these codes snippets into your waypoint actions.

Troop Drops

Drop troops from AI planes, helicopters, or ground vehicles. Copy and paste this into a Run Script command (advanced waypoint actions) to drop 8 troops from a ground vehicle or aircraft. Works with both friendly and enemy craft.

local this_group = ...
RotorOps.deployTroops(8, this_group)

This is handy to add friendly or enemy reinforcements in combination with mission triggers. Demo missions will include at least one example of this usage. If you deploy troops into a Conflict Zone using this method, they will be controlled with the RotorOps AI.

Zone Status Triggers

Here's an example of triggering an action with the 'defender status' flags we setup with the addZone() function. When we read these flags we will get the percentage of defending forces in the zone relative to their original force.

Here, we're reading the flag for the 'ALPHA' zone and checking if it's between 0 and 90. So if the defending units in the zone are less that 90%, it will trigger our action. Here we are using it to activate a convoy that will ultimately drop more troops into the conflict zone.

New in v1.2.0 There are now additional flags provided for better readability in mission design:

  • ROPS_DEFENDING (true if 'blue on defense')
  • ROPS_ATTACKERS (percentage of staged units remaining)
  • ROPS_A_DEFENDERS (A-D for Alpha-Delta percentage of defending vehicles/infantry remaining)
  • ROPS_GAMESTATE (not_started = 0, alpha_active = 1, bravo_active = 2, charlie_active = 3, delta_active = 4, lost = 98, won = 99)

Disable AI control for select units in a zone

If you don't want infantry to move from a rooftop, or support vehicles to move from a staging zone, you can name the group including the string static . This is not case sensitive, and the string is configurable in the script options as well. So you could name a group 'Ground-1static' or 'Ground-3 STATIC' and it would prevent the script from controlling their movement.

Options

At the beginning of the script file you will find the available dynamic and static options. The dynamic options can be changed from a DO SCRIPT in the mission editor at any time. The static options must be changed after the RotorOps.lua script has loaded and BEFORE the startConflict() function.

Contributing

If you would like your template files to be distributed with RotorOps, you should fork this repo: https://github.com/RotorOps/RotorOps-Template-Repo

Add your files and submit a pull request from your fork to the main repo. Detail the current state of play testing in your pull request comment. If it's none, that's okay but we must label it as such. Once accepted, your template will be immediately available for all users in the RotorOps mission generator.