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
Last revision Both sides next revision
tmf:assigngear [2016/07/25 23:18]
morbo [Assign Gear]
tmf:assigngear [2020/07/04 19:25]
snippers [Creating/Modifying your own faction config]
Line 1: Line 1:
 ==== Assign Gear ==== ==== Assign Gear ====
 +
 Assign gear is the name of the feature that handles gear assignment. TMF does not support using arsenal loadouts for players as assign gear renders it inefficient and avoids its past bugs in doing so. Assign gear is the name of the feature that handles gear assignment. TMF does not support using arsenal loadouts for players as assign gear renders it inefficient and avoids its past bugs in doing so.
  
-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 all roles within that faction (Eg. Rifleman, Fireteam Leader). Through the editor, you can then assign these roles to particular units.
- Every faction config contains all roles within that faction (Eg. Rifleman, Fireteam Leader). Through the editor, you can then assign these roles to particular units. ​+
  
 ==== Configuring unit role assignment ==== ==== Configuring unit role assignment ====
 +
 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. 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.
  
Line 11: Line 12:
  
 ==== Switching faction configs ==== ==== Switching faction configs ====
 +
 +**Tip! We provide a variety of finished presets through our mod pack, all of which can be found retrieved as .hpp files [[https://​github.com/​Sniperhid/​1tac_misc/​tree/​master/​addons/​tm_tmf_loadouts|here]].**
 +
 To add to or tweak the factions available in a mission, open the file description.ext in the mission folder. There is a section called 'class CfgLoadouts'​ To add to or tweak the factions available in a mission, open the file description.ext in the mission folder. There is a section called 'class CfgLoadouts'​
  
Line 18: Line 22:
  
 ==== Creating/​Modifying your own faction config ==== ==== Creating/​Modifying your own faction config ====
 +
 Text editors that support syntax highlighting are recommended for creating/​modifying assigngear loadouts, for example Notepad++ Text editors that support syntax highlighting are recommended for creating/​modifying assigngear loadouts, for example Notepad++
  
-If you wish to create your own, copy an existing config from the Loadouts folder in the mission'​s folder and modify it. +If you wish to create your own, copy an existing config from the Loadouts folder in the mission'​s folder and modify it.
  
 === Config 101 === === Config 101 ===
-Every role (rifleman/​automatic rifleman etc.) requires its own class e.g. <code cpp>​class baseMan {};</​code>​+ 
 +Every role (rifleman/​automatic rifleman etc.) requires its own class e.g. 
 + 
 +<code cpp> 
 +class baseMan {}; 
 +</​code>​
  
 Every class has properties with the general pattern of: Every class has properties with the general pattern of:
  
-<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 within 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>​ 
 For example: For example:
-<code cpp>​linkedItems[] = {"​ItemMap","​ItemCompass","​ItemWatch"​};</​code>​ + 
-Here we have an array property called linkedItems that consists of 3 elements "​ItemMap",​ "​ItemCompass"​ and "​ItemWatch"​.+<code cpp> 
 +linkedItems[] = {"​ItemMap","​ItemCompass","​ItemWatch"​};​ 
 +</​code>​ 
 + 
 +   Here we have an array property called linkedItems that consists of 3 elements "​ItemMap",​ "​ItemCompass"​ and "​ItemWatch"​.
  
 **Class Inheritance** **Class Inheritance**
  
 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: 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>​ 
 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: 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:
  
-<code cpp>​class r : baseMan+<code cpp> 
 +class r : baseMan
 { {
     displayName = "​Rifleman";​     displayName = "​Rifleman";​
     headgear[] = {"​rhsusf_lwh_helmet_marpatd"​};​     headgear[] = {"​rhsusf_lwh_helmet_marpatd"​};​
- vest[] = {"​rhsusf_spc_rifleman"​};​+    ​vest[] = {"​rhsusf_spc_rifleman"​};​
     primaryWeapon[] = {"​rhs_weap_m16a4_carryhandle"​};​     primaryWeapon[] = {"​rhs_weap_m16a4_carryhandle"​};​
     attachment[] = {"​rhsusf_acc_anpeq15side"​};​     attachment[] = {"​rhsusf_acc_anpeq15side"​};​
Line 58: Line 84:
         LIST_2("​SmokeShell"​)         LIST_2("​SmokeShell"​)
     };     };
- items[] = +    ​items[] = 
-+    
- LIST_3("​ACE_fieldDressing"​),​ +        LIST_3("​ACE_fieldDressing"​),​ 
- "​ACE_morphine"​ +        "​ACE_morphine"​ 
- };+    };
 }; };
 class g : r class g : r
Line 73: Line 99:
         LIST_4("​1Rnd_Smoke_Grenade_shell"​)         LIST_4("​1Rnd_Smoke_Grenade_shell"​)
     };     };
-};</​code>​+}; 
 +</​code>​
  
 As displayed above, the primary weapon assigned to the Grenadier class overrides the one inherited from the Rifleman. However, 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. As displayed above, the primary weapon assigned to the Grenadier class overrides the one inherited from the Rifleman. However, 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 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 loadout. Pressing the export button will copy the loadout to the clipboard. An example output will look 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 loadout. Pressing 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 113: Line 141:
 this linkItem "​ItemWatch";​ this linkItem "​ItemWatch";​
 </​code>​ </​code>​
 +
 It's recommended to paste the Virtual Arsenal export into an empty text file besides the config; From there, you can find the classnames of the items you wish to use and paste them into the appropriate arrays in the faction config. It's recommended to paste the Virtual Arsenal export into an empty text file besides the config; From there, you 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