Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tmf:assigngear [2016/04/25 23:15]
snippers [Switching faction configs]
tmf:assigngear [2016/07/25 23:13]
morbo [Switching faction configs]
Line 1: Line 1:
 ==== Assign Gear ==== ==== 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.+Assign gear is the name of the feature that handles gear assignment. ​TMF does not support using arsenal loadouts for players. This is because it is tedious to hand craft VA loadouts ​for each player and has often been bugged ​in the past.
  
 The assigngear system makes use of faction configs. These configs can either be in a mission or included in the modpack. 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. ​+ Every faction config contains ​all roles within that faction ​(EgRifleman, Fireteam ​Leader). ​Through the editor, you can then assign ​these roles to particular units. ​
  
-==== Configuring ​the gear a unit gets ==== +==== Configuring unit role assignment ​==== 
-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.+To use the assign gear component ​in Eden, right click on the unit(s) ​and click 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 mission file or modpack.
  
 {{:​tmf:​tmf_assigngear.jpg}} {{:​tmf:​tmf_assigngear.jpg}}
  
 ==== Switching faction configs ==== ==== 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'​+To add to or tweak the factions available in a missionopen the file description.ext in the mission folder. There is a section called 'class CfgLoadouts'​
  
 {{:​tmf:​assigngear_loadouts.jpg}} {{:​tmf:​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.+Here you can create extra factions, or override the default ones. For the units in the template, ​BLU_F, OPF_F, IND_F are used by default; ​if you change the class name of a faction ​to BLU_F it will be used by all BLUFOR ​units in the default template. This is because faction configs are first taken from the mission ​file, while the default '​vanilla'​ loadouts (NATO/CSAT/AAF/FIAare contained ​in the modpack.
  
 ==== Creating/​Modifying your own faction config ==== ==== 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.+Text editors ​that support ​syntax highlighting ​are recommended for creating/​modifying assigngear loadouts, for example Notepad++ 
 + 
 +If you wish to create your owncopy an existing config ​from the Loadouts folder in the mission'​s folder ​and modify it. 
  
 === Config 101 === === Config 101 ===
Line 27: Line 29:
 <code cpp>​PROPERTY = VALUE;</​code>​ <code cpp>​PROPERTY = VALUE;</​code>​
  
-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.+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 ​within ​a class.
  
 There are also array properties. Arrays are lists which take the format of: <code cpp>​PROPERTY[] = {"​element1",​ "​element2",​ ... };</​code>​ There are also array properties. Arrays are lists which take the format of: <code cpp>​PROPERTY[] = {"​element1",​ "​element2",​ ... };</​code>​
Line 36: Line 38:
 **Class Inheritance** **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 valueso '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:+Classes ​can inherit from others, ​for example 'class g : r' means that all the properties from class r now exist in class g with the same values. 'class g : r {};' would make class g exactly the same as class r. Any property we now set in g will override the value that is inherited from r. For example:
 <code cpp>​class g : r {  <code cpp>​class g : r { 
     displayName = "​Grenadier";​     displayName = "​Grenadier";​
 };</​code>​ };</​code>​
-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.+Class g is still the same as r except the displayName has now been changed. This is useful for making variations of a given loadout; for example, often the only difference between a Grenadier and a Rifleman (g and r, respectively) is the primaryWeapon and the addition of launcher grenades:
  
-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: +<code cpp>​class ​r : baseMan 
-<code cpp> +
-class +    ​displayName = "​Rifleman";​ 
-    ​linkedItems[] = {"ItemWatch", "ItemMap", "ItemCompass"};+    headgear[] = {"rhsusf_lwh_helmet_marpatd"}; 
 + vest[] = {"​rhsusf_spc_rifleman"​};​ 
 +    primaryWeapon[] = {"​rhs_weap_m16a4_carryhandle"​};​ 
 +    attachment[] = {"​rhsusf_acc_anpeq15side"​};​ 
 +    magazines[] = 
 +    { 
 +        LIST_11("​30Rnd_556x45_Stanag"​), 
 +        LIST_2("30Rnd_556x45_Stanag_Tracer_Red"), 
 +        LIST_2("HandGrenade"), 
 +        LIST_2("​SmokeShell"​) 
 +    }; 
 + items[] = 
 +
 + LIST_3("​ACE_fieldDressing"​),​ 
 + "​ACE_morphine"​ 
 + };
 }; };
-class ftl : g { +class g : r 
-    ​linkedItems[] += {"Rangefinder", "ItemGPS"}; +
-} +    ​displayName = "​Grenadier";​ 
-</​code>​ +    primaryWeapon[] = {"​rhs_weap_m16a4_carryhandle_M203"​};​ 
-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.+    magazines[] += 
 +    ​{ 
 +        LIST_8("1Rnd_HE_Grenade_shell"), 
 +        LIST_4("1Rnd_Smoke_Grenade_shell"
 +    ​}; 
 +};</​code>​ 
 + 
 +As displayed abovethe primary weapon assigned to the Grenadier class overrides the one inherited from the RiflemanHowever, in the case of magazines, the '​+='​ operator is used to append ​to the inherited array. In the above example, the Grenadier ('​g'​) ​class is given all the same items as the Rifleman ('​r'​) class, but with the addition of smoke and HE grenades for his grenade launcher due to the use of the '​+='​ operator in the magazines array. 
  
 === Getting classnames === === 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 classnamesNext press the export buttonthe 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:+The easiest way to get the classname ​of items/​weapons/​uniforms etc. is to use ArmA 3's Virtual Arsenal ​(accessible from the main menu via Tutorials ​-> Virtual Arsenal). In VA, you can give yourself the gear you wish to include in a loadoutPressing ​the export button ​will copy the loadout to the clipboard. An example output will look like this:
 <code cpp> <code cpp>
 comment "​Exported from Arsenal by Snippers";​ comment "​Exported from Arsenal by Snippers";​
Line 88: Line 113:
 this linkItem "​ItemWatch";​ this linkItem "​ItemWatch";​
 </​code>​ </​code>​
-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.+It's recommended ​to paste the Virtual Arsenal export into an empty text file besides the config; From thereyou can find the classnames of the items you wish to use and paste them into the appropriate arrays ​in the faction config.
  • tmf/assigngear.txt
  • Last modified: 2020/07/04 19:25
  • by snippers