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

Need help on a mod for primitive weapons to break at zero

Red51

Refugee
I came across a mod from JaxTeller that would cause all weapons to break if not repaired after they fully degraded. I would like to take this idea and make primitive weapons and tools non-repairable and break when fully degraded. I tried several times to figure out the xml for am items.xml file, but can't see what I am missing. My only experience with xml is tinkering in 7DTD.

<config>
<!-- Stone Axe -->
<set xpath="/items/item[@name='meleeToolRepairT0StoneAxe']/property[@name='DegradationBreaksAfter']/@value">true</set>
<remove xpath="/items/item[@name='meleeToolRepairT0StoneAxe']/property[@name='RepairTools']"/>
</config>




Any help is appreciated. If I can get this one to work, I will try to extrapolate the rest of the items.

 
I think you need to use 'setattribute' rather than 'set'. For example:

Code:
<setattribute xpath="/items/item[@name='meleeToolRepairT0StoneAxe']/property[@name='DegradationBreaksAfter']" name="value">true</setattribute>
 
Hey IMatt, thanks for the help.

Some of the items I was changing had the 'DegradationBreaksAfter', but some did not. I had to use 'Set' for those that did and 'Setattribute' for those that did not. Either way, it helped in figuring out both scenarios.

 
Back
Top