Reyhard/Sandbox/Character Gear Creation/Vest/Prefab Configuration – User
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.
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
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.
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.
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:
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
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.
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_01 | 15 | |
CUSTOM_01 | 20 | |
CUSTOM_01 | 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
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
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 overriden 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
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.