Skip to content

Making your first mission

BlackHawkPL edited this page Feb 11, 2018 · 26 revisions

Did you read the introduction?

Part 1. Setting up mission using Olsen Framework

Open 3D editor, choose a map you want your mission to take place on and save it under temporary name.

image

Find the mission in %UserProfile%\Documents\Arma 3 - Other Profiles\ -Profile name-\missions. Download the framework and add it to the mission folder.

image

Part 2. Setting up the playable units

Now that the framework is installed you need to add playable characters. For that you can either use Compositions made by other users or make one yourself.

Write the description and setup the gear script and group name and set the rank for each unit. Make sure all units are set as playable and their init fields match with example below.

image

Now we will set up gear script. First, navigate to customization\loadouts folder, create new file and name it with your faction name.

image

For Framework to detect new file we need to add it's entry to gear.sqf file in customization folder

image

Now we must add #define package "NATO_" to the top of your loadout file (in this case NATO.sqf), it will be the name prefix, as seen in Part 2 unit edit field ("NATO_CO"). Next, we define item groups that will be used often, for example uniforms, IFAKs, items. Later it will save a lot of space and make file smaller and easier to read. (see one of default loadout files on how to do it). Write gear cases for every unit type, again look into one of example files to see how it's done.

For making your gearscript, it is highly recommended to use Gear Builder mission located in Utilities folder. To use it, place it in missions folder in your game directory and then run it from singleplayer scenarios screen in-game. It will allow you to use Virtual Arsenal to customize gear and then let you export it to framework gearscript format.

Part 3. Setting up the AIs

Put down the AI units. If you want to place units inside buildings, it's important you add this disableAI "PATH"; this setUnitPos "UP" to their init fields, to make them behave in more realistic manner when in CQB environment. (first command forces AI to stop and prevents them from, for example, running off rooftops. Second one forces set stance, "UP" "MIDDLE" "DOWN" available)

image

Next we customize time limit and team names in settings.sqf.

FW_TimeLimit = 30;
FW_TimeLimitMessage = "TIME LIMIT REACHED!";

[west, "NATO", "player"] call FNC_AddTeam;

[east, "CSAT", "ai"] call FNC_AddTeam;

image

At last we will be adding a truck as a mission objective, to reference it in the end conditions we will call it OBJECTIVE.

image

Part 4. Writing the briefing

Now that the scenario has been setup, write the briefing. See UO Briefing Guidelines for sample briefing. For excellent example of a complex briefing visit UO Enhanced Briefing Preset repository.

Part 5. Setting up the end conditions

We start by making the first end condition for the destruction of the truck. Add following line to endConditions.sqf

if (!(alive OBJECTIVE)) exitWith {
    "The NATO forces have destroyed the fuel truck." call FNC_EndMission;
};

Next we make a second end condition for eliminating CSAT forces.

_eastCasualty = "CSAT" call FNC_CasualtyPercentage;

if (_eastCasualty >= 95) exitWith {
    "The NATO forces have aliminated the CSAT forces." call FNC_EndMission;
};

At last we add a casualty check at 70% to end the mission if everything goes horribly wrong.

_westCasualty = "NATO" call FNC_CasualtyPercentage;

if (_westCasualty >= 70) exitWith {
    "NATO forces took too many casualties." call FNC_EndMission;
};

Part 6. Finishing up the mission

Now we decide what modules to use in the mission. To do that, open \modules\modules.sqf file and comment/uncomment different lines. To change settings for each module, navigate to it's folder and edit settings.sqf.

Next we set the mission description and name via Edit Multiplayer menu in Eden editor. Make sure Enable AI box is unchecked and respawn settings match ones below, otherwise some framework elements might have undefined behavior, for example spectator script.

image

Resave the mission under the final name. New folder with that name will be created in your missions directory. It will contain only mission.sqm file. MOVE ALL FILES EXCEPT mission.sqm FROM OLD FOLDER TO A NEW FOLDER. Load mission again to check for any issues or errors. Once it's ready, export it to multiplayer from 3D editor. You will be able to find your mission pbo file in MPMissions folder in your Arma 3 directory.

Clone this wiki locally