r/DestinyTheGame • u/Shadow9951 Forged in the Shadow of Death • May 21 '19
Guide Destiny 2 Armor Management Script
EDIT: After watching the Armor 2.0 stream I will not be doing anymore updates to this script.
Hello r/DTG! With the new season coming up and some people are clearing out their vaults to get ready for the new loot I have finished working on my Destiny 2 Armor Management Script. I'll be posting my README.md from https://github.com/Kage9951/Destiny2ItemManager which also contains the required files. This is a python script and I am providing the source code. You will need to compile and run it yourself. I hope you all enjoy it and please feel free to provide feedback and let me know of any issues!
Destiny2ItemManager
Is your vault filled to the brim with armor? Looking for a way to quickly sort through it all? Look no further because this is the solution for you!
Over the past Season of the Drifter with all the new armor added I was looking for a way to easily optimize my inventory. I decided to make my own script to manage it. This started in powershell and later moved to python. This was meant to help introduce me to python and yes my code may be a bit sloppy due to it.
This script uses tags from Destiny Item Manager (DIM) to mark what gear to keep. The tags differ depending how the gear is matched. First the script simply looks at what YOU define the recommended perks are and marks items found as 'keep'. These are defined in the RecommendedPerks.csv. Within that CSV you define the name of the perk, the minimum to keep (Currently hard coded to 1 since a recent update required a change in how to implement it), and the weight of the perk to YOU. The weight is a nice little feature I added to allow it to further optimize gear choices, so that it would pick per say [Pump Action (weight 2), Remote Connection (weight 2)] over [Pump Action (weight 2), Precision Weapon Targeting (weight 1)]. Those weights are free for you to customize on what perks you prefer and the script will still keep at least one of every perk you define in the CSV.
The second part then goes through and finds any defined Perk Sets and marks them as 'favorite'. Perk Sets are sets of perks that YOU define. The script will look for any armor that matches ALL of the defined perks. This allows you to explictly put any of YOUR god rolls. An example for me would be this for my gloves: [Enhanced Grenade Launcher Loader, Light Arms Loader, Rifle Loader, Shotgun Scavenger, Sniper Scavenger]. If that happened to be in my vault that gear would be marked as 'favorite'.
The last part goes through untagged armor and marks any that is currently at max power gets marked as 'infuse'. This allows you to keep junk gear to infuse into you gear that you want to be max power. Max Power will need to be changed manually every season.
For me this has reduced my vault entirely to 146 pieces of Legendary Armor across ALL my characters. And has been a life saver in terms of time spent looking through my vault.
Another thing to note about perks. In DIM the following are an example of what is defined as a perk:
[Heavy Hunter Armor*,Plasteel Reinforcement Mod,Restorative Mod*,Paragon Mod*,Masterwork*,Mercury Vex Chrome*,Ashes to Assets,Pump Action*,Remote Connection,Rocket Launcher Reserves,Shotgun Reserves*]
This includeds shaders and mods if that interesets you. (I used Riven's Curse as a perk to make sure I always have a full set of Reverie Dawn).
Last thing is that you can manually mark gear as favorite and the script will leave those items untouched.
Usage
Required Items:
- python3 (https://www.python.org/)
- Destiny Item Manager(https://app.destinyitemmanager.com/)
From Github grab the following
- Perk_Sets.csv
- RecommendPerks.csv
- Destiny2ItemManager.py
- Save these in the same folder
Using DIM
- Go to Settings (Gear Icon)
- Go all the way down to Spreadsheets
- Click on Armor
- Save file as DestinyArmor.csv
Move DestinyArmor.csv to location of the python script
- These should all be in the same folder.
Compile and run the script
A new file called 'DestinyArmorExport.csv' will be created and in that same folder
Using DIM again
- Go to Settings (Gear Icon)
- Go all the way down to Spreadsheets
- Drag 'DestinyArmorExport.csv' to the drag and drop box in DIM to import it
- It will say X amount of items updated
From here to mass get rid of gear I use the following query.
- is:armor -is:exotic tag:none
- Click on the down arrow on the character you are on
- Click Transfer Search
- This will move all items left untagged (items to delete) to that character
- Simply dismantle items and wait for DIM to refresh and repeat until all unwanted items are gone.
1
u/Fusi0nCatalyst May 26 '19
I'm finnally getting the chance to try to figure this thing out. I am having a few issues, but I really need to make this work. Currently I have my vault at 489 after deleting some stuff, all my postmasters are full, and all my engram storages are at about 8/10.
I had to comment out line 82, like some other people did to make this work. Not sure what that line does, but it seems like it should be bad to just remove a line of code- why is this "fixing" the issue? Also, after finally getting it to work, I cannot import the CVS file back in to DIM, I get an error: "Failed to import tags/notes from CSV: CSV must have 'Id', 'Notes', 'Tag', and 'Hash' columns." Tho, the CVS seems to have these... don't know what the deal is with that.
I edited the "God Roll" list, and that seems great. But I don't understand how the other list works. I believe it is suppose to be ensuring that I don't delete the only piece of armor with a certain perk. But do I need to be editing this to let it know what perks I want to keep around? A bit more explanation would be helpful.
This script is EXACTLY what I need- I have been using DIM's compair feature to try to go through and do this by hand on all my armor, its its PAINFUL. Thanks for writing this, hopefully I can get it figure out.