Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tmf:assigngear [2016/03/19 13:39] – created 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/ | ||
| + | |||
| + | Text editors that support syntax highlighting are recommended for creating/ | ||
| + | |||
| + | If you wish to create your own, copy an existing config from the Loadouts folder in the mission' | ||
| + | |||
| + | === Config 101 === | ||
| + | |||
| + | 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[] = {" | ||
| + | </ | ||
| + | |||
| + | Here we have an array property called linkedItems that consists of 3 elements " | ||
| + | |||
| + | **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: | ||
| + | |||
| + | <code cpp> | ||
| + | class g : r { | ||
| + | displayName = " | ||
| + | }; | ||
| + | </ | ||
| + | |||
| + | 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 = " | ||
| + | headgear[] = {" | ||
| + | vest[] = {" | ||
| + | primaryWeapon[] = {" | ||
| + | attachment[] = {" | ||
| + | magazines[] = | ||
| + | { | ||
| + | LIST_11(" | ||
| + | LIST_2(" | ||
| + | LIST_2(" | ||
| + | LIST_2(" | ||
| + | }; | ||
| + | items[] = | ||
| + | { | ||
| + | LIST_3(" | ||
| + | " | ||
| + | }; | ||
| + | }; | ||
| + | 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 === | ||
| + | |||
| + | The easiest way to get the classname of items/ | ||
| + | |||
| + | <code cpp> | ||
| + | comment " | ||
| + | |||
| + | comment " | ||
| + | removeAllWeapons this; | ||
| + | removeAllItems this; | ||
| + | removeAllAssignedItems this; | ||
| + | removeUniform this; | ||
| + | removeVest this; | ||
| + | removeBackpack this; | ||
| + | removeHeadgear this; | ||
| + | removeGoggles this; | ||
| + | |||
| + | comment "Add containers"; | ||
| + | this forceAddUniform " | ||
| + | this addItemToUniform " | ||
| + | for " | ||
| + | this addItemToUniform " | ||
| + | for " | ||
| + | this addItemToUniform " | ||
| + | this addItemToUniform " | ||
| + | this addVest " | ||
| + | this addItemToVest " | ||
| + | this addHeadgear " | ||
| + | |||
| + | comment "Add weapons"; | ||
| + | this addWeapon " | ||
| + | |||
| + | comment "Add items"; | ||
| + | this linkItem " | ||
| + | this linkItem " | ||
| + | this linkItem " | ||
| + | </ | ||
| + | |||
| + | 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. | ||
| - | ==== Creating your own faction config ==== | ||