Jump to content

please help me with modding


Noisy Pants

Recommended Posts

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

Quote

<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?

Link to comment
Share on other sites

10 minutes ago, Noisy Pants said:

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.

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

On 12/14/2021 at 11:10 PM, Noisy Pants said:

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.


 

 

 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...