Arma 3 Virtual Arsenal Init

Arsenal is, essentially, a character, equipment and weapon viewer which has been added to Arma 3 in the Bootcamp update. This tool offers an overview of the available content, and enables customized loadouts to be exported to script, which can be used in the editor, other game modes, such as Zeus, and by community scenarios/mods. Today I go over how to add the new Virtual Arsenal system into your missions in ARMA 3. Initialization line (add to object initialization field): 0 = 'Ammob.

In MC, we use a mission framework. This is an already made mission for you toopen and edit. Most of the work required to have a functional mission isalready done in this framework. You just have to tweak it and add someobjectives.

When editing missions, it is very easy to accidentally addextra dependencies, both from client-side mods like JSRS, or from maps youare not consciously using. The latter is especially problematic for playersthat are using the split repo, since they may have to figure out what extrastuff they need at mission time. To help with avoiding this, there areseveral options you have:

  • Edit only using the split repo. This is the surest way to get it right,but has the downside of needing extra disk space to maintain the splitrepo.
  • Create a faux split repo, similar to what some people already do forediting: re-use the URL and local directory of the Event repo, butmanually deactivate all the maps you don’t use. Don’t forget to alsodeactivate the dependencies of unused maps, like Jbad. Note: CUPTerrains Core is part of the split repo, since it contains a lot ofoften-used assets, so it is safe to keep it active and use items from iteven if your mission is on a non-CUP map.
  • Build the mission and carefully don’t use external assets. This is veryhard to pull off, and you will have to test using only the split repo(faux or real) anyway. It is, however, an option for older missions thatmay already have the extra dependencies.

Download, unpack and set up the Example Mission and Extra Scripts

  1. Download the MC framework. Make sure to always use thelatest release.
  2. Unpack the ZIP into the Arma 3 missions folder.Open missions folder inexplorer. The file path will look something like this:C:UsersklausmanDocumentsArma 3mpmissions
    Note: If the folderMPMissions does not exist, create it.
    The ZIP will contain a foldernamed mcfw-0.0.1.zip or similar. Unpack it to the mpmissions folder andrename it to mcfw.Altis:
  3. Open the Arma 3 mission editor.
    Start Arma 3 with all of MC’s add-onsenabled. Then navigate yourself to the Multiplayer tab in the main menu.Click Host Server and set Host to LAN:
    In the next menu, find the framework missions by selecting Altis as map, andthen selecting mcfw.Altis in green color. Now click the 3D Editor buttonon bottom right. Arma will load the framework mission into the EdenEditor.

Defining mission rules

We will be creating a copy of the example mission, but you can select whatevermap (Altis, Stratis etc.) you prefer.

To create a new mission:

  1. While mcfw.Altis mission is loaded in the editor, zoom all the way out onthe map, so you can see all items that are on the map. Hit Ctrl+A to selecteverything.
  2. Press Ctrl+C on keyboard to copy.
  3. On the toolbar at the top left of the screen, select new, select the map youdesire, then hit “New Scenario”.
  4. In your new, empty mission press Ctrl+V to paste the previously copiedobjects. They will be pasted wherever your mouse cursor is, so picking anice open and flat area near the player start location is best.
  5. In windows explorer, open the folder mcfw.Altis. Select all files in thatfolder except for mission.sqm, and copy the files (Ctrl+C)
  6. In windows explorer open the folder of your new mission, found somewhere inDocumentsArma 3mpmissions
  7. Paste the copied files (Ctrl+V). Remember do not overwrite mission.sqm.

You have now created a new mission which contains all the MCFW features,settings, and pre-placed assets. Let’s continue to work on this mission fromnow on, so you can keep the mcfw.Altis mission unchanged and ready to be usedfor future missions.

Mission rules & info are defined in several places

  1. Modules placed in the 3d editor
  2. init.sqf (found in DocumentsArma 3 MPMissionsmissionname.mapname)
  3. description.ext (same folder)
  4. Slotting Screen Parameters
  5. In the editor: Settings > Addon Options

Modules

Modules you find in the 3d editor asset browser under Systems(F5). There aresome pre-placed modules in the example mission already. Click on them to seewhat settings they contain. You are of course free to tweak the settings, butremember these default settings is what MC is used to, change it too much andplayers will be confused.

Note: A lot of settings that used to be configured via modules are now CBAsettings (see below). While some modules might still work, they will likelyemit warnings about their deprecation. When in doubt, ask in #mission-makingon Discord.

init.sqf

In init.sqf you can enable or disable certain MCFW features, or tweak thevalues. You open this file with any text editor. I recommendnotepad++ and getting theSQF syntax highlighting add-on.

The commented text above each block of code should explain what it does.

E.g. you can disable f_safeStart by commenting out (//) line 62.

description.ext

In description.ext you can set the mission’s briefing name, description andloading image. There are a few other features in here that can be tweaked butit’s rather advanced and not very necessary, so I’ll leave that up to you todiscover.

Note that the mission’s title for the mission selection screen is definedsomewhere else: In the 3d editor’s toolbar click Attributes > General. Whenmaking an updated version of your mission always update this name (i.e. includea version number).

Parameters

Parameters are mission settings that can be tweaked in the slotting screen, bypressing the Parameters button at the top. These parameters are defined indescription.ext, starting at line 114. You may tweak the default parametersas you desire, or activate features.

A few more notes on specific features:

Safe start disables player weapons for the first 5 minutes of a game. It’senabled per default.

The logged/voted admin can turn it off in-game by opening the map screen andclicking ‘Admin’ under ‘Briefing’.

You can turn safe start off entirely in init.sqf by commenting out line 62:[] execVM 'fsafeStartf_safeStart.sqf';

JIP aka join in progress allows players who join post mission start toteleport to their squad mates. You can tweak the settings in init.sqf line48: // SETTING: JIP setup

If you wish to change the time of day or the weather, that is best done in themission editor: in the 3d editor, go to toolbar, and click Attributes >Environment.

Tip: For night time missions, check if the moon is visible, it makes a hugedifference in visibility for the players, especially without NVGs.

Add-on Options

CBA comes with a framework so module makers can easily add settings to theirmods, without everyone reinventing the wheel and settings being all over theplace. This is especially useful for mods like ACE that have well over ahundred settings that players and units can tweak. As of mid-2019, most modernmods use CBA settings, so you should definitely go through the settings tofamiliarize yourself with the basic setup. Note that some settings are enforcedon the server and can’t be changed by players or mission makers.

The CBA site hasa good overview of how the basic Client/Mission/Server settings and overrideswork.

If you have specific questions about a certain setting and what it influencesgameplay-wise, #mission-making is the place to ask.

Placing player units

In the framework example mission, most required player units have already beenplaced down for you, in all 3 available sides: BLUFOR, OPFOR, INDEPENDENT.

You should use these units for your mission also: Remove the units you don’tneed, copy paste units you need extra of. To keep things simple for yourself,and making it easier to reuse part of your mission for a next mission, Irecommend to always use BLUFOR for players (exception: TvT missions). If youwant the players to play as CSAT or Russians, we will simply change the BLUFORplayer uniforms and weapons.

IMPORTANT:Only use the factions NATO, CSAT, AAF, FIA. In Arma 3 we havesides & factions. Sides are obvious (BLUFOR, OPFOR, Independent, Civilian).Factions are sub-groups within a side: NATO is a faction within BLUFOR. MCFWuses factions to figure out who is who. The only factions that are defined perdefault are the four I just mentioned, so unless you are an advanced user, onlyuse these factions for ANY units (exception are vehicles, of course). We willuse the assignGear script to change the default Arma 3 NATO soldiers intosomething more interesting.

Like I said before, we will be using and copy pasting the pre-placed units inthe example mission. This is because besides the correct faction, there are afew other things that have to be set up properly on a player unit to function100%. Copy pasting prevents user errors and just makes it easier for you. Let’slook at everything that goes into setting up one unit.

Double click any pre-placed NATO soldier to open its attributes.

Init
  • Variable name(e.g. UnitNATO_A2_AT): Name that the script code can use tofind this unit. E.g. UnitNATO_CO_M. You can find or change the names inmissionname.mapnamefgroupMarkersf_setLocalGroupMarkers.sqf

  • Init: Code entered here will run on every machine as they join. We use it totrigger two scripts: Group Markers & assignGear.

    GrpNATO_ASL = group this; ['rat',this] call f_fnc_assignGear;

    The first part (GrpNATO_ASL = group this;) is required for the groupmarkers feature. All units within one group must have the same name definedhere. You can find or change all names inmissionname.mapnamefgroupMarkersfsetLocalGroupMarkers.sqf

    The second part, (['rat',this] call f_fnc_assignGear;) calls theassignGear script, to change the player uniform and weapons. How to changethe gear I’ll explain later, for now you must know that the first part of thecode, which is between quotation marks defines which class this unit will be('rat'). That’s the part you want to be changing. You can find theabbreviations on the top of this file:missionname.mapnamefassignGearf_assignGearnato.sqf

  • Playable: a tick box to make the unit selectable for players in theslotting screen. The ‘player’ box is not used in multiplayer.

  • Role description: How the unit will be called in the slotting screen. Youcan use Role@Squadname to set the name of the squad in the slotting screen.

  • Last note: The order of playable units in the slotting screen depends on whenthe unit was created in the editor. First created units appear on the top ofthe list. Tweaking the unit order in slotting screen is very annoying, butcan be done by cut and pasting the quads in the order the should appear onthe Slotting screen.

Besides units, classic assignGear also interacts with ammo crates andvehicles. In an ammo crate or vehicle, add this code in its init to fill thecrate with the right gear & ammo types for your custom loadouts.

['crate_med', this, 'blu_f'] call f_fnc_assignGear

Again change the first part of the code depending on which unit you’re puttingit on. (crate, heli, ifv). In this code though there is an extra variableadded: 'blu_f'. This is there to tell the gear script this is a NATO unit.Make sure it’s always there!

On vehicles, a specific variable name will create a specialist marker on thevehicle just like with medics. E.g. VehNato_TH1. You can find or change allnames in missionname.mapnamefgroupMarkersf_setLocalGroupMarkers.sqf

Changing player loadouts

NOTE: There is an alternative document covering“classic” assignGear usage, as well as one detailing a simplerapproach.

We will be working with the filemissionname.mapnamefassignGearf_assignGear_nato.sqf. Open it in yourfavorite text editor.

At first this file will look overwhelming. But once you understand how itworks, it’s a very handy tool to help you work efficiently.

Lines 5-56 is a list of loadout abbreviations for your convenience: Thevariable you enter in each unit’s init to set their loadout. E.g. ['rat',this] call f_fnc_assignGear;rat = Rifleman AT

Lines 60 to 300 are where you define which weapons, ammo and clothes theunits will use. The rifleman AT will be using a carbine, so to change the “rat”main weapon we must change line 111:

_carbine = 'arifle_MXC_F'; changed to:

_carbine = 'arifle_Mk20_plain_F';

Pay attention to your spelling here. If you make one typo, the whole script canbreak.

How did I get the class name for this different weapon? It’s quite convenient.In the 3d editor, right click a player unit and press ‘change loadout’. Thisopens the virtual arsenal (you can also use the ACE Arsenal, if you prefer).Dress up your soldier how you would like to see him in the mission: uniform,vest, helmet, backpack, rifle, scope, etc. When done, press ‘EXPORT’. Allclassnames are now copied to your clipboard. In your editor, open a new emptytab and paste the text. Change language to SQF in the toolbar for easierreading. Now here are all your classnames for the custom loadout you made inthe virtual arsenal. One by one copy the different classnames and paste them inthe correct slots in f_assignGear_nato.sqf

Some clothes can have multiple classnames in an array, e.g.

_baseHelmet = ['H_HelmetB','H_HelmetB_plain_mcamo']; This will cause thescript to randomly choose one of them. Note that even if you want only oneitem, it should still be an array, e.g. _baseHelmet = ['tinfoil_hat'];

There are some pre-made clothing classes made at line 238 - 244. You may changethis for whatever use you need. E.g. if you want all squad leaders to have aberet, you can add “dc” in the specops array, then change _sfhelmet to aberet.

NVGs, maps, GPS etc are added in lines 321-327 for all loadouts. If you don’twant all loadouts to have a certain item, comment out a line by adding // atthe front of a line.

Medical items are added in a different file: fassignGearf_medical_gear.sqf

Full

Radios are defined on line 298 and 299 (SR/LR stand for short and long range,respectively). The SR radio is added to every infantryman in the block startingat line 324, the actual line that adds it is 346). Long range radios are addedto various roles in fassignGearf_assignGear_nato_b.sqf.

