Red51
Refugee
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':
<config>
<!-- 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>
</config>
...or...
This method returns an error that the remove and append 'did not apply':
<config>
<!-- 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"/>
</append>
</config>
PS: Is anyone else having trouble with the CODE option in the forums? The loading icon spins for a time before timing out.
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':
<config>
<!-- 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>
</config>
...or...
This method returns an error that the remove and append 'did not apply':
<config>
<!-- 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"/>
</append>
</config>
PS: Is anyone else having trouble with the CODE option in the forums? The loading icon spins for a time before timing out.