Since you don't want to touch the vanilla files (which is a good idea), I assume you want to use XPath in your own modlet - either the one you have now, or a new one.
There are two solutions you could use:
- Insert the items from the other mod, into the vanilla "shamwayProduce" loot list.
- Change the vanilla produce basket blocks (the ones that start with "cntStoreProduceBasket") so they use a different loot group - either from the other mod, or from your own.
I would personally go with the first option since it's easier. (But there are some limitations - see below.)
Let's say the other mod had items named "foodApple", "foodGourd", "foodLettuce", and "foodMelon". Here's how you would add it to the existing, vanilla loot list.
<!-- loot.xml -->
<append xpath="//lootgroup[@name='groupShamwayProduce01']">
<!-- Use whatever counts and probability templates you think are reasonable -->
<item name="foodApple" count="2,4" loot_prob_template="low" />
<item name="foodGourd" count="2,4" loot_prob_template="low" />
<item name="foodLettuce" count="2,4" loot_prob_template="low" />
<item name="foodMelon" count="2,4" loot_prob_template="low" />
</append>
But, remember that I said there were some limitations. And from the foods I chose, you can probably guess what it is.
In vanilla, all the produce baskets use the same loot group - even though they ostensibly contained different kinds of produce. So if you want to put the other mod's foods into only
some kinds of produce basket, then you're out of luck with this solution.
If that doesn't bother you, then you should probably use this solution, since it's easier.
If it's not what you want, you would have to go with the second solution. But instead of assigning each basket to the
same loot group, you would create different loot groups for each kind of produce basket.
<!--
in loot.xml
-->
<!-- Loot groups -->
<insertAfter xpath="//lootgroup[last()]">
<lootgroup name="groupProduceBasketApples" count="all">
<!-- Include the vanilla produce basket group -->
<item group="groupShamwayProduce01" loot_prob_template="high" />
<item name="foodApple" count="2,4" loot_prob_template="low" />
</lootgroup>
<lootgroup name="groupProduceBasketGourds" count="all">
<item group="groupShamwayProduce01" loot_prob_template="high" />
<item name="foodGourd" count="2,4" loot_prob_template="low" />
</lootgroup>
<lootgroup name="groupProduceBasketLettuce" count="all">
<item group="groupShamwayProduce01" loot_prob_template="high" />
<item name="foodLettuce" count="2,4" loot_prob_template="low" />
</lootgroup>
<lootgroup name="groupProduceBasketMelons" count="all">
<item group="groupShamwayProduce01" loot_prob_template="high" />
<item name="foodMelon" count="2,4" loot_prob_template="low" />
</lootgroup>
</insertAfter>
<!--
Loot containers - starting at ID 271 to not conflict with vanilla
(but as long as they don't conflict it doesn't matter, they're not used)
-->
<insertAfter xpath="//lootcontainer[last()]">
<!-- cntStoreProduceBasketApples -->
<lootcontainer id="271" name="produceBasketApples" count="1" size="6,2" sound_open="UseActions/open_shopping_basket" sound_close="UseActions/close_shopping_basket" loot_quality_template="qualBaseTemplate">
<item group="groupProduceBasketApples" />
</lootcontainer>
<!-- cntStoreProduceBasketGourds -->
<lootcontainer id="272" name="produceBasketGourds" count="1" size="6,2" sound_open="UseActions/open_shopping_basket" sound_close="UseActions/close_shopping_basket" loot_quality_template="qualBaseTemplate">
<item group="groupProduceBasketGourds" />
</lootcontainer>
<!-- cntStoreProduceBasketLettuce -->
<lootcontainer id="273" name="produceBasketLettuce" count="1" size="6,2" sound_open="UseActions/open_shopping_basket" sound_close="UseActions/close_shopping_basket" loot_quality_template="qualBaseTemplate">
<item group="groupProduceBasketLettuce" />
</lootcontainer>
<!-- cntStoreProduceBasketMelons -->
<lootcontainer id="274" name="produceBasketMelons" count="1" size="6,2" sound_open="UseActions/open_shopping_basket" sound_close="UseActions/close_shopping_basket" loot_quality_template="qualBaseTemplate">
<item group="groupProduceBasketMelons" />
</lootcontainer>
</insertAfter>
<!--
In blocks.xml
-->
<set xpath="//block[contains(@name, 'cntStoreProduceBasketApples')]/property[@name='LootList']/@value">produceBasketApples</set>
<set xpath="//block[contains(@name, 'cntStoreProduceBasketGourds')]/property[@name='LootList']/@value">produceBasketGourds</set>
<set xpath="//block[contains(@name, 'cntStoreProduceBasketLettuce')]/property[@name='LootList']/@value">produceBasketLettuce</set>
<set xpath="//block[contains(@name, 'cntStoreProduceBasketMelons')]/property[@name='LootList']/@value">produceBasketMelons</set>
That should be enough to get you going, I hope.