• 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.

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