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

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

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.

 
Back
Top