• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Modlet to remove variations on items of the same quality?

Nucleus24

Refugee
I want a modlet to remove item variation inside items of the same rank. I've been messing arround with items.xml, and I've found a lot of lines that resemble this:

operation="perc_add" value="-.05,.05"/> <!-- random StamLoss -->

I have no idea how to make a modlet, but I would like to make one that goes through the item.xml file and removes all of those "random values".

Is there a simple way to do this?

 
Im still Trying to understand Xpath so I know this is wrong but ive tried doing this myself & got whats Below... Problem is my understanding isnt that brill just yet lol (DO NOT use this as it could mess up your Items file.. Would be interested in seeing the code complete & working for the same reason....

<set xpath="/items/item[starts-with(@passive_effect) and contains(@name,'perc_add')]/property[@name=value]/@value">0.001,0.001</set>

 
There are a lot of files that contain "perc_add", "Value" and "Passive effect", such as the ones for increasing effects based on quality and the ones that decrease the durability for randomly found items. I think the big clue we could use is the "random" in the commented out code at the end.

I might just have to do it manually by going through the whole file myself. Is there a way to save that file as a modlet?

 
Back
Top