Reyhard/Sandbox/Character Gear Creation/Vest/Prefab Configuration – User
(Created page with "{{TOC|side}}{{Feature|informative|'''Previous part''' - Asset Preparation}}{{Messagebox|'''Overview''' Thi...") |
Lou Montana (talk | contribs) m (Text replacement - "overriden" to "overridden") |
||
(4 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
This chapter covers following topics: | This chapter covers following topics: | ||
* | * Vest prefab creation & configuration | ||
* Adding | * Setting protection setup on items | ||
* Adding vest to arsenal|💬|#CDF}} | |||
== Prefab Setup == | == Prefab Setup == | ||
Line 10: | Line 10: | ||
== 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/ | 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''''' | |||
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.{{Feature|informative|In this article, [[Arma_Reforger:Resource_Manager:_Options#Register_.22enfusion:.2F.2F.22_protocol|'''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]}} | 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.{{Feature|informative|In this article, [[Arma_Reforger:Resource_Manager:_Options#Register_.22enfusion:.2F.2F.22_protocol|'''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]}} | ||
[[File:armareforger-new-vest-baseLoadoutClothComponent.png|thumb|587x587px|'''BaseLoadoutClothComponent''' content]] | |||
=== 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 | |||
* Enable '''PhysicsOnWearEnabled''' & '''AnimateCollidersOnWear''' properties | * Enable '''PhysicsOnWearEnabled''' & '''AnimateCollidersOnWear''' properties | ||
* Assign item model to '''ItemModel''' in '''BaseLoadoutClothComponent''' & to property '''Object''' in '''MeshOjbect''' component | * Assign item model to '''ItemModel''' in '''BaseLoadoutClothComponent''' & to property '''Object''' in '''MeshOjbect''' component | ||
* Assign worn model to '''WornModel''' | * Assign worn model to '''WornModel''' | ||
* Change '''SoundInt''' parameter | * '''Optionally''': Change '''SoundInt''' parameter from 400 (''generic vest sounds'') to something different | ||
** This parameter is responsible for additional sounds that are being played certain type of | ** 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 [[Arma Reforger:Character SoundInfo Signals Reference|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'''''{{Messagebox|'''Tip''': You can find details how to create variants of vest with different material on [[Arma_Reforger:Faction_Creation#Retexturing_existing_equipment|following page]].|✩|#88cc88}}{{Clear}} | |||
== Inventory Configuration == | |||
Configuration of inventory is quite similar compared to weapon or headgear, therefor it is suggested to take a look at [[Arma Reforger:Weapon Creation/Prefab Configuration#Inventory Configuration|Weapon Creation page]] or [[Arma Reforger:Character Gear Creation/Headgear/Prefab Configuration#Inventory Configuration|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.''' | |||
[[File:armareforger-new-vest-cloth-node-setup.png|thumb|829x829px|'''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.''' | |||
[[File:armareforger-new-vest-change-component.gif]] | |||
When inheriting from '''{{Link|enfusion://ResourceManager/~ArmaReforger:Prefabs/Characters/Core/VestArmored_Base.et|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: | |||
[[File:armareforger-new-vest-inventory-menu.png|none|thumb|'''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 === | |||
{{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 '''omnidirectiona'''l! 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" | |||
|+ | |||
!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 === | |||
[[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: | |||
[[File:armareforger-new- | |||
* 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 [https://en.wikipedia.org/wiki/List_of_body_armor_performance_standards#NIJ_armor_standard_(United_States) '''NIJ IIA''' level] was selected - vest without plates should still protect against pistol bullets | |||
** You can take a look at [https://github.com/BohemiaInteractive/Arma-Reforger-Misc/blob/main/Configuration/Weapons/Weapons_Penetration_List.xlsx following spreadsheet] to compare various protection standards | |||
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- | |||
== Adding to Arsenal == | == Adding to Arsenal == | ||
Line 55: | Line 152: | ||
* [[Arma Reforger:Data Modding Basics#Using .22Override in....22 function|Override in]] your addon '''{{Link|enfusion://ResourceManager/~ArmaReforger:Configs/EntityCatalog/US/US_InventoryItems.conf|US_InventoryItems.conf}}''' | * [[Arma Reforger:Data Modding Basics#Using .22Override in....22 function|Override in]] your addon '''{{Link|enfusion://ResourceManager/~ArmaReforger:Configs/EntityCatalog/US/US_InventoryItems.conf|US_InventoryItems.conf}}''' | ||
* Open | * 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 | ||
* Assign your prefab to '''Entity Prefab''' field | * 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 | * 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 ''' | * 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 | If everything went fine, you should end up with something like on the picture below | ||
[[File:armareforger-new- | [[File:armareforger-new-vest-arsenal-setup.png]] | ||
== Testing & Diags == | == Testing & Diags == | ||
Once you done all above steps, you can proceed with testing | 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]]. | ||
Latest revision as of 14:36, 9 November 2023
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 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.