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

XPATH HELP

DragonShadow

New member
Hello,

I edit allot of the .xml files myself. But every time there is an update, it always gets overridden. Would someone please help me with a problem I have. I am trying to write a mod that will change the delay time of the following:

<item name="meleeHandMaster">
    <property name="Tags" value="blunt,melee,light,perkFlurryOfFortitude"/>
    <property name="CreativeMode" value="None"/>
    <property name="HoldType" value="9"/>
    <property name="Material" value="Morganic"/>
    <property name="Canhold" value="false"/>
    <property name="Stacknumber" value="65000"/>
    <property name="Candrop" value="false"/>
    <property name="CustomIcon" value="missingIcon"/>
    <property class="Action0"><!-- AttackAction -->
        <property name="Class" value="Melee"/>
        <property name="Delay" value="1"/> <!-- obsolete if rounds per minute exists -->
        <property name="Range" value="1.65"/> <!-- This not what "clientside melee combat" means. 😃 This is the adjustment afterwards due to code changes. -->
        <property name="Sphere" value=".1"/>
        <property name="Block_range" value="2.5"/>
        <property name="DamageEntity" value="10"/>
        <property name="DamageBlock" value="16"/>
    </property>
    <effect_group name="meleeHandMaster" tiered="false">
        <passive_effect name="DamageFalloffRange" operation="base_set" value="1.65"/>
    </effect_group>
</item>

What I wrote is the following:

<set xpath="/items/item[@name='meleeHandMaster']/property[@class='Action0']/property[@name='Delay']/@value">0.01</set>

However this is not working. It is not giving me an error, but it is not working either. Could someone please help assist me in what I am doing wrong? Please show me the correct format.
Thank you for all of your time and assistance with this issue!

 
I'm not at my computer atm, but make sure it is in a file of the proper name and you put that xpath inside the correct block (e.g.   <items> </items> ) and correctly set it up as a mod with appropriate mod_info.xml and file structure.

 
I have does this and it is not working. Please verify my work and tell me if I setup the proper coding for it.

Thank you.

 
At a glance that xpath looks right. Look at your console when loading into a game, do you see your mod loading?

 
May I ask how you are measuring that it doesn't work?  Some animations will only speed up a certain amount (the lockpicking is an example) because its tied to other functions being executed. Could you start at maybe .5 then .25 then .09 etc.. see if there is a cutoff where it defers to the default value.

What happens if you set it to 10.0 or something like that - do you see any variance at all?

As a side note, probably not needed but can you confirm that the <set> code you're using is not inadvertently defined within another element (eg <set> or <append>) , sometimes the parser will completely ignore code and not WRN or ERR if its not contained within the correct element structure.

cheers

 
Last edited by a moderator:
The mod loads correctly with no errors. It just does not do what it is spouse to do.

If I change it directly in the .xml vanilla file I can read stacks of books fast, no animation, no pause. Using the mod does not work. It will still read the books but it will still pause, so the mod is not working. If someone, ANYONE would be able to verify my mod line and verify to see if they can get it working properly I would appreciate it.

Thank you

 
I suspect that the [@class='Action0'] section is the problem. I have had an issue very similar before, I didnt pursue it too much but I settled on the my own conclusion that the 'class' property isnt indexable.

I wonder if something like

<set xpath="/items/item[@name='meleeHandMaster']/property/property[@name='Delay']/@value">0.01</set>

might change the outcome for you?

If nothing works I suggest setting the whole object:

<set xpath="/items/item[@name='meleeHandMaster']">

    ..

   ...

</set>

cheers

 
Back
Top