Skip to content

RotorOps: Mission Creator Guide

spencershepard edited this page Jan 9, 2022 · 30 revisions

RotorOps: Conflict mission design the easy way!

The easiest way to get started is to download one of the demo missions. Open a template in the mission editor and you can see how everything works and start creating your mission right away. Important bits are the triggers, trigger zones, and advanced waypoint actions (for AI troop drops). These missions are much more simple than you might expect, and that's the goal of this project!

Advanced Usage for RotorOps: Conflict

If you'd like to set up a Conflict mission from scratch or add to your existing missions, you'll need to:

  1. Download this repository: https://github.com/spencershepard/RotorOps/archive/refs/heads/main.zip
  2. Create a new mission with at least two trigger zones. Call one 'STAGING' and the other 'ALPHA'.
  3. Put attacking ground units in the staging zone, and defending units in the conflict zones (ie 'ALPHA', 'BRAVO', etc)
  4. Add 'SOUND TO COUNTRY' actions to load all of the sound effect files from the 'sounds/embedded/' folder.
  5. Add 'DO SCRIPT FILE' trigger actions to load MIST, Splash Damage 2, CTLD, and RotorOps scripts.
  6. Add 'DO SCRIPT' trigger action to initiate the RotorOps: Conflict game mode with the trigger zones you created.

Sound file setup

Add 'SOUND TO COUNTRY' actions for a trigger action as in the image below. Add every sound file from the sounds/embedded folder. This is a bit of a hacky way to get the files to embed in the .miz file so that our script can use them.

Script setup

Add a 'DO SCRIPT FILE' for each of the script files as in the image below.

In the same trigger, you can add another 'DO SCRIPT' action to paste the following code:

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, won = 99

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.

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.

Clone this wiki locally