• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Adding Food to Loot

AaronG85

Refugee
Is there an easy way to add food to the loot or is it best to add each kind to each loot group so it makes sense (water in coolers, cooked food in ovens ect)

 
You just have to modify the loot xml file.  using the oven as an example:

At the bottom of the file are the loot containers

<!-- stove/oven, cooking pots and pans rotten food -->
<lootcontainer id="11" name="oven" count="1" size="6,2" sound_open="UseActions/open_mailbox" sound_close="UseActions/close_mailbox" loot_quality_template="qualBaseTemplate">
    <item group="groupOven"/>
</lootcontainer>




This tells the game to use the loot group groupOven when you search it.  Here is the loot group groupOven

<lootgroup name="groupOven" count="all">
    <item group="groupOven01" count="1"/>
    <item group="groupOven02" loot_prob_template="veryLow" force_prob="true"/>
</lootgroup>




So this pulls an item from two loot groups (though groupOven02 has a very low probability of pulling)

And here are those two groups broken down even more

Code:
<!-- *** Oven_Loot -->
<lootgroup name="groupOven01">
    <item name="toolCookingPot" loot_prob_template="veryLow"/>
    <item name="toolCookingGrill" loot_prob_template="veryLow"/>
    <item name="resourceCoal" count="10,20" loot_prob_template="med"/>
    <item name="foodRottingFlesh" count="1,5" loot_prob_template="med"/>
    <item name="foodCharredMeat" count="1,2" loot_prob_template="low"/>
</lootgroup>

<lootgroup name="groupOven02">
    <item group="groupFoodCommon" loot_prob_template="low"/>
    <item group="groupFoodUncommon" loot_prob_template="low"/>
    <item group="groupIngredientsCommon" loot_prob_template="high"/>
</lootgroup>
 
Back
Top