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

Filter items by drop location #245

Open
1 of 11 tasks
Kaptard opened this issue Apr 9, 2019 · 1 comment
Open
1 of 11 tasks

Filter items by drop location #245

Kaptard opened this issue Apr 9, 2019 · 1 comment
Labels
Game: Warframe Issues that concern the Warframe subsite. Scope: API Scope: UI Type: Enhancement

Comments

@Kaptard
Copy link
Member

Kaptard commented Apr 9, 2019

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request

Current behavior

Would have to go through every single relic and their drops to see what's worth the most.


Expected behavior

Should be able to sort by highest price + limit results to drops from a relic.
In other words, this would be an extension of the search/item page which allows limiting
results to certain drop locations.


Minimal reproduction of the problem

See current behavior. Lots of tedious work.


Environment

Browser:

  • Chrome (desktop) version:
  • Chrome (Android) version:
  • Chrome (iOS) version:
  • Firefox version:
  • Safari (desktop) version:
  • Safari (iOS) version:
  • IE version:
  • Edge version:

For development issues:

  • Node version:
  • Operating System:

Additional Description

@jtbry
Copy link

jtbry commented Nov 8, 2020

Not sure if this issue is still of interest but if so, we can find items by drop locations using a MongoDB Aggregation.

In this example below I use "Lith S3 Intact" for the drop location.

[{$match: {
  'components.drops.location': 'Lith S3 Intact'
}}, {$unwind: {
  path: '$components',
  preserveNullAndEmptyArrays: false
}
}, {$unwind: {
  path: '$components.drops',
  preserveNullAndEmptyArrays: false
}}, {$match: {
  'components.drops.location': 'Lith S3 Intact'
}}, {$project: {
  "_id": 0,
  "name": 1,
  "components.name": 1,
  "components.drops.chance": 1,
  "components.ducats": 1,
  "components.prices": 1
}}]

The above aggregation produces these results.
Note: I omitted the price property and all but one returned document for the sake of brevity.

{
        "components" : {
                "name" : "Blueprint",
                "ducats" : 15,
                "drops" : {
                        "chance" : 0.25329999999999997
                }
        },
        "name" : "Akbronco Prime"
}

So as long as we know what drop location we want to get items from, we can use this aggregation to get all the items from said drop location. This should be fairly easy to work into existing systems. Also gives the potential to display what is dropped from what relics on those relic's pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Game: Warframe Issues that concern the Warframe subsite. Scope: API Scope: UI Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants