This is an old revision of the document!


Assign Gear

Assign gear is the name of the feature that handles gear assignment. We do not support using arsenal loadouts for players. This is because it is tedious to hand craft for each player and has often in the past been bugged.

The assigngear system makes use of faction configs. These configs can either be in a mission or included in the modpack. Every faction config contains a bunch of different roles (e.g. Squad Leader/Rifleman). You can then give these roles to particular units.

Configuring the gear a unit gets

Firstly in Eden on any soldier you use the assign gear component by right clicking on them and clicking on attributes. You will find the following section. This menu will automatically be filled will roles from faction configs that are present in either the missionfile or modpack.

tmf_assigngear.jpg

Switching faction configs

To add more or tweak the factions available in a mission you need to open the file description.ext in the mission folder. There will be a section called 'class CfgLoadouts'

assigngear_loadouts.jpg

Here you can create extra factions. You can also override the default ones. By default BLU_F, OPF_F, IND_F are used for the units in the template so if you change the class name of a faction BLU_F it will then be used by all NATO units in the default template. This is because faction configs are looked for first in the mission and then in the modpack and the NATO, FIA, CSAT and FIA faction configs are in the modpack rather than the mission.

Creating/Modifying your own faction config

Firstly if you want to tweak assigngear the best thing to do is use a text editor that can do syntax highlighting. I would recommend using notepad++. If you wish to create your own the best thing to do is to copy an existing config and modify it. The first thing you then need is a short introduction on how classes work.

Config 101

Every role (rifleman/automatic rifleman etc.) requires its own class e.g.

class baseMan {};

Every class has properties with the general pattern of:

PROPERTY = VALUE;

Each of these properties is responsible for different things. For example the 'displayName' property is used as a description for this particular kit so if you use 'displayName = “Rifleman”;' that will set the description of that role to Rifleman. Note there can not be two of the same property in a class.

There are also array properties. Arrays are lists which take the format of:

PROPERTY[] = {"element1", "element2", ... };

For example:

linkedItems[] = {"ItemMap","ItemCompass","ItemWatch"};

Here we have an array property called linkedItems that consists of 3 elements “ItemMap”, “ItemCompass” and “ItemWatch”.

Class Inheritance

One really nice feature of classes is that can inherit from other classes for example 'class g : r' means that class g inherits from class r. In essence all the properties from r now exist in g with the same value. so 'class g : r {};' would make g exactly the same as r. Any property we now set in g will override the value that is inherited from r. For example:

class g : r { 
    displayName = "Grenadier";
};

g is still the same as r except the displayName has now be changed. This is really useful if for one kit you only want to make small changes.

The last thing you can do with inheritance is specific to array attributes you can use the '+=' operator to append to an inherited array. For example:

class g {
    linkedItems[] = {"ItemWatch", "ItemMap", "ItemCompass"};
};
class ftl : g {
    linkedItems[] += {"Rangefinder", "ItemGPS"};
}

The linkedItems for ftl are now: “ItemWatch”,“ItemMap”,“ItemCompass”“Rangefinder” and “ItemGPS”. Each of these will be given to a unit that matches the class.

Getting classnames

The easiest way to get the classnames of items/weapons/uniforms etc. is use the virtual arsenal in arma 3 (accessible from the main menu via learn → virtual arsenal). All you need to give in virtual aresnal is give yourself the items/weapons etc. that you want the classnames. Next press the export button, the game will have now copied a script into your clipboard open up a text editor and paste it in. An example output will like this:

comment "Exported from Arsenal by Snippers";
 
comment "Remove existing items";
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;
 
comment "Add containers";
this forceAddUniform "rhs_uniform_cu_ucp";
this addItemToUniform "rhsusf_patrolcap_ucp";
for "_i" from 1 to 2 do {this addItemToUniform "ACE_fieldDressing";};
this addItemToUniform "ACE_morphine";
for "_i" from 1 to 2 do {this addItemToUniform "rhs_mag_30Rnd_556x45_M855A1_Stanag";};
this addItemToUniform "rhs_mag_an_m8hc";
this addItemToUniform "rhs_mag_m18_red";
this addVest "rhsusf_iotv_ucp";
this addItemToVest "rhsusf_ANPVS_14";
this addHeadgear "rhsusf_hgu56p_mask";
 
comment "Add weapons";
this addWeapon "rhs_weap_m4_carryhandle_pmag";
 
comment "Add items";
this linkItem "ItemMap";
this linkItem "ItemCompass";
this linkItem "ItemWatch";

All you then need to do is find the classname in there that you are looking for and add it back to the role in the faction config.

  • tmf/assigngear.1461626147.txt.gz
  • Last modified: 2016/04/25 23:15
  • by snippers