Differences
This shows you the differences between two versions of the page.
Both sides previous 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:11] snippers [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 === |