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

Making spear do bleeding damage.

Shino

New member
Basically the title.

I'm doing this.

<insertAfter xpath="/items/item[starts-with(@name, 'meleeWpnSpear')]/property[@class='Action0']/property[@name='Class' and @value='DynamicMelee']">
<property name="Damage_type" value="Slashing"/>
</insertAfter>

<setattribute xpath="/items/item[starts-with(@name, 'meleeWpnSpear')]/property[@name='Tags']" name="value">knife,melee,grunting,medium,weapon,meleeWeapon,longShaft,attPerception,perkJavelinMaster,perkDeepCuts,perkTheHuntsman,canHaveCosmetic,thrownWeapon</setattribute>



But the game says 
image.png

So, I can see the error comes from the second line when trying to change the tags. I'm using an xpath evaluator to see what nodes get selected and Xpath wise it selects the property with the Tags name

image.png

So, here I am, wondering why the long sticks with a knife taped to its end don't count as knives.

 
Last edited by a moderator:
So, what you're doing is adding a new attribute to the Tags property.. meaning it now has two value=""... Setattribute is only when a node does not have an attribute (for example a value=) and you want to add it. So <property name="tags" /> you would use a setattribute with the value like you have it and it would turn into <property name="tags" value="adskfaj;sdlfks" />


If a node already has the attribute you need, you can either remove it and append, or use a <set xpath>.. This will basically wipe out what's in the value="" and change it to what you use.

Hope that helps!

Also, just noticed.. you have a closing double quotes before the name part of your setattribute. Though that doesnt matter when you change it over to <set>

 
Back
Top