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/03/20 12:56]
snippers [Creating/Modifying your own faction config]
tmf:assigngear [2016/04/25 23:15]
snippers [Switching faction configs]
Line 15: Line 15:
 {{:​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 ​this config all the default ​units in the template ​will be changed as well.+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 ==== ==== Creating/​Modifying your own faction config ====
Line 21: Line 21:
  
 === Config 101 === === Config 101 ===
-Every role is 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>​
Line 29: Line 29:
 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 in a class.
  
-There are also array properties 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: 
 +<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**
Line 48: Line 51:
 } }
 </​code>​ </​code>​
-The linkedItems for ftl are now: "​ItemWatch","​ItemMap","​ItemCompass""​Rangefinder"​ and "​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 === === Getting classnames ===
  • tmf/assigngear.txt
  • Last modified: 2020/07/04 19:25
  • by snippers