Attachments are set at line 77. Most loadouts will receive the default setupyou set here. E.g. don’t want a scope? Change it to this: _attachments = [_attach1];

To change attachments for specific loadouts take a look at line 477, the dmloadout has a custom scope. This brings us to the last part of the gear script:

Lines 349 - 1000 is where each loadout is defined. Exactly which weapon theyreceive, how many magazines etc. You don’t have to tweak this part, the defaultvalues set are quite reasonable. But if you want to, here it is.

Backpack inventories work quite the same as defining loadout inventories. Butit’s in a different file. Open file: f_assignGear_nato_b.sqf

The first you’ll notice is the _loadout 0, 1, 2 stuff. All backpackinventories are defined 3 times to support the customize-able backpack sizes.In MC we literally never use this, so if you want to change backpackinventories I recommend only changing everything under _loadout 1 thedefault backpack size.

Changing the inventory should be quite easy, just note the functions used aredifferent. You can’t directly copy paste code from f_assignGear_nato.sqf tof_assignGear_nato_b.sqf.

Remember to save the files when done editing!

Placing AI opponents

Editor placed AI might appear to be the ‘default’ or ‘normal’ way of placingyour AI opponents, but it is actually the worst thing you can do. Too many AIactive in your mission at once seriously hurts performance in a multiplayerenvironment.

