Skip to content

Making your first mission

BlackHawkPL edited this page Aug 7, 2016 · 26 revisions

Did you read the introduction?

Part 1. Setting up mission

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 and create new file that matches faction name you are adding gear script to.

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, it will be the name prefix. Next, we define item groups that will be used often. 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

Part 3. Setting up the AI's

Put down the AI units. If you want to place units inside buildings, it's important you put this disableAI "PATH"; this setUnitPos "UP" in 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 the briefing. See UO Briefing Guidelines for sample briefing.

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\settings.sqf file and comment/uncomment different lines. To change settings for each module, navigate to it's folder and edit settings.sqf.

Now we write the description for the mission and name the mission. Also remember to set the date and time of day. Make sure respawn settings match ones below, otherwise some framework elements might have undefined behavior, for example spectator script.

image

Resave the mission with new mission name. It will create new folder with ONLY mission file. MOVE ALL FILES EXCEPT mission.sqm FROM OLD FOLDER TO A NEW ONE. Load mission again to check for any issues. Once it's ready, export mission to multiplayer through 3D editor. You will be able to find it's pbo file in MPMissions folder in your Arma directory.

Clone this wiki locally