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

Lootcontainers not Lootcontaining

TehAgent

Refugee
Im at a loss for whats wrong here....this was working prior to the recent update.

I changed the winebarrels and cardboard box stacks to loot containers, since at a bare minimum stacks of boxes would definitely have 'things' in the boxes.

This is what the block looks like:


<block name="palletBrownBoxesBase">
<property name="Material" value="MCardboardLoot"/>
<property name="Class" value="Loot"/>
<property name="Shape" value="ModelEntity"/>
<property name="Model" value="@:Entities/Industrial/boxesCardboardPalletPrefab.prefab"/>
<property name="ImposterExchange" value="imposterBlock" param1="149"/>
<property name="WaterFlow" value="permitted"/>
<property name="Collide" value="sight,movement,melee,bullet,arrow,rocket"/>
<property name="Path" value="solid"/>
<drop event="Harvest" name="resourcePaper" count="1,3" tag="allHarvest,perkJunkMiner"/>
<drop event="Harvest" name="resourceScrapPolymers" count="1,3" tag="allHarvest,perkJunkMiner"/>
<drop event="Destroy" count="0"/>
<drop event="Fall" name="terrDestroyedWoodDebris" count="1" prob="0.75" stick_chance="1"/>
<property name="SortOrder1" value="B278"/>
<property name="SortOrder2" value="0000"/>
<property name="FilterTags" value="MC_building,SC_commercial,SC_construction,SC_decor"/>
</block>

So I went to loot.xml and added these:

Lootcontainer:

<lootcontainer name="palletBrownBoxesBase" count="2" size="4,4" sound_open="UseActions/open_cardboard" sound_close="UseActions/close_cardboard" loot_quality_template="qualBaseTemplate">
<item group="pallets"/>
</lootcontainer>

Lootgroup:

<lootgroup name="pallets">
<item name="resourceScrapIron" count="1,5" loot_prob_template="medLow"/>
<item name="resourceScrapPolymers" count="1,5" loot_prob_template="medLow"/>
<item name="resourceScrapLead" count="1,5" loot_prob_template="medLow"/>
<item name="resourceScrapBrass" count="1,5" loot_prob_template="medLow"/>
<item name="toolCookingGrill" count="1" loot_prob_template="veryLow"/>
<item name="toolCookingPot" count="1" loot_prob_template="veryLow"/>
<item name="meleeWpnBladeT1HuntingKnife" count="1" loot_prob_template="veryLow"/>
<item group="groupArmorParts" loot_prob_template="veryLow"/>
<item group="groupArmorScaled" loot_prob_template="veryLow"/>
<item group="groupModAllScaled" loot_prob_template="veryLow"/>
<item group="groupTreasureMaps" loot_prob_template="veryLow"/>
<item name="resourceCloth" count="1,5" loot_prob_template="high"/>
<item name="resourceMetalPipe" count="1,3" loot_prob_template="low"/>
<item name="resourceLockPick" count="1,3" loot_prob_template="med"/>
<item group="toolParts" loot_prob_template="medLow"/>
<item group="groupCrackabookCrate01" loot_prob_template="veryLow"/>
<item group="groupCrackabookCrate02" loot_prob_template="veryLow"/>
<item group="groupCrackabookCrate03" loot_prob_template="veryLow"/>
<item group="skillMagazines" loot_prob_template="medLow"/>
<item name="resourceWood" count="50,200" loot_prob_template="med"/>
<item group="groupScrapCommon" loot_prob_template="med"/>
<item group="groupBuildingCommon" loot_prob_template="med"/>
<item group="groupCraftingCommon" loot_prob_template="med"/>
<item group="seeds" loot_prob_template="low" tags="seedSkill"/>
<item group="groupScrapUncommon" loot_prob_template="medLow"/>
<item group="groupCraftingUncommon" loot_prob_template="medLow"/>
<item group="groupBuildingUncommon" loot_prob_template="medLow"/>
<item group="groupAmmoResourcesSmall" loot_prob_template="low"/>
<item name="resourceFeather" count="1,5" loot_prob_template="low"/>
<item group="weaponParts" loot_prob_template="veryLow"/>
</lootgroup>

However, when I load the game, it stops on blocks, saying that the box doesnt have a lootcontainer. It skips past the first two and goes to the one. So I remove the loot class from the block and delete the entry to see whats wrong here. It skips the first two again, and goes to the next pallet loot group.

*however*

If I remove ALL of the cardboard box stacks, it stops skipping the first two (ice machine and broken vending) and THEN tells me that those also dont have a loot list.

But they all do...Im baffled. Especially at how it skips the first two loot containers, and doesnt register them as having a problem until i remove all of the other loot containers. Ive checked the spelling multiple times, copy-pasted names back and forth....nothing works. This was just working perfectly fine before the early August update.
 
Update:

Ive tried copying the loot list for the boxes to the loot list for the first container it skips, Ice machines.

It does not report an error on the ice machines, and instead skips to the boxes block again. It also skips past the first two custom loot containers to the boxes block no matter what loot list I paste in to the lootcontainer. I can paste the list Im using for these boxes into the first custom container, and it still skips right past it.

My next step is to remove the loot class from every custom loot container, and see what errors if any are then reported.

EDIT: Instead of spamming my own thread Im just gonna edit this comment.

Removing all of the custom loot containers did allow it to load. I still do not see whats wrong here. I have a loot container that points to a lootgroup. This makes no sense at all; I have to be missing something. (but this DID work prior to the last update)

Now Im going to change a default lootcontainer list to point to one of mine, and if thats ok, I know the problem isnt the lootgroup itself.

Edit#2:

AHA. I might have found it.

Right before my loot lists start, a " was missing. It was missing after 'resourceBrokenGlass'.

<lootgroup name="WineBottle" count="all">
<item name="resourceBrokenGlass count="1,2"/>
<item name="drinkJarWine" count="1,2" loot_prob_template="veryLow"/>
</lootgroup>

Im thinking the console didnt see that as the error and instead crapped itself starting right after...right where MY lootcontainers begin. Im not sure why it skips the first two but it does weird stuff like that all the time. This isnt the first time Ive had to trace a syntax error back from something that wasnt broken.
 
Last edited:
Alright, I figured it out (replying in case someone ever searches these threads for a similar problem)

I had to add the loot list to the block.

<property name="LootList" value="wineBarrel"/>

That stopped the problem. The missing quote was also a problem, but maybe not the main one. Everything loads now that I put the loot list in the block.xml listing. I dont recall doing that before, but thats why theyre called mistakes I guess.
 
Back
Top