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

please help me with modding

Noisy Pants

Refugee
The log says that the "loot.xml" did not apply.... why?

<config>

    <append xpath="/lootcontainers/lootgroup[@name='groupApparelFaceCover']">
        <item name="apparelBandana" mods="dye" mod_chance="0"/>
        <item name="apparelShades" prob=".7"/>
        <item name="apparelToughGuySunglasses" prob=".7"/>
        <item name="apparelNerdGlasses" prob=".7"/>
        <item name="apparelSkiGoggles" prob=".7"/>
        <item name="apparelAviatorGoggles" prob=".7"/>
        <item name="Superior_Goggles" prob=".4"/>        
    </append>
    
    <append xpath="/lootcontainers/lootgroup[@name='sportingGoods']">
        <item name="meleeToolFlashlight02"/>
        <item name="resourceGunPowder" count="20,50"/>
        <item name="resourceScrapBrass" count="100,250"/>
        <item name="resourceArrowHeadSteelAP"/>
        <item name="toolCookingGrill"/>
        <item name="toolCookingPot"/>
        <item name="resourceLeather" count="5,15"/>
        <item name="medicalFirstAidKit" count="2"/>
        <item name="bedroll"/>
        <item group="groupApparelShirtLong"/>
        <item group="groupApparelPants"/>
        <item name="apparelBandana" mods="dye" mod_chance="0"/>
        <item name="apparelTShirtPlain" mods="dye" mod_chance="0"/>
        <item name="apparelSkiGoggles"/>
        <item name="apparelShades" prob=".7"/>
        <item name="apparelNerdGlasses" prob=".7"/>
        <item name="apparelSkiGoggles" prob=".7"/>
        <item name="apparelAviatorGoggles" prob=".7"/>
        <item name="Superior_Goggles" prob=".4"/>
        <item name="apparelNightvisionGoggles"/>
        <item group="groupApparelHats"/>
        <item name="apparelBallCap" mods="dye" mod_chance="0"/>
        <item name="apparelWornBoots"/>
        <item name="armorFootballHelmet"/>
    </append>
    
</config>
Isn't this the correct format? If so, why isn't this applying?

 
The log says that the "loot.xml" did not apply.... why?

Isn't this the correct format? If so, why isn't this applying?
I believe it is not applying because the 'sportingGoods' loot group does not exist, and those types of items can be found among other specialist and generic groups instead.

 
Append adds to already existing loot groups. You should use InsertAfter to add your own loot groups, than just build it like a normal lootgroup. So it would look like this:

  <insertAfter xpath="/lootcontainers/lootgroup[@name='groupBuriedLootStashTreasure']">

    <lootgroup name="Biker">
        <item name="vehicleMinibikeChassis" prob="0.4"/>
        <item name="vehicleWheels" prob="0.4"/>
        <item name="vehicleMinibikeHandlebars" prob="0.4"/>        
    </lootgroup>

<insertAfter/>

So the last group in the list would be what is typed in the @name= spot.

 
The log says that the "loot.xml" did not apply.... why?

Isn't this the correct format? If so, why isn't this applying?


As others have said, you are doing it wrong.   

Use Append to add a thing to an existing OTHER thing

<append xpath="/lootcontainers/lootgroup[@name='groupApparelFaceCover']">
<item name="apparelBandana" mods="dye" mod_chance="0"/>
<item name="apparelShades" prob=".7"/>
<item name="apparelToughGuySunglasses" prob=".7"/>
<item name="apparelNerdGlasses" prob=".7"/>
<item name="apparelSkiGoggles" prob=".7"/>
<item name="apparelAviatorGoggles" prob=".7"/>
<item name="Superior_Goggles" prob=".4"/>
</append>


In this case, you are added to the existing lootgroup named groupApparelFaceCover things which already exist in that lootgroup.    Your code for that one should be 

<append xpath="/lootcontainers/lootgroup[@name='groupApparelFaceCover']">
<item name="Superior_Goggles" prob=".4"/>
</append>




And as the other two commenters mentioned, there is no sportingGoods lootgroup to append to so you either need to find the xpath of the correct group OR append your own lootgroup and add the items you want to it.


 

 
Back
Top