I'm trying to essentially completely change the loot that zombies drop; but despite trying a lot of different things, while playing I'll get this error that says:
EXC ArgumentNullException: Value cannot be null.
Parameter name: Name cannot be null
EXC NullReferenceException: Object reference not set to an instance of an object
When leaving the world, the console will then just spam "Object reference not set to an instance of an object", however, only when I get the error in-game.
Here is what is shown in the logs: https://imgur.com/a/9uUsvhM
As the loot.xml I've created is quite big, I'll shorten the list of items within the lootgroups while hopefully retaining all that is important to spot the problem.
<config>
<insertBefore xpath="lootcontainers/lootprobtemplates/lootprobtemplate[@name='veryLow']">
<lootprobtemplate name="extremeLow">
<loot level="1,999999" prob=".02" />
</lootprobtemplate>
</insertBefore>
<remove xpath="/lootcontainers/lootgroup[@name='groupZpackReg01']" ></remove>
<remove xpath="/lootcontainers/lootgroup[@name='groupZpackReg']/item[@group='groupAmmoMedium']" ></remove>
<insertBefore xpath="/lootcontainers/lootgroup[@name='groupZpackReg']">
<lootgroup name="prioritySkillMags">
<item name="harvestingToolsSkillMagazine" count="1" />
</lootgroup>
<lootgroup name="groupWoodOrStone">
<item name="resourceWood" count="24,75" loot_prob_template="medHigh" force_prob="true" />
<item name="resourceRockSmall" count="24,75" loot_prob_template="med" force_prob="true" />
</lootgroup>
<lootgroup name="groupZpackReg01">
<item group="prioritySkillMags" loot_prob_template="medHigh" force_prob="true" />
</lootgroup>
<lootgroup name="groupZpackReg02">
<item group="groupMedicalCustomS" loot_prob_template="medLow" force_prob="true" />
</lootgroup>
<lootgroup name="groupZpackReg03">
<item name="resourceSpring" count="1,2" loot_prob_template="medHigh" />
<item group="groupRareToolsTiered" loot_prob_template="extremeLow" />
</lootgroup>
</insertBefore>
<append xpath="/lootcontainers/lootgroup[@name='groupZpackReg']">
<item group="groupWoodOrStone" count="1" force_prob="true" />
<item group="groupZpackReg01" count="1" />
<item group="groupZpackReg02" loot_prob_template="medHigh" />
<item group="groupZpackReg03" loot_prob_template="low" />
</append>
<insertBefore xpath="/lootcontainers/lootgroup[@name='groupZpackStrong']">
<lootgroup name="groupZpackStrong01">
<item name="resourceElectricParts" count="1,3" loot_prob_template="medLow" />
</lootgroup>
<lootgroup name="groupZpackStrong02">
<item name="resourceScrapLead" count="349,540" loot_prob_template="medLow" />
</lootgroup>
<lootgroup name="groupZpackStrong03">
<item name="drugSteroids" count="1" loot_prob_template="low" />
</lootgroup>
</insertBefore>
<append xpath="/lootcontainers/lootgroup[@name='groupZpackStrong']">
<item group="skillMagazines" loot_prob_template="med" force_prob="true" />
<item group="groupZpackStrong01" count="1" />
<item group="groupZpackStrong02" loot_prob_template="med" />
<item group="groupZpackStrong03" loot_prob_template="low" />
</append>
<insertBefore xpath="/lootcontainers/lootgroup[@name='groupZpackBoss']">
<lootgroup name="groupForgeAddons">
<item name="toolBellows" count="1" loot_prob_template="medHigh" />
</lootgroup>
<lootgroup name="groupZpackBoss01">
<item name="resourceForgedSteel" count="7,12" loot_prob_template="high" force_prob="true" />
</lootgroup>
<lootgroup name="groupZpackBoss02">
<item group="groupMedicalUncommon" />
</lootgroup>
<lootgroup name="groupZpackBoss03">
<item group="groupForgeAddons" loot_prob_template="med" />
</lootgroup>
</insertBefore>
<append xpath="/lootcontainers/lootgroup[@name='groupZpackBoss']">
<item group="groupAmmoLarge" count="1" loot_prob_template="high" force_prob="true" />
<item group="groupZpackBoss01" count="1" />
<item group="groupZpackBoss02" loot_prob_template="medHigh" />
<item group="groupZpackBoss03" loot_prob_template="medLow" />
</append>
</config>
I believe it's the loot.xml from my modlet, as I've played without it, and I've never gotten the error before.
Other than this error, I also notice that I'm getting multiple crafting skill mags for whatever reason from the zombie drops, despite not putting a count on the groups lootgroup, making it seem more likely that it is my modlet - ignore the misaligned lines, they're fixed in the file.