Character Gear Creation/Vest/Prefab Configuration – Arma Reforger

From Bohemia Interactive Community
Jump to navigation Jump to search
Previous part - Asset Preparation
💬
Overview

This chapter covers following topics:

  • Vest prefab creation & configuration
  • Setting protection setup on items
  • Adding vest to arsenal

Prefab Setup

Creating Prefab

First step in this process will be inheriting VestArmored_Base.et or duplicate one of existing vests like Vest_6B2_base.et. When inheriting from VestArmored_Base.et, few more steps will be required but those are listed later. On the other hand, unlike helmets, it is possible to configure vest in multiple ways, i.e. by using ClothNodeStorageComponent or InventoryItemComponent.

Additionally, since vests have extra elements separated (arm and groin protection), it will be also necessary to prepare prefab for that attachable prefab. In this case it is possible to use EquipmentPart_Base.et for inheritance or Vest_ALICE_belt.et for duplication - in both cases some extra work will be required - and call such prefab i.e. Vest_Sample_01_Addon.et


Also, don't forget to properly organize your prefab - it is quite useful to have base prefab with _base suffix, since its clear in such setup which file was used as parent for sub sequential child prefabs, which change slightly materials or mesh.

In this article, Enfusion links are used. With those links it is possible to open specific resource just by simply clicking on that link. Enfusion links has to be manually activated in Workbench options (Workbench -> Options -> Workbench -> Register "enfusion://" protocol) before it can be used]
BaseLoadoutClothComponent content

Tweaking BaseLoadoutClothComponent

Once you have new prefab for your vest, open it in for example Prefab Edit Mode and start with tweaking things located in BaseLoadoutClothComponent

  • Enable PhysicsOnWearEnabled & AnimateCollidersOnWear properties
  • Assign item model to ItemModel in BaseLoadoutClothComponent & to property Object in MeshOjbect component
  • Assign worn model to WornModel
  • Optionally: Change SoundInt parameter from 400 (generic vest sounds) to something different
    • This parameter is responsible for additional sounds that are being played when certain type of gear is worn. For instance if you wear harness, you can hear some extra metal rattle when moving through the landscape. See Character SoundInfo Signals Reference page for more info

After you are done with the main vest prefab, apply similar tweaks to Vest_Sample_01_Addon.et

Tip: You can find details how to create variants of vest with different material on following page.

Inventory Configuration

Configuration of inventory is quite similar compared to weapon or headgear, therefor it is suggested to take a look at Weapon Creation page or Headgear tutorial for details regarding how each of those params are working.

Depending whether you are planning to make an vest, which has additional things attached to it like pouches on for instance Soviet harness or ALICE gear, then it is recommended to use ClothNodeStorageComponent.

ClothNodeStoreComponent content


If you already have InventoryItemComponent (i.e. because you duplicated one of the vanilla prefabs which had that) then it is still possible to change it. This can be done by clicking on InventoryItemComponent with and then selecting from the context menu option Change class.

armareforger-new-vest-change-component.gif

When inheriting from VestArmored_Base.et, you will need to add ClothNodeStorageComponent via + Add Component button and then fill all the data from scratch.


Below is list of things which were adjusted in ClothNodeStorageComponent on base Sample Vest prefab:

  • Item Display Name
    • Name - controls in game display name
    • Description - description of the item visible in in-game inventory menu
  • Item Phys Attributes
    • Weight was changed to 10 [kg] to be more or less in line with real life vest containing 2 large plates and 2 smaller side plates
    • Size Setup Strategy was changed to Manual
    • Item Dimensions were changed to X:55, Y:35, Z:5 to more or less correspond to its actual dimensions
    • Item Volume was set to 5000
  • PeviewRenderAttributes in Custom Attributes section:
    • Camera Orbit Angles, FOV & Camera Distance To Item were adjusted so that whole vest fits the preview image in the inventory
    • Preview Worn Model option was checked

Vanilla vests are using 2x2 slots and once those tweaks are completed, it should look like that in game:

Sample Vest in inventory menu

Protection configuration

As was mentioned in previous part, beside armored plates in Fire Geometry, items can also use scripted system for damage reduction. Full Kevlar vest like PASGT are using scripted damage reduction which is handled by Custom Attribute in InventoryItemComponent/ClothNodeStorageComponent which is called SCR_ArmoredClothItemData.

Theory

📖
Recommended read: Damage section of Weapon Creation tutorial.

Whole system works on principle of raw damage reduction to the selected hitzone. For example TYPE_IIA level protection reduces damage by 30 points, which reduces most of the damage that 9x18mm bullet would inflict to character.

Keep in mind that this protection is omnidirectional! You can differentiate how much damage will be reduced from front or rear using this method alone,

List of all protection levels with amount of damage they are reducing can be found in SCR_EArmorLevels.c. It is also possible to mod this enum and add your custom values if you wish.

Armor Level Damage reduction Comment
CUSTOM_01 10 Arbitary protection values
CUSTOM_02 15
CUSTOM_03 20
CUSTOM_04 25
TYPE_I 25 Balanced to conform to NIJ standard protection values
TYPE_IIA 30
TYPE_II 35
TYPE_IIIA 40
TYPE_III 60
CLASS_1 31 Balanced to conform to GOST standard protection values
CLASS_2 41
CLASS_2A 46
CLASS_3 80
CLASS_4 90
CLASS_5 121

