Character Gear Creation/Vest/Prefab Configuration – Arma Reforger
Lou Montana (talk | contribs) m (Text replacement - "overriden" to "overridden") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}}{{Feature|informative|'''Previous part''' - [[Arma_Reforger:Character_Gear_Creation/Vest/Asset_Preparation|Asset Preparation]]}}{{Messagebox|'''Overview''' | {{TOC|side}} | ||
This chapter covers following topics: | {{Feature|informative|'''Previous part''' - [[Arma_Reforger:Character_Gear_Creation/Vest/Asset_Preparation|Asset Preparation]]}} | ||
{{Messagebox|'''Overview''' | |||
This chapter covers the following topics: | |||
* Vest prefab creation & configuration | * Vest prefab creation & configuration | ||
* Setting protection setup on items | * Setting protection setup on items | ||
* Adding vest to arsenal|💬|#CDF}} | * Adding vest to arsenal|💬|#CDF | ||
}} | |||
== Prefab Setup == | == Prefab Setup == | ||
Line 10: | Line 13: | ||
== Creating Prefab == | == Creating Prefab == | ||
First step in this process will be [[Arma Reforger:Data Modding Basics#Using .22Inherit in....22 function|inheriting]] '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/VestArmored_Base.et|VestArmored_Base.et}}''' | First step in this process will be [[Arma Reforger:Data Modding Basics#Using .22Inherit in....22 function|inheriting]] '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/VestArmored_Base.et|VestArmored_Base.et}}''' or [[Arma Reforger:Data Modding Basics#Using .22Duplicate to....22 function|duplicate one of existing vests]] like '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Vests/Vest_6B2/Vest_6B2_base.et|Vest_6B2_base.et}}'''. When inheriting from '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/VestArmored_Base.et|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 '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/EquipmentPart_Base.et|EquipmentPart_Base.et}}''' for inheritance or '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Vests/Vest_ALICE/Vest_ALICE_belt.et|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''''' | 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 '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/EquipmentPart_Base.et|EquipmentPart_Base.et}}''' for inheritance or '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Vests/Vest_ALICE/Vest_ALICE_belt.et|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''''' | ||
Line 20: | Line 23: | ||
=== Tweaking BaseLoadoutClothComponent === | === Tweaking BaseLoadoutClothComponent === | ||
Once you have new prefab for your vest, open it in for example '''[[Arma Reforger:Prefabs Basics#Prefab edit mode|Prefab Edit Mode]]''' and start with tweaking things located in '''BaseLoadoutClothComponent''' | Once you have new prefab for your vest, open it in for example '''[[Arma Reforger:Prefabs Basics#Prefab edit mode|Prefab Edit Mode]]''' and start with tweaking things located in '''BaseLoadoutClothComponent''' | ||
Line 57: | Line 61: | ||
Vanilla vests are using '''2x2 slots''' and once those tweaks are completed, it should look like that in game: | Vanilla vests are using '''2x2 slots''' and once those tweaks are completed, it should look like that in game: | ||
[[File:armareforger-new-vest-inventory-menu.png|none|thumb|'''Sample Vest''' in inventory menu]] | [[File:armareforger-new-vest-inventory-menu.png|none|thumb|'''Sample Vest''' in inventory menu]] | ||
== Protection configuration == | == 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.''' | 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 === | === Theory === | ||
{{Messagebox|'''Recommended read:''' [[Arma_Reforger:Weapon_Creation/Prefab_Configuration#Damagel|'''Damage''']] section of Weapon Creation tutorial.|📖|lightgrey}}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. | {{Messagebox|'''Recommended read:''' [[Arma_Reforger:Weapon_Creation/Prefab_Configuration#Damagel|'''Damage''']] section of Weapon Creation tutorial.|📖|lightgrey}}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. | ||
{{Feature|important|Keep in mind that this protection is ''' | {{Feature|important|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 '''{{Link|enfusion://ScriptEditor/Scripts/Game/Components/Damage/SCR_EArmorLevels.c;5|SCR_EArmorLevels.c}}'''. | |||
It is also possible to mod this enum and add your custom values if you wish. | |||
{| class="wikitable" | {| class="wikitable" | ||
! Armor Level | |||
!Armor Level | ! Damage reduction | ||
!Damage reduction | ! Comment | ||
!Comment | |||
|- | |- | ||
|CUSTOM_01 | | CUSTOM_01 | ||
|10 | | 10 | ||
|Arbitary protection values | | Arbitary protection values | ||
|- | |- | ||
|CUSTOM_02 | | CUSTOM_02 | ||
|15 | | 15 | ||
| | | | ||
|- | |- | ||
|CUSTOM_03 | | CUSTOM_03 | ||
|20 | | 20 | ||
| | | | ||
|- | |- | ||
|CUSTOM_04 | | CUSTOM_04 | ||
|25 | | 25 | ||
| | | | ||
|- | |- | ||
|TYPE_I | | TYPE_I | ||
|25 | | 25 | ||
|Balanced to conform to NIJ standard protection values | | Balanced to conform to NIJ standard protection values | ||
|- | |- | ||
|TYPE_IIA | | TYPE_IIA | ||
|30 | | 30 | ||
| | | | ||
|- | |- | ||
|TYPE_II | | TYPE_II | ||
|35 | | 35 | ||
| | | | ||
|- | |- | ||
|TYPE_IIIA | | TYPE_IIIA | ||
|40 | | 40 | ||
| | | | ||
|- | |- | ||
|TYPE_III | | TYPE_III | ||
|60 | | 60 | ||
| | | | ||
|- | |- | ||
|CLASS_1 | | CLASS_1 | ||
|31 | | 31 | ||
|Balanced to conform to GOST standard protection values | | Balanced to conform to GOST standard protection values | ||
|- | |- | ||
|CLASS_2 | | CLASS_2 | ||
|41 | | 41 | ||
| | | | ||
|- | |- | ||
|CLASS_2A | | CLASS_2A | ||
|46 | | 46 | ||
| | | | ||
|- | |- | ||
|CLASS_3 | | CLASS_3 | ||
|80 | | 80 | ||
| | | | ||
|- | |- | ||
|CLASS_4 | | CLASS_4 | ||
|90 | | 90 | ||
| | | | ||
|- | |- | ||
|CLASS_5 | | CLASS_5 | ||
|121 | | 121 | ||
| | | | ||
|} | |} | ||
=== Protection setup === | === Protection setup === | ||
[[File:armareforger-new-vest-protection-configuration.png|thumb|521x521px|'''SCR_ArmoredClothItemData''' configuration in '''ClothNodeStorageComponent''' | |||
[[File:armareforger-new-vest-protection-configuration.png|thumb|521x521px|'''SCR_ArmoredClothItemData''' configuration in '''ClothNodeStorageComponent''' of Sample Vest]] | |||
Setup of that attribute is quite simple and can be done in few steps: | Setup of that attribute is quite simple and can be done in few steps: | ||
* Add new '''Custom Attribute''' in '''InventoryItemComponent/ClothNodeStorageComponent''' | * 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 | ** Select '''SCR_ArmoredClothItemData''' from the list | ||
* Add zones which are protected by this system by adding new entries to '''Protected Hit Zones''' array | * Add zones which are protected by this system by adding new entries to '''Protected Hit Zones''' array | ||
Line 147: | Line 156: | ||
All available Hitzones can be previewed by opening '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/Character_Base.et|Character_Base.et}}''' prefab and then checking '''Additional hit zones''' array in '''SCR_CharacterDamageManagerComponent''' | All available Hitzones can be previewed by opening '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/Character_Base.et|Character_Base.et}}''' prefab and then checking '''Additional hit zones''' array in '''SCR_CharacterDamageManagerComponent''' | ||
[[File:armareforger-new-vest-hitzones.png|none|thumb|935x935px|'''Hitzones''' which can be used in '''SCR_ArmoredClothItemData''']] | [[File:armareforger-new-vest-hitzones.png|none|thumb|935x935px|'''Hitzones''' which can be used in '''SCR_ArmoredClothItemData''']] | ||
[[File:armareforger-new-vest-damage-manager.png|thumb|'''SCR_ArmorDamageManagerComponent''' configuration]] | |||
==== Damage pass-through ==== | |||
Especially potent personal protection is also using another layer of damage handling. Vests like '''6B3''' are using '''SCR_ArmorDamageManagerComponent''' to simulate blunt force trauma dealt by bullets, which '''normally wouldn't do any damage''' to character since plates completely stopped the bullets. With that component though, character '''resilience''' is reduced by each shot at the vest, which might result in character being '''unconscious''' after multiple shots. If all shots landed on armored plates, there will be no injuries or bleeding and after a while character can resume combat. | |||
Configuration of that component can be done in following steps: | |||
# Add '''SCR_ArmorDamageManagerComponent''' to the vest prefab via '''+ Add Component''' button | |||
# Add new '''HitZone''' element to '''Additional hit zones''' list - name of that hit zone doesn't matter but you can call it f.e. '''''Vest''''' | |||
# Enable '''HZ Default''' property inside that new hitzone | |||
# Change '''Max Health''' property to '''10000''' | |||
# Fill '''Collider Names''' list with colliders from the vest | |||
## Please note that list box will only show bones from model which is defined in '''MeshObject''' component. It might be necessary to '''manually type in collider''' names. As a workaround, you can temporarily change model in '''MeshObject''' component to worn variant (the one containing colliders), fill the list and switch back model assigned in '''MeshObject''' to previous one | |||
== Creating variant == | == 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. | 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 === | === Creating equipment part === | ||
[[File:armareforger-new-vest-addon-part.png|thumb|Configuration of equipment part]] | [[File:armareforger-new-vest-addon-part.png|thumb|Configuration of equipment part]] | ||
Line 159: | Line 184: | ||
* Assign mesh of the item variant of additional parts (''Vest_SampleVest_01_addon_item.xob'') in '''MeshObject''' component | * Assign mesh of the item variant of additional parts (''Vest_SampleVest_01_addon_item.xob'') in '''MeshObject''' component | ||
* In '''RigidBody''' component enable '''Static''' property | * In '''RigidBody''' component enable '''Static''' property | ||
* Tweak | * Tweak '''SCR_SoundDataComponent''' so that '''SCR_AudioSourceConfiguration''' entries with '''Sound Event Name''' "''SOUND_PICK_UP''" & "''SOUND_EQUIP''" are pointing to '''{{Link|enfusion://ResourceManager/~ArmaReforger:Sounds/Items/_SharedData/PickUp/Items_PickUp_Cloth.acp|Items_PickUp_Cloth.acp}}''' - this will ensure that more appropriate sounds are played when this item is picked up or equipped | ||
* [[Arma Reforger:Prefabs Basics#Changing class|'''Change class''']] of '''SCR_UniversalInventoryStorageComponent''' to '''SCR_EquipmentStorageComponent''' and adjust inside of it following properties: | * [[Arma Reforger:Prefabs Basics#Changing class|'''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''' | ** 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''' | ||
Line 168: | Line 193: | ||
=== Creating vest variant === | === Creating vest variant === | ||
[[File:armareforger-new-vest-addon-prefab.png|thumb|788x788px|Configuration of '''heavy variant of vest''']] | [[File:armareforger-new-vest-addon-prefab.png|thumb|788x788px|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: | 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: | ||
Line 173: | Line 199: | ||
* In '''ClothNodeStorageComponet''' adjust following things: | * In '''ClothNodeStorageComponet''' adjust following things: | ||
** Change '''Name & Description''' in '''Item Display Name''' so it fits more the variant of the item | ** Change '''Name & Description''' in '''Item Display Name''' so it fits more the variant of the item | ||
** Tweak '''Preview Render Attributes''' | ** 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''' | ** 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 | *** 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 | ||
Line 188: | Line 214: | ||
[[File:armareforger-new-vest-addon-slot-configuration.png]] | [[File:armareforger-new-vest-addon-slot-configuration.png]] | ||
== Adding to Arsenal == | == Adding to Arsenal == | ||
Process of adding headgear to the crates is very similar to the one described on '''[[Arma Reforger:Weapon Creation/Prefab Configuration#Crate Filling|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: | Process of adding headgear to the crates is very similar to the one described on '''[[Arma Reforger:Weapon Creation/Prefab Configuration#Crate Filling|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: | ||
* [[Arma Reforger:Data Modding Basics#Using .22Override in....22 function|Override in]] your addon '''{{Link|enfusion://ResourceManager/~ArmaReforger:Configs/EntityCatalog/US/ | * [[Arma Reforger:Data Modding Basics#Using .22Override in....22 function|Override in]] your addon '''{{Link|enfusion://ResourceManager/~ArmaReforger:Configs/EntityCatalog/US/InventoryItems_EntityCatalog_US.conf|InventoryItems_EntityCatalog_US.conf}}''' | ||
* Open overridden file and locate '''Backpack and Vests''' section inside of it | * 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 | * Add new entry to '''Entities''' list by clicking on '''+ button''' on the right side | ||
Line 202: | Line 230: | ||
[[File:armareforger-new-vest-arsenal-setup.png]] | [[File:armareforger-new-vest-arsenal-setup.png]] | ||
== Testing & Diags == | == Testing & Diags == | ||
Once you done all above steps, you can proceed with testing vest in play mode which is pretty much same as in [[Arma Reforger:Character Gear Creation/Headgear/Prefab Configuration#Testing .26 Diags|Headgear tutorial]]. | Once you done all above steps, you can proceed with testing vest in play mode which is pretty much same as in [[Arma Reforger:Character Gear Creation/Headgear/Prefab Configuration#Testing .26 Diags|Headgear tutorial]]. | ||
[[File:armareforger-new-vest-diag-on.png|743x743px]][[File:armareforger-new-vest-final-result.png]] | [[File:armareforger-new-vest-diag-on.png|743x743px]][[File:armareforger-new-vest-final-result.png]] |
Latest revision as of 23:19, 29 September 2024
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_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
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
Damage pass-through
Especially potent personal protection is also using another layer of damage handling. Vests like 6B3 are using SCR_ArmorDamageManagerComponent to simulate blunt force trauma dealt by bullets, which normally wouldn't do any damage to character since plates completely stopped the bullets. With that component though, character resilience is reduced by each shot at the vest, which might result in character being unconscious after multiple shots. If all shots landed on armored plates, there will be no injuries or bleeding and after a while character can resume combat.
Configuration of that component can be done in following steps:
- Add SCR_ArmorDamageManagerComponent to the vest prefab via + Add Component button
- Add new HitZone element to Additional hit zones list - name of that hit zone doesn't matter but you can call it f.e. Vest
- Enable HZ Default property inside that new hitzone
- Change Max Health property to 10000
- Fill Collider Names list with colliders from the vest
- Please note that list box will only show bones from model which is defined in MeshObject component. It might be necessary to manually type in collider names. As a workaround, you can temporarily change model in MeshObject component to worn variant (the one containing colliders), fill the list and switch back model assigned in MeshObject to previous one
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
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.
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
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.
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 InventoryItems_EntityCatalog_US.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
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.