Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weapon Stats Are a Bit of a Mess #754

Open
Xalavar opened this issue Nov 2, 2018 · 12 comments
Open

Weapon Stats Are a Bit of a Mess #754

Xalavar opened this issue Nov 2, 2018 · 12 comments
Labels
bug filed A bug has been filed in BNet's internal bug tracking system for this request/report. bug investigation stale

Comments

@Xalavar
Copy link

Xalavar commented Nov 2, 2018

Arsenic Bite-4B (DestinyInventoryItem hash 720351795) and No Turning Back (DestinyInventoryItem hash 720351794) both have stats for Charge Time when that stat is used for Fusion Rifles and Linear Fusion Rifles. Bows use Draw Time instead. I want to confirm if the charge time stat is used as a minimum value for Draw Time, since Bows can actually fire ammunition pretty rapidly at the cost of speed and accuracy, or some other kind of reason.

No Turning Back has a "charge time" value of 60.
"stats":{"disablePrimaryStatDisplay":false,"statGroupHash":3535570556,"stats":{"1480404414":{"statHash":1480404414,"value":410,"minimum":410,"maximum":410},"1935470627":{"statHash":1935470627,"value":410,"minimum":410,"maximum":410},"1885944937":{"statHash":1885944937,"value":410,"minimum":410,"maximum":410},"3555269338":{"statHash":3555269338,"value":18,"minimum":18,"maximum":18},"2961396640":{"statHash":2961396640,"value":60,"minimum":60,"maximum":60},"4043523819":{"statHash":4043523819,"value":76,"minimum":76,"maximum":76},"1591432999":{"statHash":1591432999,"value":78,"minimum":78,"maximum":78},"155624089":{"statHash":155624089,"value":53,"minimum":53,"maximum":53},"447667954":{"statHash":447667954,"value":760,"minimum":760,"maximum":760},"4188031367":{"statHash":4188031367,"value":46,"minimum":46,"maximum":46},"1931675084":{"statHash":1931675084,"value":60,"minimum":60,"maximum":60},"943549884":{"statHash":943549884,"value":59,"minimum":59,"maximum":59},"1345609583":{"statHash":1345609583,"value":66,"minimum":66,"maximum":66},"2715839340":{"statHash":2715839340,"value":72,"minimum":72,"maximum":72}},"hasDisplayableStats":true,"primaryBaseStatHash":1480404414}

While I understand that Inventory Size reflects the amount of ammunition can hold in reserves, it does not accurately reflect that for Horror Story (DestinyInventoryItem hash 3829285960) as it only has a value of 47 when that is not possible (it's too low for an auto rifle), unless this is one of those values that is calculated in the game itself.

Worldline Zero (DestinyInventoryItem hash 1864563948) has stats for both Magazine and Ammo Capacity. Swords do not have magazines from what I recall and the value for this is 50. The ammo capacity stat value is correct since the weapon's perks affect it.

"stats":{"disablePrimaryStatDisplay":false,"statGroupHash":1466988355,"stats":{"1480404414":{"statHash":1480404414,"value":600,"minimum":10,"maximum":600},"1935470627":{"statHash":1935470627,"value":600,"minimum":600,"maximum":600},"1885944937":{"statHash":1885944937,"value":600,"minimum":600,"maximum":600},"3555269338":{"statHash":3555269338,"value":0,"minimum":0,"maximum":0},"2837207746":{"statHash":2837207746,"value":55,"minimum":55,"maximum":55},"4043523819":{"statHash":4043523819,"value":62,"minimum":62,"maximum":62},"1240592695":{"statHash":1240592695,"value":46,"minimum":46,"maximum":46},"2762071195":{"statHash":2762071195,"value":55,"minimum":55,"maximum":55},"209426660":{"statHash":209426660,"value":46,"minimum":46,"maximum":46},"925767036":{"statHash":925767036,"value":40,"minimum":40,"maximum":40},"3871231066":{"statHash":3871231066,"value":50,"minimum":50,"maximum":50}},"hasDisplayableStats":true,"primaryBaseStatHash":1480404414}

Finally, in various weapons, including the ones I just mentioned, I usually find weapon stat hashes, such as 1885944937, that have no name and/or their values reflect values of other stats besides Power and Attack. While this may not be much of a technical concern, I'm interested to know what those values are/were used for.

@vthornheart-bng
Copy link
Contributor

Hmm, good questions - I'll have to ask a weapon designer to get some info about charge/draw time, I'll loop back on that once I get an answer!

I also don't know if these stats are similarly script-driven (and thus susceptible to the inaccuracies we see in magazine size), but I'll ask about that as well.

It's very possible that the magazine stat for Worldline Zero is just a bug in the stats content for that weapon, I'll ask about that as well.

Stats such as 1885944937 are actually intended for internal use: we don't have a filter on what stats we process and return, so we're just returning everything. And apparently over time stats have been added to items - such as this stat - that are being used for internal purposes and that aren't actually useful externally. I should probably go ahead and filter them out unless someone's actually getting use out of them. My understanding with stats like 1885944937 is that they effectively should match the item's power/attack, but that they might be modified at runtime by scripts and game-side logic that we don't see and can't access.

@vthornheart-bng
Copy link
Contributor

Ah, they got back to me pretty quickly!

It sounds like the following fields are likely to be even less reliable than magazine size is due to script-driven calculation and/or internal use that don't have direct mappings to real-world behavior. They have asked me to remove the following, so I will have to remove them in an upcoming release of the API:

  • Inventory Size
  • Charge Time
  • The stats being returned that don't have human-readable names/descriptions

As far as magazine size on swords goes, it sounds like that's something we're going to have to manually fix up on our side before you receive the data, so I'll file a bug to see if we can explicitly purge that before it ends up on your end.

@vthornheart-bng vthornheart-bng added bug bug filed A bug has been filed in BNet's internal bug tracking system for this request/report. and removed question labels Nov 2, 2018
@vthornheart-bng
Copy link
Contributor

TFS 732641 for the removal of these fields.

@Xalavar
Copy link
Author

Xalavar commented Nov 3, 2018

Are those fields going to be removed from every weapon or just the weapons that those fields do not pertain to?

Also, some perks such as High Tension String (hash 3371775011), which is used for Bows, have a charge time value which leads me to believe there are other perks with irrelevant fields as such. Will you be removing these fields from weapon perks as well?

@vthornheart-bng
Copy link
Contributor

Aye - I was informed that the potential for inaccuracy and (in many cases) the internal-only meaning of the values is such that they shouldn't be returned for any items: they'll be removed from all items, including plugs like the high tension string.

I don't have a timeline for when we'll do this removal, however: our next scheduled deployment isn't until the end of the month, and we've got a number of internal-facing projects that we're currently working through which cuts into API development time pretty significantly. I don't feel confident that these will go away as of the end of November release, but I'll try to update once I have a more firm date in place for it. Until then, if you wish feel free to implement any workarounds you see fit in your own code (such as skipping those stats when they're returned in the API rather than displaying them).

