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

set xpath trader.xml

Sarakatunga

Refugee
hi folks, i'm trying to modify the "prob" of this item "modGunScopeSmall" but i can't get it to work.

What am I doing wrong?

Code:
<configs>

<set xpath="/traders/trader_item_groups/trader_item_group[@name='modGunT1']/item[@name='modGunScopeSmall']/@prob">0.05</set>
  
</configs>
 
Last edited by a moderator:
Yes, if I know, I just want to lower the odds in which it appears.


This is what Telric is trying to tell you:

<setattribute xpath="/traders/trader_item_groups/trader_item_group[@name='modGunT1']/item[@name='modGunScopeSmall']" name="prob">0.05</setattribute>




The set command can only change attributes already in that line.  Since prob doesn't exist, nothing happens.

 
This is what Telric is trying to tell you:

<setattribute xpath="/traders/trader_item_groups/trader_item_group[@name='modGunT1']/item[@name='modGunScopeSmall']" name="prob">0.05</setattribute>




The set command can only change attributes already in that line.  Since prob doesn't exist, nothing happens.
If I have tried it and it works, thank you very much :)

 
Back
Top