Thursday 27 June 2013

Add Clothing and Gear to Your Character

ArmA 3 has changed it's gear system quite drastically, implementing Weapon attachments and a more open clothing/gear system. Not only does this allow for the mod community to easily create unit packs and re-textures, it also allows for people to easily and quickly customise their soldiers for their preferred look or battle scenario.

All this can be done using very simple code in the INIT line of a unit (shown below):

From here we can alter many properties for the character such as headgear, goggles, vests, uniforms and backpacks using a single line of code.

unit addHeadgear "Classname";

The unit component describes which soldier is to be edited, for example this or player. The addHeadgear component is the actual command, this will assign whatever object is written after it to the correct part, In this case the head, to the unit described. Finally, the "Classname" component is the actual item to be assigned. Classnames aren't as simple as just typing the name of the item, but a way to find them easily will be detailed in later post.

Those are the components that make up the command. But what about actual working code? Below is an example of a command that will place the Digital Camo Military Cap onto the soldier named s_marksman:

s_marksman addHeadgear "H_MilCap_dgtl";

Simply write this into the init line of any character and it will place it on the s_marksman soldier. If you want to place the Cap onto the current unit without a name or just for ease of coding, the unit component can be replaced with this.

this addHeadgear "H_MilCap_dgtl";

This command will assign the Digital Military Cap to whatever unit the line is placed in. It can be used in as many units as you like and will not conflict.

With these commands you can create a quick, customised character to suit your liking or environment. Here is an example to create a Recon Marksman styled soldier:

this addheadgear "H_Watchcap_camo";
this addUniform "U_I_CombatUniform";
this addVest "V_PlateCarrierIA1_dgtl";
this addBackpack "B_AssaultPack_ocamo";
this addGoggles "G_Shades_Black";


Here is what the soldier will look like after the code is placed:
The soldier is now fit for operations and also does a great job at looking awesome too. Below is a summary of all the code and components:
_________________________________________________________________________________
The basic outline of the command:
unit command "Classname"; 
A simple command to assign the item to the current soldier
this addHeadgear "H_MilCap_dgtl";
Completely re-dress the soldier:
this addheadgear "H_Watchcap_camo";
this addUniform "U_I_CombatUniform";
this addVest "V_PlateCarrierIA1_dgtl";
this addBackpack "B_AssaultPack_ocamo";
this addGoggles "G_Shades_Black";
The next post will be looking at how to remove items, weapons and gear from soldiers to allow for easier customising and replacing.

 

6 comments:

  1. Question on adding mod weapons to the script. How do I find the name of a weapon?

    ReplyDelete
    Replies
    1. You need to use the Config Viewer. To do this simply pause the game. Click "Config" to open the viewer and navigate to the CfgWeapons folder [On the left hand pane]. Once this is opened feel free to take any of the weapon classnames stored there. I will post a tutorial for this ASAP.

      Thanks,
      Detective Potato

      Delete
  2. Exelent post man! thanks!!

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. How beautifully all the feelings have been conveyed through writing.
    Lesbian Flag

    ReplyDelete
  5. This is a splendid website! I"m extremely content with the remarks!. blouse back neck designs

    ReplyDelete