Jump to content

Specific loot in prefab?


pipermac

Recommended Posts

8 minutes ago, pipermac said:

Is it possible and if so how, to create a prefab that has a loot container that always has the same items in it?  I tried creating one, put a container, put the items in the container but then when I went to it in game it was just random items in it. 

Create a container and add a loot group with the items you want in it. Link the loot group to the container and add a count="all" next to the lootgroup name . 

 

Ie: <lootgroup name="container1" count="all">

Then  your items go here.

Link to comment
Share on other sites

6 minutes ago, stallionsden said:

Create a container and add a loot group with the items you want in it. Link the loot group to the container and add a count="all" next to the lootgroup name . 

 

Ie: <lootgroup name="container1" count="all">

Then  your items go here.

Ahh.. So a brand new container and just use the model of an existing one... I got it! Thanks

Link to comment
Share on other sites

2 hours ago, pipermac said:

Ahh.. So a brand new container and just use the model of an existing one... I got it! Thanks

Yeh pretty much copy a existing container  and its loot group and change the container name and lootgroup values in loot.xml of the copied container and in the block itself to link the loot.xml one  localizarion to if you wanted to go that far 

Link to comment
Share on other sites

19 hours ago, stallionsden said:

Yeh pretty much copy a existing container  and its loot group and change the container name and lootgroup values in loot.xml of the copied container and in the block itself to link the loot.xml one  localizarion to if you wanted to go that far 

thanks...still having bit of trouble.. this is the code I used for loot.xml:

 

<insertAfter xpath="/lootcontainers/lootgroup[@name='groupBirdNestMain']">
<lootgroup name="StarterItems" count="all">
                <item name="meleeToolPickT3Auger"/>
                <item name="gunHandgunT1Pistol"/>
                <item name="ammo9mmBulletBall" count="200"/>
                <item name="resourceRepairKit" Count="5"/>
                <item name="meleeToolSalvageT1Wrench"/>
</lootgroup>
    </insertAfter>    
<append xpath="/lootcontainers" >    
    <lootcontainer id="225" count="1" size="10,9" destroy_on_close="true" sound_open="SupplyDrops/open_supply_crate" sound_close="SupplyDrops/close_supply_crate" >
 <item group="StarterItems" />
    
      </lootcontainer>    
    </append>  

 

when I go and open one of the containers  I got a level 5 Pistol and 100 9mm rounds...and thats it.
Any ideas?

Link to comment
Share on other sites

32 minutes ago, pipermac said:

thanks...still having bit of trouble.. this is the code I used for loot.xml:

 

<insertAfter xpath="/lootcontainers/lootgroup[@name='groupBirdNestMain']">
<lootgroup name="StarterItems" count="all">
                <item name="meleeToolPickT3Auger"/>
                <item name="gunHandgunT1Pistol"/>
                <item name="ammo9mmBulletBall" count="200"/>
                <item name="resourceRepairKit" Count="5"/>
                <item name="meleeToolSalvageT1Wrench"/>
</lootgroup>
    </insertAfter>    
<append xpath="/lootcontainers" >    
    <lootcontainer id="225" count="1" size="10,9" destroy_on_close="true" sound_open="SupplyDrops/open_supply_crate" sound_close="SupplyDrops/close_supply_crate" >
 <item group="StarterItems" />
    
      </lootcontainer>    
    </append>  

 

when I go and open one of the containers  I got a level 5 Pistol and 100 9mm rounds...and thats it.
Any ideas?

Did you make a loot group as well in the loot.xml with a lootcontainer id not used by other containers/lootable objects then put that value in the container. 

Link to comment
Share on other sites

ya its the first part  used "225"

<insertAfter xpath="/lootcontainers/lootgroup[@name='groupBirdNestMain']">
<lootgroup name="StarterItems" count="all">
                <item name="meleeToolPickT3Auger"/>
                <item name="gunHandgunT1Pistol"/>
                <item name="ammo9mmBulletBall" count="200"/>
                <item name="resourceRepairKit" Count="5"/>
                <item name="meleeToolSalvageT1Wrench"/>
</lootgroup>
    </insertAfter>

 

If I change the Item in the group I definitely get the different items but the the amount  of items or which items is not accurate

Also...I when I test it multiple time I will get different combinations of loot.  Its as if the "all" is not working and the "count" in the items is being ignored.

 

second try it gave me 3 repair kits and 100 rounds of 9mm

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...