• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Decrease DegradationMax after repair?

Survager

Tester
Hi everyone.
Tell me, is it possible to somehow reduce the DegradationMax value of an item after repair in XML?

I tried to do this, but nothing came out

Code:
<append xpath="/items/item[@name='gunHandgunT1Pistol']/effect_group[@name='gunHandgunT1Pistol']">
  <triggered_effect trigger="onSelfItemRepaired" action="ModifyCVar" cvar="DegradationMax" operation="add" value="-1"/>
</append>
 
Last edited by a moderator:
Hi everyone.
Tell me, is it possible to somehow reduce the DegradationMax value of an item after repair in XML?

I tried to do this, but nothing came out

<append xpath="/items/item[@name='gunHandgunT1Pistol']/effect_group[@name='gunHandgunT1Pistol']">
<triggered_effect trigger="onSelfItemRepaired" action="ModifyCVar" cvar="DegradationMax" operation="add" value="-1"/>
</append>

Generally, if a trigger or passive has 'hook up' next to it, it hasn't been implemented quite yet. I'm not sure how often the comments are updated, but chances are it's just not hooked up yet.

 
I tried using a different trigger, but I couldn't change the value "DegradationMax". What am I doing wrong?

Code:
<append xpath="/items/item[@name='gunHandgunT1Pistol']/effect_group[@name='gunHandgunT1Pistol']">
  <triggered_effect trigger="onSelfAimingGunStart" action="ModifyCVar" cvar="DegradationMax" operation="perc_add" value="1"/>
</append>
 
Back
Top