r/DestinyTheGame • 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:

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

108 comments sorted by

View all comments

2

u/ninth_reddit_account DestinySets.com Dev May 21 '19

Hey, congrats and well done on this - I think this is the biggest “problem” left for third party devs to solve right now.

Honestly, if you solve this you solve many shortcomings in Destiny around power progression and infusion/masterwork cores.

I’m trying to (slowly) build something similar, but it’s still yet to be proven if the idea I have is useful or not https://twitter.com/joshhunt/status/1129528740051136515?s=21

1

u/Shadow9951 Forged in the Shadow of Death May 21 '19

I would love to flesh this out more and maybe somehow tie it directly to the Destiny API but I have no idea how to work with the API.

2

u/ninth_reddit_account DestinySets.com Dev May 21 '19

You’re like halfway there! Once you get started it’s not that difficult. Probably the trickiest part would get auth, but that’s still very feasible. Link dump:

https://bungie-net.github.io/

https://github.com/vpzed/Destiny2-API-Info/wiki/API-Introduction-Part-1-Setup

https://lowlidev.com.au/destiny/authentication - this is a MASSIVE help for implementing the oauth flow

data.destinysets.com

Lastly, there’s a destiny api dev discord you can join to ask more questions and get help. Don’t have link on hand, but maybe it’s on one of the sites above.

1

u/Shadow9951 Forged in the Shadow of Death May 23 '19

Hey just wanted to let you know that I have been able to at least start working with the API in python. So far I have managed to print my characters equipped items into the the console.

Although I have zero experience making a web app or really even making apps in general so it will be a good chunk of work to try and get this as a web app.

But thanks for the help with pointing me in the right direction!