Operation Flashpoint 2: Dragon Rising - Mission Editor: Part 1
When I first figured out that Operation Flashpoint 2's mission editor was not as user friendly as the original mission editor, I was dissapointed. However after some tinkering, I am finally starting to learn how to use this editor to create some decent missions. Items I plan on covering in this post are:
- Mission Properties
- Player Setup
- Unit limits
- Mission Objectives
- Triggers, and Spawning Entities
You will find this window in the lower right of the Editor under the Mission Properties tab.
This is where you name your mission, and provide any general information for the mission. i.e. Time of Day, Weather, Briefing, Multiplayer Capabilities, etc...
These are the multiplayer settings. Currently this map is set to allow Co-op Multiplayer play, with a maximum of 4 players. As for Server Bandwidth, I have no clue what that is for? Is it for determining how much bandwidth is needed, or how much bandwidth the mission will use? Or how much needs to be available? I am unsure...
That covers the basics for Mission Properties.
In order to place objects, we need to go into the Create window, which is located in the upper right of the editors screen. Select USMC and then expand the Soldier's directory. Select a soldier, and then simply click on the map. This will place a soldier on the map.
Place 5 soldiers on the map, and then switch to the System part of the Create window. In there expand the AI folder, and select Echelon. An Echelon is a small group of soldiers. This is the only way to group soldiers together in the in game command system. Place a Echelon beside the 5 soldiers you just created.
What you want to do now is select the 5 soldiers, and right click on them. Select Parent Echelon and then click on the Echelon icon. This will group them all together. You can only have up to 5 soldiers (or units*) per Echelon. You can also create a Echelon with 5 Echelons in it.
*Note: In terms of Vehicles, unless they are set as using a virtual crew, all vehicles will need to be staffed by soldiers in order to operate. We will cover this later, however note that the amount of non virtual soldiers inside a vehicle, does count towards the maximum amount of Entities on the map, even if they are inside the vehicle, and not visible.
With your Echelon created, right click on one of the soldiers and select "Set Control Mode of This Character" Then select Player. I choose to set the Echelon commander as the player. You can tell which one is the commander by the special icon beside him.
In OFP2, we are limited to having a maximum of only 63 Entities at any specific time - anywhere on the Island. This is mainly to improve multiplayer and online performance and help with lower end systems. While I personally think that the developers should of let us stick in as many units as we like, I do see their reasoning behind forcing this.
In order to help with this, we have a system of Entities to help. We can simply spawn, activate, and despawn whole groups of soldiers based on how the player is progressing through the map.
"Startup" is the default Entity which you want to use for every object and unit which has to spawn at the start of the mission. Also, use this for objects such as ammo boxes, and sand bags as well - as they do not count towards the 63 unit limit. Generally in terms of soldiers, you only want the players Echelon, and any other Friendly Echelon which will remain in action during the entire mission to be set under Startup.
When you "Add Entity Set", the new Entity will likely show up as a sub-Entity set of Startup. Simply drag it to its own location in the Explorer menu (seen above).
Create a new Entity called "Enemy". Set it as your active entity set. And then create a fireteam or two of PLA Soldiers nearby - but out of visual range of your USMC Soldiers. I chose to place my USMC Soldiers just West of the town of Aynskoye, and place my PLA Soldiers inside the town around the bridge.
Near the fireteams, place some waypoints. I set mine up to be Aware, Standing, and Formation Controlled by AI. I also set a 25ms delay.
You will now want to switch your active Entity Set back to Startup. Now, go back to the Create menu, and in the mission folder (for Systems) select "Triggers events when someone enters or exits the zone." Now place the trigger near your USMC Troops, between them and the town.
Also, feel free to add a mission objective. You can find those in the Mission directory of the Create / Systems window. I added one on the bridge. Be sure to select it, and enable it as a primary objective. Also, in the Scripting directory of Create / Systems, place a levelScript nearby. This will control what is going on.
I placed 2 Objectives in the town. The first one to kill the PLA Units, the second one to secure the town. The Trigger will activate the second Objective. I also set the same trigger up to spawn a small counter attack of PLA Soldiers which will activate as Entity Enemy2. Take a look at the script for this and it should make a little more sense...
Spawn Points and Triggers
I had some issues getting the waypoint for the Enemy2 soldiers to work. Often they would spawn properly, they just wouldn't walk to their waypoint. However if I set them to spawn at Startup, they would walk to their waypoint. So I sum this up to some random bug.
I ended up adding a 2nd fireteam under the Enemy2 spawn inside some of the buildings in the town on the East side of the bridge.
All in all, the troubleshooting involving the Enemy2 spawn took about 2 hours, and I am still not sure it is working properly. But I wanted to get this post finished. The Enemy spawn is working fine, as are the objectives. I shall upload the .mssn file for those who want to check it out.