Protection setup

SCR_ArmoredClothItemData configuration in ClothNodeStorageComponent of Sample Vest

Setup of that attribute is quite simple and can be done in few steps:

  • Add new Custom Attribute in InventoryItemComponent/ClothNodeStorageComponent (depends on which component you are using) by clicking on + icon on the right of the parameter
    • Select SCR_ArmoredClothItemData from the list
  • Add zones which are protected by this system by adding new entries to Protected Hit Zones array
    • You can take a look at picture below showing all available hitzones
  • Select Protected Damage Types - in most cases it makes sense to add KINETIC, EXPLOSIVE, FRAGMENTATION & MELEE protection
  • Select Protection level from drop down menu which will represent protection level of the soft armor (kevlar/aramid fabric)
    • In this case NIJ IIA level was selected - vest without plates should still protect against pistol bullets
    • You can take a look at following spreadsheet to compare various protection standards

All available Hitzones can be previewed by opening Character_Base.et prefab and then checking Additional hit zones array in SCR_CharacterDamageManagerComponent

Hitzones which can be used in SCR_ArmoredClothItemData

Creating variant

In order to have some variety, shoulder & groin pads were separated from the main mesh and were moved to another XOB. Configuring those parts as separate prefabs, which can be attached in Workbench, involves few steps listed below.

Creating equipment part

Configuration of equipment part


First, lets start with creating new prefab inheriting from EquipmentPart_Base.et, which should provide basis for equipment attachment - this is not new vest variant yet! In this example such prefab was called Vest_Sample_01_Addon.

Keep in mind that right now game doesn't allow you to attach such equipment parts in runtime. Instead, vest prefab with already attached extra parts will be available to be picked up in for example arsenal crate.

Once prefab is created, open it i.e. in Prefab Edit Mode and start adjusting following properties:

  • Assign mesh of the item variant of additional parts (Vest_SampleVest_01_addon_item.xob) in MeshObject component
  • In RigidBody component enable Static property
  • Tweak SCR_SoundDataComponent so that SCR_AudioSourceConfiguration entries with Sound Event Name "SOUND_PICK_UP" & "SOUND_EQUIP" are pointing to Items_PickUp_Cloth.acp - this will ensure that more appropriate sounds are played when this item is picked up or equipped
  • Change class of SCR_UniversalInventoryStorageComponent to SCR_EquipmentStorageComponent and adjust inside of it following properties:
    • Adjust Weight of the item - this will be correctly summed when this addon is attached to the vest. In this case Weight was set to 3
  • Add BaseLoadoutCloth_Base.ct component template to the prefab by drag and dropping in Object Properties window. This will add BaseLoadoutClothComponent which needs following tweaks:
    • Change Worn Model & Item Model parameters to respective models (in this case Vest_SampleVest_01_addon.xob & Vest_SampleVest_01_addon_item.xob)
    • Enable Physics On Wear Enabled
    • Enable Animate Colliders On Wear

Creating vest variant

Configuration of heavy variant of vest

After equipment part is ready, it is possible to move on to creation and configuration of actual vest variant. To do so, perform following steps:

  • Inherit from previously created base prefab (in this case it is Vest_Sample_01_base.et) and call it i.e. Vest_Sample_01_Heavy.
  • In ClothNodeStorageComponet adjust following things:
    • Change Name & Description in Item Display Name so it fits more the variant of the item
    • Tweak Preview Render Attributes whole vest is still visible in the UI. In this case, Camera Distance To Item parameter was increased to 4.9
    • Add two new Protected Hit Zones for shoulder pads - LArm & RArm
      • Due to size and fact, that groin pad only protects frontal section of the character, this element is using actual fire geometry to protect character from incoming projectiles

Weight of the vest itself doesn't have to be adjusted, since game itself is clever enough to combine weight of all items attached to main vest.

Adding slots

To add previously created equipment part to the vest, we need to start with adding new slot in BaseLoadoutClothComponent. To do so, click on plus + button on the right side of Slots parameter and new slot called i.e. Addon.Once slot is created, expand it and:

  • Assign previously created equipment part (Vest_Sample_01_Addon.et) to Prefab field
  • Enable Inherit Parent Skeleton property

Et voilà! Don't forget to save all changes to the prefab afterwards and if everything went fine, you should be able to test this new variant in game.

armareforger-new-vest-addon-slot-configuration.png

Adding to Arsenal

Process of adding headgear to the crates is very similar to the one described on Weapon Creation page. There are few differences though - notable different labels are used. So in short, if you intend to add helmet to i.e. existing US arsenal box, then perform following steps:

  • Override in your addon US_InventoryItems.conf
  • Open overridden file and locate Backpack and Vests section inside of it
  • Add new entry to Entities list by clicking on + button on the right side
  • Assign your prefab to Entity Prefab field
  • Add new SCR_ArsenalItem (Arsenal Data) entry to Entity Data List array by clicking on + button on the right side
  • Change Item Type in Arsenal Data to VEST_AND_WAIST

If everything went fine, you should end up with something like on the picture below

armareforger-new-vest-arsenal-setup.png

Testing & Diags

Once you done all above steps, you can proceed with testing vest in play mode which is pretty much same as in Headgear tutorial.

armareforger-new-vest-diag-on.pngarmareforger-new-vest-final-result.png