I've been looking up several items and displaying their stats, and it appears as though some items have stat values that are wrong.
Take the Mida Mini Tool for example. The definition for the item in DestinyInventoryItemDefinition shows these stats:
magazine: 70
rpm: 100
impact: 0
range: 30
stability: 49
reload speed: 31
handling: 65
Now if you compare these stats to what you see in game, none of them match up.
I'm fine with stats being wrong, it happens. Though I'm wondering if there is a way to tell which items in DestinyInventoryItemDefinition are incorrect, or if I'll want to manually filter some of the more noteworthy items.
Ah, you'll want to use the stats.stats property rather than the investmentStats property. It will not be guaranteed to be correct either - particularly for things like Magazine Size, which we cannot return with an accurate number (see the documentation for further info), but the "stats" property will return the stats in a way that translates closer to what you see in the game's stat display.
The long story of it is that item stats go through a variety of transformations. "Investment Stats" - which looking at the definition, appears to be the stats you're looking at - are an intermediary processing step. We store that data in the definition because we need that intermediary step for processing the final stats of actual instances of the item: but if you're just looking for base level stats of items in definitions, the "stats.stats" property gives the conversion of these base investment stats into what we call "display" stats. (they are transformed using the item's "stat group", if you ever want to perform these calculations yourself for some reason).
I believe I am already using the stats.stats property.
'stats':{
'statGroupHash':4289099473,
'hasDisplayableStats':True,
'primaryBaseStatHash':1480404414,
'stats':{
'2715839340':{
'value':80,
'minimum':0,
'maximum':0,
'statHash':2715839340
},
'4188031367':{
'value':31,
'minimum':0,
'maximum':0,
'statHash':4188031367
},
'4043523819':{
'value':0,
'minimum':0,
'maximum':0,
'statHash':4043523819
},
'1931675084':{
'value':70,
'minimum':0,
'maximum':0,
'statHash':1931675084
},
'3555269338':{
'value':15,
'minimum':0,
'maximum':0,
'statHash':3555269338
},
'1240592695':{
'value':30,
'minimum':0,
'maximum':0,
'statHash':1240592695
},
'943549884':{
'value':65,
'minimum':0,
'maximum':0,
'statHash':943549884
},
'1885944937':{
'value':0,
'minimum':0,
'maximum':0,
'statHash':1885944937
},
'1480404414':{
'value':0,
'minimum':0,
'maximum':0,
'statHash':1480404414
},
'4284893193':{
'value':100,
'minimum':0,
'maximum':0,
'statHash':4284893193
},
'1935470627':{
'value':0,
'minimum':0,
'maximum':0,
'statHash':1935470627
},
'155624089':{
'value':49,
'minimum':0,
'maximum':0,
'statHash':155624089
},
'3871231066':{
'value':70,
'minimum':0,
'maximum':0,
'statHash':3871231066
},
'1345609583':{
'value':49,
'minimum':0,
'maximum':0,
'statHash':1345609583
}
}
}
Hmm, can you give me the itemHash for the specific item you're looking at?
I'm looking at Mida Mini-Tool, hash 3089417788, and the values I see are:
"stats": {
"statGroupHash": 4289099473,
"stats": {
"1480404414": {
"statHash": 1480404414,
"value": 10,
"minimum": 10,
"maximum": 10
},
"1935470627": {
"statHash": 1935470627,
"value": 1,
"minimum": 1,
"maximum": 1
},
"1885944937": {
"statHash": 1885944937,
"value": 1,
"minimum": 1,
"maximum": 1
},
"3555269338": {
"statHash": 3555269338,
"value": 15,
"minimum": 15,
"maximum": 15
},
"4284893193": {
"statHash": 4284893193,
"value": 900,
"minimum": 900,
"maximum": 900
},
"4043523819": {
"statHash": 4043523819,
"value": 15,
"minimum": 15,
"maximum": 15
},
"1240592695": {
"statHash": 1240592695,
"value": 37,
"minimum": 37,
"maximum": 37
},
"155624089": {
"statHash": 155624089,
"value": 54,
"minimum": 54,
"maximum": 54
},
"3871231066": {
"statHash": 3871231066,
"value": 37,
"minimum": 37,
"maximum": 37
},
"4188031367": {
"statHash": 4188031367,
"value": 38,
"minimum": 38,
"maximum": 38
},
"1931675084": {
"statHash": 1931675084,
"value": 70,
"minimum": 70,
"maximum": 70
},
"943549884": {
"statHash": 943549884,
"value": 68,
"minimum": 68,
"maximum": 68
},
"1345609583": {
"statHash": 1345609583,
"value": 49,
"minimum": 49,
"maximum": 49
},
"2715839340": {
"statHash": 2715839340,
"value": 80,
"minimum": 80,
"maximum": 80
}
}
Drop the hash for the item you're looking at on me so I know for sure we're looking at the same thing.
I'm using the same hash value of 3089417788 and am looking it up in the sqlite database table DestinyInventoryItemDefinition but am seeing different values. Very odd.
EDIT: And I made sure to download the latest version of the manifest too
Huh, very odd indeed! Hang tight, let me actually go open the SQLite database table from prod and take a peek, to make sure we're looking at the same thing.
@vthornheart-bng I think there is an issue with stats in the manifest for armor as well. I can create a new issue if you prefer, however, hash = 2932121030 should provide an example.
Yes, not to de-rail this thread but for the armor pieces I've inspected in the Manifest InventoryItem table the Mobility/Resilience/Recovery stats are always zero. Not sure how to see the "base stats" like you can see for weapons.
I'll have to investigate that - can you open a separate bug for that if there's not one already? - I get the feeling that may have a different root cause, but it'll definitely be something I need to investigate as well.
Well I'll be damned. It's the wrong data in the production database somehow. I'm going to have to investigate this further. Thanks for bringing this to my attention!
Did the sudden change in stats to the wrong values happen recently, or has this been an ongoing issue for you?
Only recently for me, but I've only just started working on the feature that uses it. However, I've noticed that DTR doesn't display stats for some items in their database. I checked the stats for some of these items myself, and it appears as though the ones they don't display are the ones with incorrect stats. My guess is that it has been like this for a little bit, but I'm only making a conjecture here.
Really appreciate you looking into this and for all your hard work @vthornheart-bng !
As just an FYI... I decided to check the Bungie Armory and it displays the incorrect stats that @jgayfer mentioned. I also see the same stats.stats values as @jgayfer in SQLite.
magazine: 70
rpm: 100
impact: 0
range: 30
stability: 49
reload speed: 31
handling: 65
You can see here https://www.bungie.net/en/Explore/Detail/Item/3089417788
Regards!
No prob, I'm glad you brought this up - I would not have noticed this, and indeed something is awry. Looking into it now, we'll see if we can pin down what happened and get it resolved for the next time we deploy.
Phew, well after a bit of investigating, I've found the source of the issue. This should be resolved with our next major deployment later this week. Thanks for reporting this!
(note that this will not fix the Mobility/Resilience/Recovery stats not appearing on armor: that appears to be a separate problem. I'll be digging into that shortly)
Great news. Really appreciate how fast you jumped on this issue! :slightly_smiling_face:
Yeah, I felt like I had to prioritize it when I saw that my local copy of the data wasn't matching what you were seeing. My fear was that there was a more serious issue at play: luckily it wasn't anything fundamentally broken, but there were some discrepancies in how my local information was built that needed to be accounted for in production data.
I need to use my labels more consistently - I meant next-release, not "I'll fix it in Destiny 3". ha
Anyways, grab the new manifest - the stats should be fixed now!
Thanks @vthornheart-bng - It looks great on my end!
Woot! Thanks for reporting it and doing the investigation you've been conducting - I appreciate your contributions!