Jump to content

Loot Mod Xml Files


EricEric711

Recommended Posts

First time poster warning I have already figured out what xml file to edit to decrease LootAbumnance to 0%. this makes it so no loot is given out except in the final loot boxes/bags/chests and also the loot quest reward from the trader and breaking down items with a wrench etc I'm now trying to figure out what xml file(s) to edit to reduce that to zero. Ultimately I'm trying to get the game to where you have to buy all items from the trader in order to make other items Any ideas?

Link to comment
Share on other sites

For anything loot related, you would look at the loot containers at the end and modify the ones you want to change.

 

For example, if you look at the first one on the list around line 9022, that is the player crafted storage box

 

<!-- empty, storage containers the player crafts, cntWoodWritableCrate-->
<lootcontainer name="playerWoodWritableStorage" count="0" size="8,6" sound_open="UseActions/open_chest" sound_close="UseActions/close_chest" loot_quality_template="qualBaseTemplate">
    <item name="cobweb" count="0"/>
</lootcontainer>

 

So there is a loot item in it, but just a cobweb.  You will also note that the top line has a count=0 along with the item itself (count=0).  For each container, TFP added a comment describing what it is so you just need to go through each one to find the ones you want to modify.

 

If I was doing it, I would first try this route (example is for the T1 chest):

 

Existing code

<!-- cntLootChestHeroInsecureT1, T1_Wood_Crate -->
<lootcontainer name="reinforcedChestT1" count="1" size="8,9" sound_open="UseActions/chest_tier1_open" sound_close="UseActions/chest_tier1_close" loot_quality_template="qualPlus1Template" ignore_loot_abundance="true">
    <item group="groupReinforcedChestT1"/>
</lootcontainer>

 

Code to add

<remove xpath="//lootcontainer[@name='reinforcedChestT1']"/>



<insertAfter xpath="//lootcontainer[@name='mopowerCrate']">

<!-- cntLootChestHeroInsecureT1, T1_Wood_Crate -->
<lootcontainer name="reinforcedChestT1" count="0" size="8,9" sound_open="UseActions/chest_tier1_open" sound_close="UseActions/chest_tier1_close" loot_quality_template="qualPlus1Template" ignore_loot_abundance="true">
    <item name="cobweb" count="0"/>
</lootcontainer>

</insertAfter>

 

If you are looking to remove quest rewards, I have a modlet already that does it.  Search for the post created by me in the mods section and you can look at the code on how I did it.  I put comments in my mod so you can find that section easy and what else my mod does.

 

For salvaging, one way to do it is to look into the blocks file and change the values for all the items you are changing:

 

    <drop event="Harvest" name="terrStone" count="0" tool_category="Disassemble"/>
    <drop event="Harvest" name="resourceScrapIron" count="20" tag="allHarvest"/>
    <drop event="Harvest" name="resourceWood" count="20" tag="allHarvest"/>
    <drop event="Destroy" count="0"/>
    <drop event="Fall" name="terrDestroyedWoodDebris" count="1" prob="0.75" stick_chance="1"/>

 

This is the collapsed workbench.  Here you just need to do a set.  For example:

 

<set xpath="//block[@name='cntCollapsedWorkbench']/drop/@count">0</set>

 

If I did that right, all 5 drop events in this block should now have count set to 0 and not give you anything back.

 

Something like this:

 

<set xpath="//drop/@count">0</set>

 

would change all counts to 0 in the entire blocks file.

 

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