osrsbox / osrsbox-db

A complete and up-to-date database of Old School Runescape (OSRS) items, monsters and prayers
https://www.osrsbox.com/projects/osrsbox-db/
GNU General Public License v3.0
223 stars 80 forks source link

Grotesque guardians missing drops #221

Open JasperPluijmers opened 3 years ago

JasperPluijmers commented 3 years ago

While investigating an issue for the discord rare drop notifier I discovered that none of the id's associated with Dusk and Dawn (grotesque guardians) have drops associated with them.

Also quite some of the id's associated with dusk or dawn get a 404 on https://api.osrsbox.com/monsters/ Is this by design? Should not all id's just point to the same object or is there a specific reason?

I got the id's from https://www.osrsbox.com/tools/npc-search/

edit

Nightmare has the same problem that some of the id's do not point to an object. But at least the correct id's have drops associated with them.

MathieuDR commented 3 years ago

I did some further investigation, the ID when Dusk dies is 7889 which is correct in the NPC search tool

Yet when I query the 'monsters API' I receive the followind (query: https://api.osrsbox.com/monsters/7889)

{
    "_status": "ERR",
    "_error": {
        "code": 404,
        "message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
    }
}

List of ID's that errors of Dusk: 7849, 7854, 7855, 7886, 7887, 7889 List of Id's thad have meta data, but no drops of Dusk: 7851, 7882, 7883, 7888

List of ID's that errors of Dawn: 7850, 7853, 7854, 7855 List of Id's thad have meta data, but no drops of Dawn (not that I think this is needed): 7852

MathieuDR commented 3 years ago

Do you have any information about this? @osrsbox

osrsbox commented 3 years ago

Hey @MathieuDR and @JasperPluijmers - sorry about the long delay in reply, I don't get much time to work on this project anymore. Thanks for providing such detailed information @MathieuDR - made it really easy to research the problem.

404 Errors for Some IDs

Monsters are a subset of NPCs. I identify monsters by determining if they are have "Attack" in the actions array of the NpcDefinition which is taken from the OSRS cache. The in game equivalent is right-click to see the actions available. Unfortunately, due to the design of the game, some "monsters" are not attackable in some forms. I guess the best example is Dusk/Dawn in the "phases" where you cannot attack them throughout the fight. Since these forms are not attackable, I don't include them in the database. Here is any example of the NPC definition for a version of Dusk, ID 7849 with a blank actions array.

Couple FYIs:

Solution: I can add some of the IDs that you listed if that would help you out.

No drops for Dusk/Dawn

This is a hard solution to solve for me. The page with the drops is Grotesque_Guardians on the wiki. Most other monsters have drops embedded on their page. Since the names are different (Dusk VS Grotesque Guardians) and the category does not include monsters it is not included in my scraper results.

No idea how to solve this - and since the data is programmatically generated, it is kind of hard. I will have a think about it, but a quicker solution might be to add one "exception" in your tool to load a static drops array that you put together. Sorry, but I don't have the time to focus on this project anymore, and have limited time for updates.

EDIT: This is the same problem (missing IDs) as in Issue #222. I will close that issue are the discussion is pretty much the same. And will leave a list of the documents IDs below:

Seems the following aren't linked with the rest: 9460, 9461, 9462, 9463, 9464
All are giving a 404 code.
osrsbox commented 3 years ago

Is this by design? Should not all id's just point to the same object or is there a specific reason?

This is a good question @JasperPluijmers. Yes, this is by design. The idea when first designing/making this project was to be really specific with each item / monster and provide all the "versions" as it can sometimes be really useful to be able to get the data that varies. One example is providing versions for noted/placeholder/normal variations of all items. Same with things like the different versions of monsters - one example is Alchemical Hydra which has different properties for different versions (e.g., max hit changes).

Hope that helps clarify the way it works, and why it was designed like this.

MathieuDR commented 3 years ago

Hey, thanks for the answer. I will defnitily look at the scraper since I would like to add a property if a drop is unique.

Not sure how feasible this is, but must be possible I suppose.

I will see if I can come with a work around for guardians on my end or preferably the scraper.

Note, I would also like to thank you for your detailed answer!

osrsbox commented 3 years ago

The code is a bit of a mess, and grew into a mutant over time... Just warning you! I will also have a think to see if I can come up with an easy solution.