Jump to content

Little help with adding 'prob' on item in traders.xml?


Recommended Posts

The XML is slowly starting to make sense, but...I am struggling to see my error here.


I am trying to add a probability to lockpicks being found at traders. I tried two different methods, but both are erroring out. If I could get a bit of help with both options, I would appreciate it. Having a growing library of sample scripts has been helpful. Thank you.


This method returns an error that the setattribute 'did not apply':


<!-- Deminish the chance of finding picks at traders -->

    <setattribute xpath="/trader_item_groups/trader_item_group[@name='generalResources']/item[@name='resourceLockPick']" name="prob">0.6</setattribute>





This method returns an error that the remove and append 'did not apply':


<!-- Deminish the chance of finding picks at traders -->

    <remove xpath="/trader_item_groups/trader_item_group[@name='generalResources']/item[@name='resourceLockPick']"/>
    <append xpath="/trader_item_groups/trader_item_group[@name='generalResources']">
        <item name="resourceLockPick" count="1,10" prob="0.6"/> 




PS: Is anyone else having trouble with the CODE option in the forums? The loading icon spins for a time before timing out.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...