Our goal is to limit the amount of active AI as much as possible. We do thisusing AI spawn scripts, which only create the AI once players get nearby.

Murk spawn script guide from klausman:

And another one from NyteMyre:

Testing your mission

Arma 3 Bis Virtual Arsenal

To make the mission ready to play on the multiplayer server, you must save themission as .pbo file. You do this in the editor toolbar menu

Scenario > Export to multiplayer.

Your file will be saved in this folder:

C:Program FilesSteamLibrarysteamappscommonArma 3MPMissions

The naming convention for our mission files is as follows:

MC_COxx_missionname_version.mapname

For player vs player mission, replace CO with TVT, for missions thatrequire a Zeus, use Z.

E.g. mc_co46_insurgency_v2.Tanoa

Important: The part before the map name must not contain any dots (.),since this will confuse Arma and the mission will not be visible on the server.It is best to only use A-Z, a-z, 0-9 and _ for mission names.

Arma 3 Virtual Arsenal Init Build

Have one of the Arma team upload your mission to the server. The you shouldtest the mission on the server, ideally several days (and several times) beforemission day. Feel free to ping people in #lookingtoplay for volunteers.

We also have a checklist of items that we have found areeasily overlooked/untested, that then break the mission at event time.

Arma 3 Virtual Arsenal Init 2

Getting a timeslot

To get a timeslot for your mission, ask the Arma team for a timeslot andbriefly outline your mission (which repo (WW2/Event/Test), name, era, factions,player count). The mods will then get back to you and figure out a date to hostyour mission. Note that they will ask if you have tested the missionon-server with others.

Arma 3 Virtual Arsenal Init Hack

There are a few considerations for missions:

Arsenal Script Arma 3

  • Typically, new mission makers host on Friday or Saturday for a few timesbefore getting a Sunday slot.
  • Small missions typically happen on Fridays. Small here means either shorttime-wise (<1.5h or so) or with few player slots (<20).
  • Recurring missions like Antistasi, or longer series of missions, like TwoSierra, also happen on Fridays, to not crowd out the bigger event missions.
  • We typically don’t reserve dates further than two weeks into the future.