• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Add Passive buff to an armor?

Marc Plaisance

New member
Hi guys im trying to add a passive buff to any armor piece for exemple i want to add buffDrugAntibiotics on the military vest so when i wear it the buff is always active. thats just an example i tried many buff and i cant find a way to make it work.I f some have any idea plzz let me know tyvm in advance.

 
Hi guys im trying to add a passive buff to any armor piece for exemple i want to add buffDrugAntibiotics on the military vest so when i wear it the buff is always active. thats just an example i tried many buff and i cant find a way to make it work.I f some have any idea plzz let me know tyvm in advance.
What is your goal of this? If you want to not get infected while wearing it you can go with

<passive_effect name="BuffResistance" operation="base_set" value="1" tags="buffIllInfection0"/>

If you want to trigger a buff from starting to wear something you'd have to go with triggered_effects onSelfEquipStart and onSelfEquipStop and then addbuff.

<triggered_effect trigger="onSelfEquipStop" action="RemoveBuff" target="self" buff="buffDrugAntibiotics "/>

<triggered_effect trigger="onSelfEquipStart" action="AddBuff" target="self" buff="buffDrugAntibiotics "/>

Not tested.

Edit: Thats both in the item's effect_group! Also the Antibiotics buff has a duration so I would recreate it without duration in order to not having to dress up and undress your vest every 10 minutes.

 
Alright tyvm i think this will work but how can i remove the duration i mean make it infinite i want the buff to be always on when i wear it and the antibiotics buff was an example,

 
<item name="superarmorMilitaryVest"><property name="Extends" value="armorMilitaryMaster" param1="CustomIcon"/>

<property name="Tags" value="upperbody,chest,armor,armorChest,lightarmor"/>

<property name="EquipSlot" value="Chest"/>

<effect_group>

<passive_effect name="ModSlots" operation="base_set" value="5" tier="1,6"/>

<passive_effect name="PhysicalDamageResist" operation="base_add" value="30"/>

<passive_effect name="DegradationMax" operation="base_set" value="15000" tier="1,6"/>

<passive_effect name="Mobility" operation="perc_subtract" value="0"/>

<passive_effect name="StaminaChangeOT" operation="perc_subtract" value="0" tags="walking"/>

<passive_effect name="StaminaChangeOT" operation="perc_subtract" value="0" tags="running"/>

<display_value name="dStaminaChangeOT" value="+100"/>

<passive_effect name="NoiseMultiplier" operation="perc_add" value="0" />

<passive_effect name="BuffResistance" operation="base_add" value="1" tags="buffIllInfection0,buffInjuryBleeding,buffInjuryStunned1"/>

<triggered_effect trigger="onSelfEquipStart" action="AddBuff" target="self" buff="superbuffDrugAntibiotics,superbuffBeer,superbuffDrugSteroids,superbuffDrugRecog"/>

<triggered_effect trigger="onSelfEquipStop" action="RemoveBuff" target="self" buff="superbuffDrugAntibiotics,superbuffBeer,superbuffDrugSteroids,superbuffDrugRecog"/>

</effect_group>

<property class="UMA">

<property name="Mesh" value="armor_kevlar_vest"/>

<property name="Overlay0" value="armor_kevlar_vest"/>

<property name="Layer" value="2"/>

<property name="UISlot" value="ChestArmor"/>

</property>

</item>

Alright everything works fine i recreated some buff and evrything is working excpet for the icon. its not whowing anything the vest is there but no icon can u help whit that?

 
Whenever you create a custom block or item, you have to use:

<property name="CustomIcon" value="(icon)"/>

...Else it won't have an inv icon :)

 
so i type <property name="CustomIcon" value="armorMilitaryVest"/>

???
yes.

<property name="CustomIconTint" value="ff0cce"/> colors the icon properly. Use HTML Color Picker to get the code from colors. (works both with the RGB and html)

 
Back
Top