@Xalavar
Copy link
Author

Xalavar commented Nov 4, 2018

Aye - I was informed that the potential for inaccuracy and (in many cases) the internal-only meaning of the values is such that they shouldn't be returned for any items: they'll be removed from all items, including plugs like the high tension string.

Aw, damn. I was hoping to use some of those stats since they seem like very simple conversions depending on the weapon type. E.g. the Charge Time value on a perk for a Fusion Rifle can be multiplied by 4 (or -4, depending on how one uses the results) to get the actual charge time in milliseconds that the perk modifies it by in-game, so a value of 10 would affect the charge time by 40 milliseconds. (I actually performed this calculation and tested this theory by reclaiming Fusion Rifle weapons from Collections in-game and equipping perks that modify the charge time.)

Until then, if you wish feel free to implement any workarounds you see fit in your own code (such as skipping those stats when they're returned in the API rather than displaying them).

I've already taken the liberty of implementing an extra line of code to distinguish between charge time and the associated weapon. I've even been working on a way to grab the values that different perks modify base weapon stat values by to provide ranges of possible stat values. :) (This is just for weapons with random perks.)

I take it there will be no form of migration for these stats or any possibility of seeing these stats being re-implemented in the future?

@vthornheart-bng
Copy link
Contributor

vthornheart-bng commented Nov 4, 2018

I can ask them about it, but from their initial response it seems like they were concerned about exposing these stats: they didn't feel like it was likely that these stats could be reliably used.

@Xalavar
Copy link
Author

Xalavar commented Nov 4, 2018

I can ask them about it, but from their initial response it seems like they were concerned about exposing these stats: they didn't feel like it was likely that these stats could be reliably used.

My concern about it is that the first two listed stats, Charge Time and Inventory Size, seem vital for certain weapons. Even just having the static values of the aforementioned stats would be better than having no information for the fire rates of fusion/linear fusion rifles and inventory size (reserve ammo) for bows.

I don't really care all that much about the unreadable stats as much as the ones that are readable.

@floatingatoll
Copy link

If the numbers aren’t valid to compare between items of a given type - for example, if two bows have two scripts and wildly different “inventory size” properties - then it would make sense of why they’d rather not expose the tunable integers being fed into the scripts to us.

@Xalavar
Copy link
Author

Xalavar commented Nov 4, 2018

True, but some of these numbers are valid, including the base stats.

@adtennant
Copy link

From a selfish point of view I’m not a fan of losing Charge Time as it’s going to severely impact the usefulness of Banshee-44 for Fusion Rifles in particular as a lot of their perks affect that in some way.

Inventory Size isn’t that useful a stat anyway and I already ignore the non-human readable ones.

@floatingatoll
Copy link

floatingatoll commented Dec 10, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug filed A bug has been filed in BNet's internal bug tracking system for this request/report. bug investigation stale
Projects
None yet
Development

No branches or pull requests

4 participants