Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tmf:assigngear [2016/03/19 14:34] – [Creating/Modifying your own faction config] snippers | tmf:assigngear [2025/08/03 14:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| 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. | ||
| - | The assigngear system makes use of faction configs. These configs can either be in a mission or included in the modpack. | + | 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. |
| - | Every faction config contains a bunch of different roles (e.g. Squad Leader/ | + | |
| - | ==== Configuring | + | 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. |
| - | Firstly in Eden on any soldier you use the assign gear component | + | |
| + | ==== Configuring unit role assignment | ||
| + | |||
| + | To use the assign gear component | ||
| {{: | {{: | ||
| ==== Switching faction configs ==== | ==== Switching faction configs ==== | ||
| - | To add more or tweak the factions available in a mission | + | |
| + | **Tip! We provide a variety of finished presets through our mod pack, all of which can be found retrieved as .hpp files [[https:// | ||
| + | |||
| + | 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' | ||
| {{: | {{: | ||
| - | Here you can create extra factions. You can also override the default ones. By default | + | Here you can create extra factions, or override the default ones. For the units in the template, |
| ==== Creating/ | ==== Creating/ | ||
| - | Firstly if you want to tweak assigngear the best thing to do is use a text editor | + | |
| + | Text editors | ||
| + | |||
| + | If you wish to create your own, copy an existing config | ||
| === Config 101 === | === Config 101 === | ||
| - | Every role is its own class e.g. 'class baseMan' | ||
| - | There are also array properties which take the format of: <code cpp> | + | Every role (rifleman/ |
| + | |||
| + | <code cpp> | ||
| + | class baseMan {}; | ||
| + | </ | ||
| + | |||
| + | Every class has properties with the general pattern of: | ||
| + | |||
| + | <code cpp> | ||
| + | PROPERTY = VALUE; | ||
| + | </ | ||
| + | |||
| + | Each of these properties is responsible for different things. For example the ' | ||
| + | |||
| + | There are also array properties. Arrays are lists which take the format of: | ||
| + | |||
| + | <code cpp> | ||
| + | PROPERTY[] = {" | ||
| + | </ | ||
| + | |||
| + | For example: | ||
| + | |||
| + | <code cpp> | ||
| + | linkedItems[] = {"ItemMap"," | ||
| + | </ | ||
| + | |||
| + | Here we have an array property called linkedItems that consists of 3 elements " | ||
| **Class Inheritance** | **Class Inheritance** | ||
| - | One really nice feature of classes is that can inherit from other classes | + | Classes |
| - | <code cpp> | + | |
| - | 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 ' | ||
| <code cpp> | <code cpp> | ||
| - | class g { | + | class g : r { |
| - | | + | |
| }; | }; | ||
| - | class ftl : g { | ||
| - | linkedItems[] += {" | ||
| - | } | ||
| </ | </ | ||
| - | The linkedItems for ftl are now: "ItemWatch"," | + | |
| + | 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 | ||
| + | { | ||
| + | displayName = "Rifleman"; | ||
| + | headgear[] = {" | ||
| + | vest[] = {" | ||
| + | primaryWeapon[] = {" | ||
| + | attachment[] = {" | ||
| + | magazines[] = | ||
| + | { | ||
| + | LIST_11(" | ||
| + | LIST_2("30Rnd_556x45_Stanag_Tracer_Red"), | ||
| + | LIST_2("HandGrenade"), | ||
| + | LIST_2("SmokeShell") | ||
| + | }; | ||
| + | items[] = | ||
| + | { | ||
| + | LIST_3("ACE_fieldDressing"), | ||
| + | " | ||
| + | }; | ||
| + | }; | ||
| + | class g : r | ||
| + | { | ||
| + | displayName = " | ||
| + | primaryWeapon[] = {" | ||
| + | magazines[] += | ||
| + | { | ||
| + | LIST_8(" | ||
| + | LIST_4(" | ||
| + | }; | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | 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 ' | ||
| === Getting classnames === | === Getting classnames === | ||
| - | The easiest way to get the classnames | + | |
| + | The easiest way to get the classname | ||
| <code cpp> | <code cpp> | ||
| comment " | comment " | ||
| Line 77: | Line 141: | ||
| this linkItem " | this linkItem " | ||
| </ | </ | ||
| - | 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 | ||
| + | |||