pipermac Posted February 14, 2021 Share Posted February 14, 2021 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. Link to comment Share on other sites More sharing options...
stallionsden Posted February 14, 2021 Share Posted February 14, 2021 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 More sharing options...
pipermac Posted February 14, 2021 Author Share Posted February 14, 2021 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 More sharing options...
stallionsden Posted February 14, 2021 Share Posted February 14, 2021 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 More sharing options...
pipermac Posted February 15, 2021 Author Share Posted February 15, 2021 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 More sharing options...
stallionsden Posted February 15, 2021 Share Posted February 15, 2021 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 More sharing options...
pipermac Posted February 15, 2021 Author Share Posted February 15, 2021 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 More sharing options...
pipermac Posted February 15, 2021 Author Share Posted February 15, 2021 I Figured out the problem! The Game was set for 50% Loot Abundance! throwing everything off...once it was set to 100% it worked perfectly Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.